You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fall back from an unusable selected inference provider
A missing or incomplete default or project-local pick used to treat
the session as unconfigured even when another provider could run.
Explicit --provider still fails closed.
Copy file name to clipboardExpand all lines: docs/IMPLEMENTATION.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -294,10 +294,12 @@ The `waitForApproval` default is resolved once at the watchdog boundary (`resolv
294
294
295
295
`loadConfig` resolves the active provider down to `{ apiKey, baseURL, model, providerName }` (the same struct the runtime consumes). Per field, highest wins:
296
296
297
-
- providerName: `--provider` > local file > `defaultProvider` > sole provider
298
-
- model: `--model` > local file > provider `defaultModel` > first model
297
+
- providerName: `--provider` > local file > `defaultProvider` > sole provider. If that pick is missing or incomplete and `--provider` was not set, resolution walks remaining untried names in this order: local file, `defaultProvider`, `recentModels` provider names (newest first, unique), then remaining catalog keys in insertion order. `--provider` fail-closes: an unknown or unusable CLI provider does not steal a sibling.
298
+
- model: `--model` > local file > provider `defaultModel` > first model on the original pick. `local.model` does not follow a fallback sibling; `--model` may still overlay a fallback. A candidate reached via `recentModels` may use that pair's model when `--model` is unset.
299
299
- baseURL / apiKey: the selected provider only
300
300
301
+
If no remaining provider is fully resolvable, resolution throws the original pick's missing-fields error.
302
+
301
303
Credentials and provider definitions come exclusively from the settings files. Environment variables (including `OPENAI_COMPATIBLE_*`) have no influence on provider resolution, and `.env` files are not loaded.
302
304
303
305
OpenAI-compatible `baseURL` values are normalized during provider resolution. A plain base URL such as `https://provider.example.com/v1` is preserved, a trailing slash is removed, and a pasted full chat-completions endpoint such as `https://provider.example.com/v1/chat/completions` is reduced to `https://provider.example.com/v1` before the runtime appends `/chat/completions`. Invalid non-URL values fail with an explicit baseURL error.
0 commit comments