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
7 changes: 2 additions & 5 deletions packages/types/src/providers/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,15 @@ export const anthropicModels = {
description: "Claude Opus 5 is Anthropic's most capable model for complex agentic coding and enterprise work.",
},
"claude-opus-5-5": {
maxTokens: 128_000, // Overridden to 8k if `enableReasoningEffort` is false.
maxTokens: 128_000,
contextWindow: 1_000_000, // 1M context window native (no beta header required)
supportsImages: true,
supportsPromptCache: true,
inputPrice: 4.0, // $4 per million input tokens
outputPrice: 20.0, // $20 per million output tokens
cacheWritesPrice: 5.0, // $5 per million tokens
cacheReadsPrice: 0.2, // $0.20 per million tokens
// Opus 5.5 keeps the Opus 5 adaptive-thinking / binary-toggle convention on
// the direct Anthropic provider path: manual budget_tokens and non-default
// sampling parameters return a 400.
supportsReasoningBudget: true,
// Opus 5.5 always uses adaptive thinking and rejects manual budget_tokens.
supportsReasoningBinary: true,
supportsTemperature: false,
description:
Expand Down
7 changes: 3 additions & 4 deletions src/api/providers/__tests__/anthropic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,6 @@ describe("AnthropicHandler", () => {
apiKey: "test-api-key",
apiModelId: "claude-opus-5-5",
enableReasoningEffort: true,
modelMaxTokens: 32768,
})

const stream = opusHandler.createMessage(systemPrompt, [
Expand All @@ -502,7 +501,7 @@ describe("AnthropicHandler", () => {
const requestOptions = mockCreate.mock.calls[mockCreate.mock.calls.length - 1]?.[1]
expect(requestBody?.thinking).toEqual({ type: "adaptive" })
expect(requestBody?.temperature).toBeUndefined()
expect(requestBody?.max_tokens).toBe(32768)
expect(requestBody?.max_tokens).toBe(128_000)
expect(requestOptions?.headers?.["anthropic-beta"]).toContain("prompt-caching-2024-07-31")
})

Expand Down Expand Up @@ -755,9 +754,9 @@ describe("AnthropicHandler", () => {
expect(model.info.outputPrice).toBe(20.0)
expect(model.info.cacheWritesPrice).toBe(5.0)
expect(model.info.cacheReadsPrice).toBe(0.2)
expect(model.maxTokens).toBe(8192)
expect(model.maxTokens).toBe(128000)
expect(model.info.supportsReasoningBinary).toBe(true)
expect(model.info.supportsReasoningBudget).toBe(true)
expect(model.info.supportsReasoningBudget).toBeUndefined()
expect(model.info.supportsPromptCache).toBe(true)
expect(model.info.supportsTemperature).toBe(false)
expect(model.reasoningBudget).toBeUndefined()
Expand Down
Loading