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
When using @ai-sdk/google-vertex as the provider, OpenCode unconditionally adds thinkingConfig: { includeThoughts: true } to every request, regardless of whether the selected model supports thinking. This causes a Vertex AI 400 error for models that don't support it:
Unable to submit request because Thinking_config.include_thoughts is only enabled when thinking is enabled.
This block runs for every Gemini model on Google/Vertex, with no check for whether the model's capabilities.reasoning is true. So gemini-2.0-flash, gemini-2.5-flash-lite, and any other non-thinking model all get includeThoughts: true injected — which Vertex rejects.
Any Gemini model without capabilities.reasoning = true
Working models (not affected)
gemini-2.5-pro (has capabilities.reasoning, thinking works fine)
Note on smallOptions()
The smallOptions() function handles the google providerID correctly (sends thinkingBudget: 0 to suppress thinking), but this fix is never applied to Vertex because smallOptions() only checks model.providerID === "google", not @ai-sdk/google-vertex.
Plugins
N/A
OpenCode version
1.2.10
Steps to reproduce
Configure OpenCode with Google Vertex AI provider + service account (GOOGLE_APPLICATION_CREDENTIALS)
Select any non-thinking model: gemini-2.0-flash, gemini-2.5-flash-lite-preview-0514, etc.
Send any message
→ Vertex returns 400: Thinking_config.include_thoughts is only enabled when thinking is enabled
Activity