Skip to content

Commit 4c94f3c

Browse files
authored
improvement(providers): audit and update all provider model definitions (#3893)
* improvement(providers): audit and update all provider model definitions * fix(providers): add maxOutputTokens to azure/o3 and azure/o4-mini * fix(providers): move maxOutputTokens inside capabilities for azure models
1 parent 27a11a2 commit 4c94f3c

File tree

3 files changed

+414
-305
lines changed

3 files changed

+414
-305
lines changed

apps/sim/providers/anthropic/core.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,24 @@ const THINKING_BUDGET_TOKENS: Record<string, number> = {
7777
}
7878

7979
/**
80-
* Checks if a model supports adaptive thinking (Opus 4.6+)
80+
* Checks if a model supports adaptive thinking (thinking.type: "adaptive").
81+
* Per the Anthropic API, only Opus 4.6 and Sonnet 4.6 support adaptive thinking.
82+
* Opus 4.5 supports effort but NOT adaptive thinking — it uses budget_tokens with type: "enabled".
8183
*/
8284
function supportsAdaptiveThinking(modelId: string): boolean {
8385
const normalizedModel = modelId.toLowerCase()
84-
return normalizedModel.includes('opus-4-6') || normalizedModel.includes('opus-4.6')
86+
return (
87+
normalizedModel.includes('opus-4-6') ||
88+
normalizedModel.includes('opus-4.6') ||
89+
normalizedModel.includes('sonnet-4-6') ||
90+
normalizedModel.includes('sonnet-4.6')
91+
)
8592
}
8693

8794
/**
8895
* Builds the thinking configuration for the Anthropic API based on model capabilities and level.
8996
*
90-
* - Opus 4.6: Uses adaptive thinking with effort parameter (recommended by Anthropic)
97+
* - Opus 4.6, Sonnet 4.6: Uses adaptive thinking with effort parameter
9198
* - Other models: Uses budget_tokens-based extended thinking
9299
*
93100
* Returns both the thinking config and optional output_config for adaptive thinking.
@@ -104,7 +111,7 @@ function buildThinkingConfig(
104111
return null
105112
}
106113

107-
// Opus 4.6 uses adaptive thinking with effort parameter
114+
// Models with effort support use adaptive thinking
108115
if (supportsAdaptiveThinking(modelId)) {
109116
return {
110117
thinking: { type: 'adaptive' },

0 commit comments

Comments
 (0)