-
Notifications
You must be signed in to change notification settings - Fork 214
Description
What version of Code is running?
0.6.50
Which model were you using?
Requested: claude-opus-4.5 and gemini-3-pro via agent.create Actual: gpt-5.2-codex (per agent logs)
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What terminal emulator and version are you using (if applicable)?
PowerShell 7.5.4 (pwsh.exe)
What steps can reproduce the bug?
- Ensure ~/.code/config.toml has Claude/Gemini agents enabled (or defaults).
- Call agent.create with a non‑GPT model, e.g. models=["claude-opus-4.5"] or models=["gemini-3-pro"].
- Inspect .code/agents//result.txt: it reports model: gpt-5.2-codex / provider: openai.
Minimal repro snippet:
┌ text ─────────────────────────────────────────────────────────┐
│ agent.create({ models: ["claude-opus-4.5"], write: false }) │
│ # result.txt shows: model: gpt-5.2-codex │
└───────────────────────────────────────────────────────────────┘
What is the expected behavior?
The agent should run with the requested provider/model, or fail with a clear error if it can’t.
What do you see instead?
The agent runs on the default model (gpt-5.2-codex) and ignores the requested model list.
Additional information
Tried agent.create with models=["claude-opus-4.5"] and models=["gemini-3-pro"] → agent logs still show model: gpt-5.2-codex (did not switch).
- Verified CLIs: claude --version and gemini --version succeed.
- Set explicit CLI paths in ~/.code/config.toml for Claude/Gemini agents.
- Added model flags in ~/.code/config.toml (--model opus, --model gemini-3-pro).
- Claude direct CLI via wrapper scripts/run-subagent.ps1 → worked (Claude OK).
- Gemini direct CLI via wrapper → failed (ModelNotFoundError for gemini-3-pro).
- coder exec -c model_provider=gemini → failed (provider not found in Code CLI).
- Internal /code via coder exec --auto → still GPT; no Claude/Gemini dispatch.