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
136 changes: 136 additions & 0 deletions packages/cost/models/authors/anthropic/claude-4.6-sonnet/endpoints.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
import { ModelProviderName } from "../../../providers";
import type { ModelProviderConfig } from "../../../types";
import { ClaudeSonnet46ModelName } from "./model";

export const endpoints = {
"claude-4.6-sonnet:anthropic": {
providerModelId: "claude-sonnet-4-6",
provider: "anthropic",
author: "anthropic",
pricing: [
{
threshold: 0,
input: 0.000003, // $3 / MTok
output: 0.000015, // $15 / MTok
web_search: 0.01, // $10 per 1000 searches (1:1 USD; 10/1K)
cacheMultipliers: {
cachedInput: 0.1, // $0.30 / MTok (10% of $3)
write5m: 1.25, // $3.75 / MTok (125% of $3)
write1h: 2.0, // $6.00 / MTok (200% of $3)
},
},
{
threshold: 200000,
input: 0.000006, // $6 / MTok
output: 0.0000225, // $22.50 / MTok
},
],
contextLength: 1000000,
maxCompletionTokens: 64000,
supportedParameters: [
"max_tokens",
"temperature",
"stop",
"reasoning",
"include_reasoning",
"tools",
"tool_choice",
],
supportedPlugins: ["web"],
ptbEnabled: true,
responseFormat: "ANTHROPIC",
endpointConfigs: {
"*": {},
},
},

"claude-4.6-sonnet:vertex": {
providerModelId: "claude-sonnet-4-6@20260217", // Vertex uses dated format
provider: "vertex",
author: "anthropic",
ptbEnabled: true,
crossRegion: true,
pricing: [
{
threshold: 0,
input: 0.000003, // $3 / MTok
output: 0.000015, // $15 / MTok
web_search: 0.01, // $10 per 1000 searches (1:1 USD; 10/1K)
cacheMultipliers: {
cachedInput: 0.1, // $0.30 / MTok (10% of $3)
write5m: 1.25, // $3.75 / MTok (125% of $3)
},
},
{
threshold: 200000,
input: 0.000006, // $6 / MTok
output: 0.0000225, // $22.50 / MTok
},
],
contextLength: 1000000,
maxCompletionTokens: 64000,
supportedParameters: [
"max_tokens",
"temperature",
"stop",
"reasoning",
"include_reasoning",
"tools",
"tool_choice",
],
responseFormat: "ANTHROPIC",
endpointConfigs: {
global: {
providerModelId: "claude-sonnet-4-6@20260217",
},
},
},

"claude-4.6-sonnet:bedrock": {
provider: "bedrock",
author: "anthropic",
providerModelId: "anthropic.claude-sonnet-4-6-20260217-v1:0",
version: "20260217",
crossRegion: true,
pricing: [
{
threshold: 0,
input: 0.000003, // $3 / MTok
output: 0.000015, // $15 / MTok
web_search: 0.01, // $10 per 1000 searches (1:1 USD; 10/1K)
cacheMultipliers: {
cachedInput: 0.1, // $0.30 / MTok (10% of $3)
write5m: 1.25, // $3.75 / MTok (125% of $3)
},
},
{
threshold: 200000,
input: 0.000006, // $6 / MTok
output: 0.0000225, // $22.50 / MTok
},
],
contextLength: 1000000,
maxCompletionTokens: 64000,
supportedParameters: [
"max_tokens",
"temperature",
"stop",
"reasoning",
"include_reasoning",
"tools",
"tool_choice",
"top_p",
"top_k",
],
ptbEnabled: true,
responseFormat: "ANTHROPIC",
endpointConfigs: {
"us-east-1": {},
},
},
} satisfies Partial<
Record<
`${ClaudeSonnet46ModelName}:${ModelProviderName}`,
ModelProviderConfig
>
>;
17 changes: 17 additions & 0 deletions packages/cost/models/authors/anthropic/claude-4.6-sonnet/model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { ModelConfig } from "../../../types";

export const models = {
"claude-4.6-sonnet": {
name: "Anthropic: Claude Sonnet 4.6",
author: "anthropic",
description:
"Claude Sonnet 4.6 is Anthropic's most capable Sonnet model, released February 2026. Features near-Opus-level intelligence at Sonnet pricing, with a 1M context window, improved coding, computer use, and agentic capabilities. API model name: claude-sonnet-4-6",
contextLength: 1000000,
maxOutputTokens: 64000,
created: "2026-02-17T00:00:00.000Z",
modality: { inputs: ["text", "image"], outputs: ["text"] },
tokenizer: "Claude",
},
} satisfies Record<string, ModelConfig>;

export type ClaudeSonnet46ModelName = keyof typeof models;
4 changes: 4 additions & 0 deletions packages/cost/models/authors/anthropic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { models as claudeHaiku4520251001Models } from "./claude-haiku-4-5-202510
import { models as claudeOpus4120250805Models } from "./claude-opus-4-1-20250805/model";
import { models as claudeOpus45Models } from "./claude-4.5-opus/model";
import { models as claudeOpus46Models } from "./claude-4.6-opus/model";
import { models as claudeSonnet46Models } from "./claude-4.6-sonnet/model";

// Import endpoints
import { endpoints as claudeOpus41Endpoints } from "./claude-opus-4-1/endpoints";
Expand All @@ -36,6 +37,7 @@ import { endpoints as claudeHaiku4520251001Endpoints } from "./claude-haiku-4-5-
import { endpoints as claudeOpus4120250805Endpoints } from "./claude-opus-4-1-20250805/endpoints";
import { endpoints as claudeOpus45Endpoints } from "./claude-4.5-opus/endpoints";
import { endpoints as claudeOpus46Endpoints } from "./claude-4.6-opus/endpoints";
import { endpoints as claudeSonnet46Endpoints } from "./claude-4.6-sonnet/endpoints";

// Aggregate models
export const anthropicModels = {
Expand All @@ -53,6 +55,7 @@ export const anthropicModels = {
...claudeOpus4120250805Models,
...claudeOpus45Models,
...claudeOpus46Models,
...claudeSonnet46Models,
} satisfies Record<string, ModelConfig>;

// Aggregate endpoints
Expand All @@ -71,4 +74,5 @@ export const anthropicEndpointConfig = {
...claudeOpus4120250805Endpoints,
...claudeOpus45Endpoints,
...claudeOpus46Endpoints,
...claudeSonnet46Endpoints,
} satisfies Record<string, ModelProviderConfig>;
14 changes: 14 additions & 0 deletions packages/cost/providers/anthropic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,20 @@ export const costs: ModelRow[] = [
prompt_cache_creation_1h: 0.000006, // $6 / MTok
},
},
{
model: {
operator: "equals",
value: "claude-sonnet-4-6",
},
cost: {
prompt_token: 0.000003, // $3 / MTok
completion_token: 0.000015, // $15 / MTok
prompt_cache_write_token: 0.00000375, // 5m cache write: $3.75 / MTok
prompt_cache_read_token: 0.0000003, // Cache hits/refreshes: $0.30 / MTok
prompt_cache_creation_5m: 0.00000375, // $3.75 / MTok
prompt_cache_creation_1h: 0.000006, // $6 / MTok
},
},
{
model: {
operator: "equals",
Expand Down
21 changes: 21 additions & 0 deletions packages/cost/unified/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,27 @@ export const modelMapping: CreatorModelMapping = {
},
],
},
"Claude Sonnet 4.6": {
defaultTokenCost: {
input: 0,
output: 0,
},
defaultParameters: {
max_tokens: 8192,
stop: [],
response_format: false,
},
providers: [
{
provider: "ANTHROPIC",
modelString: "claude-sonnet-4-6",
},
{
provider: "BEDROCK",
modelString: "anthropic.claude-sonnet-4-6-20260217-v1:0",
},
],
},
},
Google: {
"Gemini 2.0 Flash": {
Expand Down
2 changes: 2 additions & 0 deletions valhalla/jawn/src/lib/handlers/StripeIntegrationHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const AVAILABLE_MODELS_IN_STRIPE = [
"anthropic/claude-opus-4-1",
"anthropic/claude-sonnet-4",
"anthropic/claude-sonnet-4-above200k",
"anthropic/claude-sonnet-4-6",
"anthropic/claude-sonnet-4-6-above200k",
"google/gemini-2.0-flash",
"google/gemini-2.0-flash-lite",
"google/gemini-2.5-flash",
Expand Down
Loading