chore: generate

This commit is contained in:
opencode-agent[bot]
2026-01-31 01:32:46 +00:00
parent 0c32afbc35
commit 252b2c450d
2 changed files with 34 additions and 8 deletions

View File

@@ -683,13 +683,19 @@ export namespace ProviderTransform {
// Handle thinking mode for @ai-sdk/anthropic, @ai-sdk/google-vertex/anthropic (budgetTokens)
// and @ai-sdk/openai-compatible with Claude (budget_tokens)
if (npm === "@ai-sdk/anthropic" || npm === "@ai-sdk/google-vertex/anthropic" || npm === "@ai-sdk/openai-compatible") {
if (
npm === "@ai-sdk/anthropic" ||
npm === "@ai-sdk/google-vertex/anthropic" ||
npm === "@ai-sdk/openai-compatible"
) {
const thinking = options?.["thinking"]
// Support both camelCase (for @ai-sdk/anthropic) and snake_case (for openai-compatible)
const budgetTokens =
typeof thinking?.["budgetTokens"] === "number" ? thinking["budgetTokens"] :
typeof thinking?.["budget_tokens"] === "number" ? thinking["budget_tokens"] :
0
typeof thinking?.["budgetTokens"] === "number"
? thinking["budgetTokens"]
: typeof thinking?.["budget_tokens"] === "number"
? thinking["budget_tokens"]
: 0
const enabled = thinking?.["type"] === "enabled"
if (enabled && budgetTokens > 0) {
// Return text tokens so that text + thinking <= model cap, preferring 32k text when possible.