feat(llamaswap): add llama-swaps (TLS) DSN scheme
llama-swap was http-only by DSN, pushing TLS-fronted instances onto the openai:// scheme (which loses the management/image methods). Add a "llama-swaps" scheme that builds an https base URL, alongside "llama-swap" (http, local-first) — mirroring redis/rediss. Both share one factory; llama-swaps is scheme-only (no default built-in). The choice stays explicit because a DSN has no reliable http-vs-https signal. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -79,12 +79,13 @@ alias := bare token (no slash), expands INLINE, recursively, cycle-checked
|
||||
`LLM_<NAME>=scheme://[token@]host[/path]` — e.g.
|
||||
`LLM_M5=foreman://token@foreman-m5.example` defines provider `m5`; then
|
||||
`m5/qwen3:30b` works in Parse, chains, and aliases. Scheme ∈ {foreman,
|
||||
ollama, ollama-cloud, openai, anthropic, google, gemini, llama-swap} ∪
|
||||
RegisterScheme. Token = credential; base URL = `https://host` always —
|
||||
**except `llama-swap`, which builds `http://host` (local-first; ADR-0015).**
|
||||
`New()` scans the process env eagerly; unknown names also resolve lazily at
|
||||
Parse time (`my-prov` → `LLM_MY_PROV`). Malformed entries fail on use, not at
|
||||
startup.
|
||||
ollama, ollama-cloud, openai, anthropic, google, gemini, llama-swap,
|
||||
llama-swaps} ∪ RegisterScheme. Token = credential; base URL = `https://host`
|
||||
always — **except `llama-swap`, which builds `http://host` (local-first);
|
||||
`llama-swaps` is its TLS twin (`https://host`), mirroring redis/rediss
|
||||
(ADR-0015).** `New()` scans the process env eagerly; unknown names also resolve
|
||||
lazily at Parse time (`my-prov` → `LLM_MY_PROV`). Malformed entries fail on use,
|
||||
not at startup.
|
||||
|
||||
## Health & failover (ADR-0006, ADR-0008)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user