Bug
--provider and --model CLI flags are silently ignored when launching jcode (TUI) and jcode run. The server-side auto-detection overrides whatever the client requests, so the flags have no effect.
Expected behavior
jcode --provider zai --model glm-5-turbo
Should start a session on Z.AI / glm-5-turbo.
Actual behavior
The session starts on whatever provider the server auto-detects (e.g., Command Code / Claude Opus 5), completely ignoring --provider zai --model glm-5-turbo.
The TUI footer shows:
api-key:command code · Claude 5 Opus
instead of the requested Z.AI / glm-5-turbo.
Workaround
Use the /model slash command inside the TUI after launch:
This works correctly and switches to the requested provider/model.
Reproduction
# TUI mode — flags are ignored, defaults to auto-detected provider
jcode --provider zai --model glm-5-turbo
# run mode — same issue, picks a random provider instead
jcode run --provider zai --model glm-5-turbo "hello"
# → responds as "Claude Sonnet 4 via Anthropic API" instead of glm-5-turbo
# Both tested with multiple provider/model combos — always ignored
Environment
- jcode version: v0.64.3-dev (d6c7c36, dirty)
- Server: Forest v0.64.3-dev
- OS: Linux (x86_64)
- Providers configured: OpenAI (oauth), Gemini (oauth), Z.AI (api key), Command Code (api key), DeepSeek (api key)
- Auto-detected default: Command Code
Notes
--provider zai is listed as a valid value in --provider's possible values
glm-5-turbo is listed by jcode model list --provider zai
- The flags are accepted without error — they just have no effect
- The issue appears to be that the Forest server's provider auto-detection runs after client flags are parsed and overrides them
Bug
--providerand--modelCLI flags are silently ignored when launchingjcode(TUI) andjcode run. The server-side auto-detection overrides whatever the client requests, so the flags have no effect.Expected behavior
Should start a session on Z.AI / glm-5-turbo.
Actual behavior
The session starts on whatever provider the server auto-detects (e.g., Command Code / Claude Opus 5), completely ignoring
--provider zai --model glm-5-turbo.The TUI footer shows:
instead of the requested Z.AI / glm-5-turbo.
Workaround
Use the
/modelslash command inside the TUI after launch:This works correctly and switches to the requested provider/model.
Reproduction
Environment
Notes
--provider zaiis listed as a valid value in--provider's possible valuesglm-5-turbois listed byjcode model list --provider zai