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
The CLI forces its own provider resolution and ignores the extension's active provider profile:
resolveProvider() falls back to providerIdentifiers.openrouter unconditionally
--provider only accepts anthropic/openai-native/gemini/openrouter/vercel-ai-gateway
the API-key check hard-exits unless a flag/env key exists
So a VS Code user who imports profiles (e.g. zai) gets openrouter forced over their active profile at task creation, and providers outside the allowlist can't be expressed at all.
Suggestion
Make provider optional (no default): when no flag/settings provider is given, let the extension's active profile (globalState + secrets) drive the session, and skip the env-key hard-exit in that case.
Environment: macOS arm64, CLI v0.1.17, imported VS Code profiles.
Solution (applied locally 2026-12-03)
Update — solved locally. Changes:
resolveProvider() returns SupportedProvider | undefined (no forced openrouter fallback)
the allowlist guard skips when provider is undefined
extension-host baseSettings spread provider settings only when a provider was explicitly set
the API-key hard-exit fires only when a provider was explicitly chosen (profile mode uses the extension's own globalState + secrets)
With no flags, the imported/active profile drives the session (including providers outside the allowlist, e.g. zai); flags still override when given. One test updated (resolveProvider() → toBeUndefined()). Happy to send a PR — this one may deserve a design discussion first.
Activity
martin-rueegg commentedon Dec 4, 2026
related: #1246