fix(small-model): use selected runtime model endpoint (#3437)

This commit is contained in:
Matt Cowger
2026-09-09 08:29:23 +03:00
committed by GitHub
parent 458dcf78c0
commit 66af9b52c7
5 changed files with 63 additions and 14 deletions
@@ -117,8 +117,9 @@ other runtime API.
- Everything else: OpenAI-compatible `/chat/completions` against the
provider's base URL, resolved from (1) `provider.<id>.options.baseURL`
in the OpenCode config, (2) the hardcoded `https://api.openai.com/v1`
endpoint, (3) the endpoint OpenCode resolved at runtime, or (4) the
provider's `api` field from the models.dev catalog. The credential follows
endpoint, (3) the selected model's endpoint OpenCode resolved at runtime,
(4) the provider-level runtime endpoint, or (5) the provider's `api` field
from the models.dev catalog. The credential follows
the same shape: config `options.apiKey`, then the runtime credential, then
the auth.json entry. `provider.<id>.options.headers` is sent with the
request and overrides the bearer default, so gateways that authenticate on