Adds the `qwen` built-in provider and the `qwen://` DSN scheme, keyed by QWEN_API_KEY and defaulting to Model Studio's international host. Like kimi (ADR-0026) it is `provider/openai` pointed elsewhere — no new client. Model Studio serves the same models over two protocols, so the real decision was which wire format to speak. ADR-0027 records why it is the OpenAI one: down the anthropic client `ReasoningEffort` is ignored by design, structured output rides the first-party `output_config.format` mechanism the shim does not implement, and cached-token accounting reads Anthropic-only usage fields. Each of those fails silently rather than loudly, which is what makes the choice worth writing down. The shim stays reachable ad hoc via an `anthropic://` DSN. The kimi and qwen DSN factories were byte-identical, so they now share one `openaiCompatScheme` helper: the "credential comes from the DSN token, and the missing-key hint names LLM_<NAME>" rules hold by construction instead of by copy. Tests are hermetic and break-checked (all six fail on a deliberate mutation), including the reverse credential leak — a visible QWEN_API_KEY must not authenticate the openai built-in — and reasoning_effort asserted on the wire body, which is the ADR's load-bearing claim. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
19 lines
806 B
Bash
19 lines
806 B
Bash
# majordomo example environment.
|
|
# Copy to .env and fill in real values. .env is gitignored — never commit it.
|
|
|
|
# Ollama Cloud API key (used by the ollama-cloud provider and live tests).
|
|
OLLAMA_API_KEY=your-ollama-cloud-key-here
|
|
|
|
# Built-in provider keys (each optional; only needed for the providers you use).
|
|
#OPENAI_API_KEY=sk-...
|
|
#KIMI_API_KEY=sk-... # Moonshot AI (Kimi); provider name "kimi"
|
|
#QWEN_API_KEY=sk-... # Alibaba Model Studio (Qwen); provider name "qwen"
|
|
#ANTHROPIC_API_KEY=sk-ant-...
|
|
#GOOGLE_API_KEY=...
|
|
|
|
# LLM_* env-DSN provider definitions (go-llm parity).
|
|
# Format: LLM_<NAME>=scheme://[token@]host[/path]
|
|
# <NAME> becomes the provider's registry name (LLM_M1 -> "m1").
|
|
#LLM_M1=foreman://[email protected]
|
|
#LLM_M5=foreman://[email protected]
|