Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 4 additions & 2 deletions apps/sim/providers/anthropic/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,15 @@ const THINKING_BUDGET_TOKENS: Record<string, number> = {

/**
* Checks if a model supports adaptive thinking (thinking.type: "adaptive").
* Opus 4.7 supports ONLY adaptive thinking (no extended thinking / budget_tokens).
* Opus 4.8 and Opus 4.7 support ONLY adaptive thinking (no extended thinking / budget_tokens).
* Opus 4.6 and Sonnet 4.6 support both extended and adaptive thinking — use adaptive.
* Opus 4.5 supports effort but NOT adaptive thinking — it uses budget_tokens with type: "enabled".
*/
function supportsAdaptiveThinking(modelId: string): boolean {
const normalizedModel = modelId.toLowerCase()
return (
normalizedModel.includes('opus-4-8') ||
normalizedModel.includes('opus-4.8') ||
normalizedModel.includes('opus-4-7') ||
normalizedModel.includes('opus-4.7') ||
normalizedModel.includes('opus-4-6') ||
Expand All @@ -101,7 +103,7 @@ function supportsAdaptiveThinking(modelId: string): boolean {
/**
* Builds the thinking configuration for the Anthropic API based on model capabilities and level.
*
* - Opus 4.7: Uses adaptive thinking only (no extended thinking support)
* - Opus 4.8, Opus 4.7: Uses adaptive thinking only (no extended thinking support)
* - Opus 4.6, Sonnet 4.6: Uses adaptive thinking with effort parameter
Comment thread
waleedlatif1 marked this conversation as resolved.
* - Other models: Uses budget_tokens-based extended thinking
*
Expand Down
21 changes: 20 additions & 1 deletion apps/sim/providers/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,26 @@ export const PROVIDER_DEFINITIONS: Record<string, ProviderDefinition> = {
toolUsageControl: true,
},
models: [
{
id: 'claude-opus-4-8',
pricing: {
input: 5.0,
cachedInput: 0.5,
output: 25.0,
updatedAt: '2026-05-28',
},
capabilities: {
nativeStructuredOutputs: true,
maxOutputTokens: 128000,
thinking: {
levels: ['low', 'medium', 'high', 'xhigh', 'max'],
default: 'high',
},
},
contextWindow: 1000000,
releaseDate: '2026-05-27',
recommended: true,
},
{
id: 'claude-opus-4-7',
pricing: {
Expand All @@ -600,7 +620,6 @@ export const PROVIDER_DEFINITIONS: Record<string, ProviderDefinition> = {
},
contextWindow: 1000000,
releaseDate: '2026-04-16',
recommended: true,
},
{
id: 'claude-opus-4-6',
Expand Down
Loading