* fix: add support for custom provider base URLs from config * feat: read custom provider apiKey from config and use it as primary credential when it exists * doc: update small-model documentation
This commit is contained in:
@@ -47,7 +47,9 @@ other runtime API.
|
||||
- **Anthropic** (`type: api`): `/v1/messages` with `x-api-key`.
|
||||
- **Google** (`type: api`): `generateContent` with `x-goog-api-key`.
|
||||
- Everything else: OpenAI-compatible `/chat/completions` against the
|
||||
provider's models.dev base URL with `Authorization: Bearer <key>`.
|
||||
provider's base URL, resolved from (1) `provider.<id>.options.baseURL`
|
||||
in the OpenCode config, (2) the hardcoded `https://api.openai.com/v1`
|
||||
endpoint, or (3) the provider's `api` field from the models.dev catalog.
|
||||
- `catalog.js` — models.dev catalog via the shared in-process cache
|
||||
(`../opencode/models-metadata.js`, also serving
|
||||
`/api/openchamber/models-metadata`).
|
||||
|
||||
Reference in New Issue
Block a user