Skip to content
17 changes: 17 additions & 0 deletions packages/types/src/providers/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,23 @@ export const anthropicModels = {
supportsTemperature: false,
description: "Claude Opus 5 is Anthropic's most capable model for complex agentic coding and enterprise work.",
},
"claude-fable-5-1": {
maxTokens: 128_000, // Overridden to 8k if `enableReasoningEffort` is false.
contextWindow: 1_000_000,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 10.0, // $10 per million input tokens
outputPrice: 50.0, // $50 per million output tokens
cacheWritesPrice: 12.5, // $12.50 per million tokens (5-minute cache)
cacheReadsPrice: 0.25, // $0.25 per million tokens (2.5% of base input price)
// Fable 5.1 only accepts adaptive thinking (or an omitted thinking field).
// Manual budget_tokens and non-default sampling parameters return a 400.
supportsReasoningBudget: true,
supportsReasoningBinary: true,
supportsTemperature: false,
description:
"Claude Fable 5.1 extends Fable 5 with stronger long-running agentic coding, multistep research, and document work.",
},
"claude-fable-5": {
maxTokens: 128_000, // Overridden to 8k if `enableReasoningEffort` is false.
contextWindow: 1_000_000,
Expand Down
21 changes: 20 additions & 1 deletion packages/types/src/providers/bedrock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,24 @@ export const bedrockModels = {
cachableFields: ["system", "messages", "tools"],
description: "Claude Opus 5 is Anthropic's most capable model for complex agentic coding and enterprise work.",
},
"anthropic.claude-fable-5-1": {
maxTokens: 128_000,
contextWindow: 1_000_000,
supportsImages: true,
supportsPromptCache: true,
supportsReasoningBudget: true,
supportsReasoningBinary: true,
supportsTemperature: false,
inputPrice: 10.0,
outputPrice: 50.0,
cacheWritesPrice: 12.5,
cacheReadsPrice: 0.25,
minTokensPerCachePoint: 512,
maxCachePoints: 4,
cachableFields: ["system", "messages", "tools"],
description:
"Claude Fable 5.1 extends Fable 5 with stronger long-running agentic coding, multistep research, and document work.",
},
"anthropic.claude-fable-5": {
maxTokens: 8192,
contextWindow: 1_000_000,
Expand Down Expand Up @@ -643,7 +661,7 @@ export const BEDROCK_1M_CONTEXT_MODEL_IDS = [
// - Claude Opus 4.6
// - Claude Opus 4.7
// - Claude Opus 5
// - Claude Fable 5 (cross-region inference only — can only be used through an inference profile)
// - Claude Fable 5 and 5.1 (cross-region inference only — can only be used through an inference profile)
export const BEDROCK_GLOBAL_INFERENCE_MODEL_IDS = [
"anthropic.claude-sonnet-4-20250514-v1:0",
"anthropic.claude-sonnet-4-5-20250929-v1:0",
Expand All @@ -655,6 +673,7 @@ export const BEDROCK_GLOBAL_INFERENCE_MODEL_IDS = [
"anthropic.claude-opus-4-7",
"anthropic.claude-opus-4-8",
"anthropic.claude-opus-5",
"anthropic.claude-fable-5-1",
"anthropic.claude-fable-5",
] as const

Expand Down
2 changes: 2 additions & 0 deletions packages/types/src/providers/openrouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const OPEN_ROUTER_PROMPT_CACHING_MODELS = new Set([
"anthropic/claude-opus-4.5",
"anthropic/claude-opus-4.6",
"anthropic/claude-opus-5",
"anthropic/claude-fable-5.1",
"anthropic/claude-fable-5",
"anthropic/claude-haiku-4.5",
"google/gemini-2.5-flash-preview",
Expand Down Expand Up @@ -78,6 +79,7 @@ export const OPEN_ROUTER_REASONING_BUDGET_MODELS = new Set([
"anthropic/claude-opus-4.5",
"anthropic/claude-opus-4.6",
"anthropic/claude-opus-5",
"anthropic/claude-fable-5.1",
"anthropic/claude-fable-5",
"anthropic/claude-sonnet-4",
"anthropic/claude-sonnet-4.5",
Expand Down
2 changes: 2 additions & 0 deletions packages/types/src/providers/vercel-ai-gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const VERCEL_AI_GATEWAY_PROMPT_CACHING_MODELS = new Set([
"anthropic/claude-opus-4.5",
"anthropic/claude-opus-4.6",
"anthropic/claude-opus-5",
"anthropic/claude-fable-5.1",
"anthropic/claude-fable-5",
"anthropic/claude-sonnet-4",
"anthropic/claude-sonnet-4.6",
Expand Down Expand Up @@ -60,6 +61,7 @@ export const VERCEL_AI_GATEWAY_VISION_AND_TOOLS_MODELS = new Set([
"anthropic/claude-opus-4.5",
"anthropic/claude-opus-4.6",
"anthropic/claude-opus-5",
"anthropic/claude-fable-5.1",
"anthropic/claude-fable-5",
"anthropic/claude-sonnet-4",
"anthropic/claude-sonnet-4.5",
Expand Down
15 changes: 15 additions & 0 deletions packages/types/src/providers/vertex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,21 @@ export const vertexModels = {
supportsTemperature: false,
description: "Claude Opus 5 is Anthropic's most capable model for complex agentic coding and enterprise work.",
},
"claude-fable-5-1": {
maxTokens: 128_000,
contextWindow: 1_000_000,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 10.0,
outputPrice: 50.0,
cacheWritesPrice: 12.5,
cacheReadsPrice: 0.25,
supportsReasoningBudget: true,
supportsReasoningBinary: true,
supportsTemperature: false,
description:
"Claude Fable 5.1 extends Fable 5 with stronger long-running agentic coding, multistep research, and document work.",
},
"claude-fable-5": {
maxTokens: 8192,
contextWindow: 1_000_000,
Expand Down
49 changes: 49 additions & 0 deletions src/api/providers/__tests__/anthropic-vertex.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,24 @@ describe("VertexHandler", () => {
expect(model.info.supportsTemperature).toBe(false)
})

it("should return Claude Fable 5.1 model info", () => {
const handler = new AnthropicVertexHandler({
apiModelId: "claude-fable-5-1",
vertexProjectId: "test-project",
vertexRegion: "us-central1",
})

const model = handler.getModel()
expect(model.id).toBe("claude-fable-5-1")
expect(model.info.maxTokens).toBe(128_000)
expect(model.info.contextWindow).toBe(1_000_000)
expect(model.info.cacheReadsPrice).toBe(0.25)
expect(model.info.supportsReasoningBinary).toBe(true)
expect(model.info.supportsReasoningBudget).toBe(true)
expect(model.info.supportsPromptCache).toBe(true)
expect(model.info.supportsTemperature).toBe(false)
})

it("should return Claude Sonnet 5 model info", () => {
const handler = new AnthropicVertexHandler({
apiModelId: "claude-sonnet-5",
Expand Down Expand Up @@ -1266,6 +1284,37 @@ describe("VertexHandler", () => {
enableReasoningEffort: true,
})

const mockCreate = vitest
.fn()
.mockImplementation(async () =>
asyncStreamFrom([
{ type: "message_start", message: { usage: { input_tokens: 10, output_tokens: 5 } } },
]),
)
fableHandler["client"].messages.create = mockCreate

await fableHandler.createMessage("You are a helpful assistant", [{ role: "user", content: "Hello" }]).next()

expect(mockCreate).toHaveBeenCalledWith(
expect.objectContaining({
thinking: { type: "adaptive" },
}),
undefined,
)

const request = mockCreate.mock.calls[0][0]
expect(request.thinking).not.toHaveProperty("budget_tokens")
expect(request.temperature).toBeUndefined()
})

it("should use adaptive thinking for Claude Fable 5.1", async () => {
const fableHandler = new AnthropicVertexHandler({
apiModelId: "claude-fable-5-1",
vertexProjectId: "test-project",
vertexRegion: "us-central1",
enableReasoningEffort: true,
})

const mockCreate = vitest
.fn()
.mockImplementation(async () =>
Expand Down
Loading
Loading