Description
Starting the TUI with --model openai/gpt-5.4 shows Model openai/gpt-5.4 is not valid, even though the model is listed by opencode models openai and opencode models openai --refresh.
This looks like a TUI startup ordering bug: --model is applied before provider metadata finishes syncing, so local validation rejects a valid model. If the current agent already has its own configured model, the CLI-selected model can also be ignored/overridden instead of staying highest priority.
Possibly related to #17853, #9520, and #7948.
Plugins
No response
OpenCode version
1.4.11
Steps to reproduce
- Run
opencode models openai and confirm openai/gpt-5.4 is listed.
- Run
opencode models openai --refresh and confirm openai/gpt-5.4 is still listed.
- Start the TUI with
opencode --model openai/gpt-5.4.
- Observe that the TUI shows
Model openai/gpt-5.4 is not valid.
- If the current agent already has a configured model, submit a prompt and note that the agent model can win over the CLI-selected model.
Screenshot and/or share link
No response
Operating System
Linux 6.19.11-zen1-1-zen
Terminal
Ghostty
Description
Starting the TUI with
--model openai/gpt-5.4showsModel openai/gpt-5.4 is not valid, even though the model is listed byopencode models openaiandopencode models openai --refresh.This looks like a TUI startup ordering bug:
--modelis applied before provider metadata finishes syncing, so local validation rejects a valid model. If the current agent already has its own configured model, the CLI-selected model can also be ignored/overridden instead of staying highest priority.Possibly related to #17853, #9520, and #7948.
Plugins
No response
OpenCode version
1.4.11
Steps to reproduce
opencode models openaiand confirmopenai/gpt-5.4is listed.opencode models openai --refreshand confirmopenai/gpt-5.4is still listed.opencode --model openai/gpt-5.4.Model openai/gpt-5.4 is not valid.Screenshot and/or share link
No response
Operating System
Linux 6.19.11-zen1-1-zen
Terminal
Ghostty