Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions packages/opencode/src/provider/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -755,11 +755,13 @@ export namespace ProviderTransform {
}

if (input.model.api.npm === "@ai-sdk/google" || input.model.api.npm === "@ai-sdk/google-vertex") {
result["thinkingConfig"] = {
includeThoughts: true,
}
if (input.model.api.id.includes("gemini-3")) {
result["thinkingConfig"]["thinkingLevel"] = "high"
if (input.model.capabilities.reasoning) {
result["thinkingConfig"] = {
includeThoughts: true,
}
if (input.model.api.id.includes("gemini-3")) {
result["thinkingConfig"]["thinkingLevel"] = "high"
}
}
Comment on lines 757 to 765
Copy link

Copilot AI Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add unit coverage for this new gating to prevent regressions: ProviderTransform.options should NOT set thinkingConfig for Google/Vertex models when model.capabilities.reasoning is false (e.g. gemini-2.0-flash), and should set it when reasoning is true. There are existing ProviderTransform.options tests in packages/opencode/test/provider/transform.test.ts, but none currently assert this Google/Vertex behavior.

Copilot uses AI. Check for mistakes.
}

Expand Down
Loading