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
{{ message }}
Repository navigation
default_provider = "deepseek" with default_model = "deepseek-v4-pro" silently falls back to Claude on startup #448
autonomous: clearHands-off: unambiguous bug, obvious fix, no decisions. Don't even look - an agent can fully solve.bugSomething isn't workingpriority: highP1 - important bug or impactful feature, fix soon
And DEEPSEEK_API_KEY is set (but no OPENROUTER_API_KEY), jcode silently ignores the DeepSeek default and starts with claude-sonnet-4 instead.
Root Cause:
In crates/jcode-base/src/provider/mod.rs, set_config_default_model (line 1301) resolves the config provider selection to OpenAiCompatibleProfile("deepseek"), whose active_provider() is ActiveProvider::OpenRouter. It then calls set_model_on_provider_with_credential_modes(OpenRouter, ...) which triggers the generic OpenRouter rebind logic (line 1006-1026). This logic decides the current DeepSeek profile runtime needs to be replaced with a plain OpenRouter API-key runtime — and fails because OPENROUTER_API_KEY is not set. The error is silently caught, so the active provider stays as the auto-detected default (Claude).
When ConfigProviderSelection::OpenAiCompatibleProfile(profile_id), the code should short-circuit to set_model_on_openai_compatible_profile(profile, model) instead of going through the generic set_model_on_provider_with_credential_modes(ActiveProvider::OpenRouter, ...) path.
• resolve_config_provider_selection (in selection.rs:441) determines the selection
• ConfigProviderSelection::active_provider() (in selection.rs:13) maps all OpenAiCompatibleProfile to ActiveProvider::OpenRouter
• set_model_on_provider_with_credential_modes (line 885) for OpenRouter has complex rebind logic at lines 1006-1026 that tries to replace profile runtimes
Release Information: v0.36.0 (commit e18e983) – released July 5, 2026
changed the title [-]https://github.com/1jehuang/jcode/issues[/-][+]`default_provider = "deepseek"` with `default_model = "deepseek-v4-pro"` silently falls back to Claude on startup[/+]on Jul 5, 2026
Triage: confirmed, and your root-cause analysis was exactly right - thank you, it made this a fast fix.
Fixed on master in 2da4528: set_config_default_model now short-circuits ConfigProviderSelection::OpenAiCompatibleProfile to set_model_on_openai_compatible_profile, binding the DeepSeek profile runtime directly instead of routing through the generic OpenRouter path (whose rebind logic required OPENROUTER_API_KEY and silently failed).
Added a regression test (test_config_default_provider_deepseek_applies_without_openrouter_key) that reproduces the exact config from this report and fails without the fix. A follow-up commit (af1df25) applies the same treatment to named [providers.<name>] config profiles.
autonomous: clearHands-off: unambiguous bug, obvious fix, no decisions. Don't even look - an agent can fully solve.bugSomething isn't workingpriority: highP1 - important bug or impactful feature, fix soon
Activity
[-]https://github.com/1jehuang/jcode/issues[/-][+]`default_provider = "deepseek"` with `default_model = "deepseek-v4-pro"` silently falls back to Claude on startup[/+]fix(provider): honor default_provider pointing at an OpenAI-compatibl…
feat(provider): surface named config provider models in the model pic…
1jehuang commentedon Jul 6, 2026
Triage: confirmed, and your root-cause analysis was exactly right - thank you, it made this a fast fix.
Fixed on master in 2da4528:
set_config_default_modelnow short-circuitsConfigProviderSelection::OpenAiCompatibleProfiletoset_model_on_openai_compatible_profile, binding the DeepSeek profile runtime directly instead of routing through the generic OpenRouter path (whose rebind logic required OPENROUTER_API_KEY and silently failed).Added a regression test (
test_config_default_provider_deepseek_applies_without_openrouter_key) that reproduces the exact config from this report and fails without the fix. A follow-up commit (af1df25) applies the same treatment to named[providers.<name>]config profiles.Will close automatically on the next release.
1jehuang commentedon Jul 7, 2026
Released in v0.37.0. Run
jcode updateto get it.fix(provider): honor default_provider pointing at an OpenAI-compatibl…
feat(provider): surface named config provider models in the model pic…
fix(provider): honor default_provider pointing at an OpenAI-compatibl…
feat(provider): surface named config provider models in the model pic…