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
Agent model validation fails with trailing slash for custom OpenAI-compatible provider models #12062
When using a custom provider model in agent configuration (plan/build/explore), the model validation fails because a trailing slash (/) is appended to the model name during validation.
Error message:
Agent plan's configured model my-custom-model/ is not valid
Note the trailing / at the end - my configuration does NOT include this slash.
Key observations:
The same model works perfectly when set as the top-level "model" config
The same model works when selected via /models command
Only fails when specified in agent.plan.model, agent.build.model, or agent.explore.model
Setting "model": "" in agent config works (falls back to top-level model)
This appears to be a validation bug where the model name string is being processed incorrectly for agent-level model configurations with custom OpenAI-compatible providers.
Expected behavior
Agent should use the configured model my-custom-model without appending a trailing slash.
Actual behavior
Model validation fails because a / is appended to the model name, making it my-custom-model/ which doesn't match any configured model.
Workaround
Set "model": "" in agent configuration to fallback to the top-level model:
These issues share similar patterns with agent-level model configuration failures, custom OpenAI-compatible provider handling, and model validation errors. Feel free to ignore if your specific case with the trailing slash appended to the model name is unique.
Activity
github-actions commentedon Feb 4, 2026
This issue might be a duplicate of existing issues. Please check:
These issues share similar patterns with agent-level model configuration failures, custom OpenAI-compatible provider handling, and model validation errors. Feel free to ignore if your specific case with the trailing slash appended to the model name is unique.
rekram1-node commentedon Feb 4, 2026
run
opencode modelsto see list of available models. It looks like you aren't properly configuring your model id. It needs a provider prefix:ex:
openai/gpt-5.2
mgscreativa commentedon Feb 27, 2026
This issue is real! Been hours with chatgpt and gemini to try to fix it but no luck at all.
Using latest opencode 1.2.15
Latest opencode.json created by gemini I'm using to test:
Wit it I get
Agent architect's configured model qwen-next-joomla:latest/ is not validollama list
github-actions commentedon Apr 29, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.