It's Time for LLM Connection Strings
Clean your env JUNK_DRAWER and simplify model config
Don’t you miss when every database required a miscellaneous grab-bag of environment variables?
| A tower of delicate config, DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_NAME… Shit, or was it DB_USERNAME or DB_USER? F*ck, is it DB_PASS, not DB_PASSWORD? When do I need those PG_* prefixes! And, how do I set the timeout?! Ah!
Then someone had the brilliant idea to just use a URL¹:
postgres://user:pass@host:5432/dbnameOne string. Everything you need. Universally parseable. Portable. Dare I say, beautiful even.
What if we just… stole borrowed the DB URL idea?
Introducing LLM Connection Strings
llm://api.openai.com/gpt-5.2?temp=0.7&max_tokens=1500llm://api.z.ai/glm-4.7?top_p=0.9&cache=trueThe Parts of an LLM Connection String
Need auth? Great, add it!
llm://app-name:password@api.openai.com/gpt-5.2?temp=0.7&max_tokens=1500Also, be careful. Credentials in URLs can be a security risk if logged or exposed. Though the good news is they are likely to be scrubbed automatically in many hosted logging services. Verify & use with caution, etc.
Resiliency? Sure, why the hell not!
Specify round-robin host CSV for failover! Many DB libraries support this today!
llms://primary.gpt,backup.gpt/gpt-6?temp=0.9That s in llms:// isn’t a typo, it’s a pluralization joke hint there’s multiple hosts.
One string with everything from your auth to your endpoint.
Alternative Formats
I’m not married to llm://.
I could imagine some use cases better met with a more provider-centric protocol format, for example, a local LLM router could spin up a local ollama:// service:
ollama://localhost:11434/llama3vercel://anthropic/sonnet-4.5?temp=0.8&web_search={"maxUses":3}bedrock://us-west-2.aws/anthropic/sonnet-4.5?temp=0.8&cacheControl=ephemeralRegardless of the exact scheme, the core idea is the same: one string to rule them all.
- You can copy & paste in and out of forms and legacy apps.
- You can pass them as a single CLI argument. (Sure, with quoting, but still easier than a dozen env vars.)
- You get URL parsing for ‘free’ in every language. Query parameters can handle complex options via namespaced keys, or JSON encoding (with URL escaping.)
The database world figured this out in a few decades.
Good thing that’s only half a vibe year.




