Skip to content
Open
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
18 changes: 18 additions & 0 deletions packages/types/src/providers/bedrock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ export const bedrockModels = {
minTokensPerCachePoint: 1024,
maxCachePoints: 4,
cachableFields: ["system", "messages", "tools"],
tiers: [
{
contextWindow: 1_000_000,
inputPrice: 6.0,
outputPrice: 22.5,
cacheWritesPrice: 7.5,
cacheReadsPrice: 0.6,
},
],
},
"amazon.nova-pro-v1:0": {
maxTokens: 5000,
Expand Down Expand Up @@ -90,6 +99,15 @@ export const bedrockModels = {
minTokensPerCachePoint: 1024,
maxCachePoints: 4,
cachableFields: ["system", "messages", "tools"],
tiers: [
{
contextWindow: 1_000_000,
inputPrice: 6.0,
outputPrice: 22.5,
cacheWritesPrice: 7.5,
cacheReadsPrice: 0.6,
},
],
},
"anthropic.claude-opus-4-1-20250805-v1:0": {
maxTokens: 8192,
Expand Down
84 changes: 32 additions & 52 deletions packages/types/src/providers/gemini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,24 +138,19 @@ export const geminiModels = {
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2.5, // This is the pricing for prompts above 200k tokens.
outputPrice: 15,
cacheReadsPrice: 0.625,
cacheWritesPrice: 4.5,
inputPrice: 1.25, // Base price for 200k tokens
outputPrice: 10,
cacheReadsPrice: 0.125,
cacheWritesPrice: 1.625,
maxThinkingTokens: 32_768,
supportsReasoningBudget: true,
tiers: [
{
contextWindow: 200_000,
inputPrice: 1.25,
outputPrice: 10,
cacheReadsPrice: 0.31,
},
{
contextWindow: Infinity,
inputPrice: 2.5,
contextWindow: 1_000_000,
inputPrice: 2.5, // >200k tokens
outputPrice: 15,
cacheReadsPrice: 0.625,
cacheReadsPrice: 0.25,
cacheWritesPrice: 2.875,
},
],
},
Expand All @@ -164,22 +159,17 @@ export const geminiModels = {
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2.5, // This is the pricing for prompts above 200k tokens.
outputPrice: 15,
cacheReadsPrice: 0.625,
cacheWritesPrice: 4.5,
inputPrice: 1.25, // Base price for 200k tokens
outputPrice: 10,
cacheReadsPrice: 0.125,
cacheWritesPrice: 1.625,
tiers: [
{
contextWindow: 200_000,
inputPrice: 1.25,
outputPrice: 10,
cacheReadsPrice: 0.31,
},
{
contextWindow: Infinity,
inputPrice: 2.5,
contextWindow: 1_000_000,
inputPrice: 2.5, // >200k tokens
outputPrice: 15,
cacheReadsPrice: 0.625,
cacheReadsPrice: 0.25,
cacheWritesPrice: 2.875,
},
],
},
Expand All @@ -188,24 +178,19 @@ export const geminiModels = {
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2.5, // This is the pricing for prompts above 200k tokens.
outputPrice: 15,
cacheReadsPrice: 0.625,
cacheWritesPrice: 4.5,
inputPrice: 1.25, // Base price for 200k tokens
outputPrice: 10,
cacheReadsPrice: 0.125,
cacheWritesPrice: 1.625,
maxThinkingTokens: 32_768,
supportsReasoningBudget: true,
tiers: [
{
contextWindow: 200_000,
inputPrice: 1.25,
outputPrice: 10,
cacheReadsPrice: 0.31,
},
{
contextWindow: Infinity,
inputPrice: 2.5,
contextWindow: 1_000_000,
inputPrice: 2.5, // >200k tokens
outputPrice: 15,
cacheReadsPrice: 0.625,
cacheReadsPrice: 0.25,
cacheWritesPrice: 2.875,
},
],
},
Expand All @@ -222,25 +207,20 @@ export const geminiModels = {
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2.5, // This is the pricing for prompts above 200k tokens.
outputPrice: 15,
cacheReadsPrice: 0.625,
cacheWritesPrice: 4.5,
inputPrice: 1.25, // Base price for 200k tokens
outputPrice: 10,
cacheReadsPrice: 0.125,
cacheWritesPrice: 1.625,
maxThinkingTokens: 32_768,
supportsReasoningBudget: true,
requiredReasoningBudget: true,
tiers: [
{
contextWindow: 200_000,
inputPrice: 1.25,
outputPrice: 10,
cacheReadsPrice: 0.31,
},
{
contextWindow: Infinity,
inputPrice: 2.5,
contextWindow: 1_000_000,
inputPrice: 2.5, // >200k tokens
outputPrice: 15,
cacheReadsPrice: 0.625,
cacheReadsPrice: 0.25,
cacheWritesPrice: 2.875,
},
],
},
Expand Down
89 changes: 73 additions & 16 deletions packages/types/src/providers/vertex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,49 +61,79 @@ export const vertexModels = {
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2.5,
outputPrice: 15,
inputPrice: 1.25,
outputPrice: 10,
cacheReadsPrice: 0.125,
cacheWritesPrice: 1.625,
tiers: [
{
contextWindow: 1_000_000,
inputPrice: 2.5,
outputPrice: 15,
cacheReadsPrice: 0.25,
cacheWritesPrice: 2.875,
},
],
},
"gemini-2.5-pro-preview-05-06": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2.5,
outputPrice: 15,
inputPrice: 1.25,
outputPrice: 10,
cacheReadsPrice: 0.125,
cacheWritesPrice: 1.625,
tiers: [
{
contextWindow: 1_000_000,
inputPrice: 2.5,
outputPrice: 15,
cacheReadsPrice: 0.25,
cacheWritesPrice: 2.875,
},
],
},
"gemini-2.5-pro-preview-06-05": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2.5,
outputPrice: 15,
inputPrice: 1.25,
outputPrice: 10,
cacheReadsPrice: 0.125,
cacheWritesPrice: 1.625,
maxThinkingTokens: 32_768,
supportsReasoningBudget: true,
tiers: [
{
contextWindow: 1_000_000,
inputPrice: 2.5,
outputPrice: 15,
cacheReadsPrice: 0.25,
cacheWritesPrice: 2.875,
},
],
},
"gemini-2.5-pro": {
maxTokens: 64_000,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2.5,
outputPrice: 15,
inputPrice: 1.25,
outputPrice: 10,
cacheReadsPrice: 0.125,
cacheWritesPrice: 1.625,
maxThinkingTokens: 32_768,
supportsReasoningBudget: true,
requiredReasoningBudget: true,
tiers: [
{
contextWindow: 200_000,
inputPrice: 1.25,
outputPrice: 10,
cacheReadsPrice: 0.31,
},
{
contextWindow: Infinity,
contextWindow: 1_000_000,
inputPrice: 2.5,
outputPrice: 15,
cacheReadsPrice: 0.625,
cacheReadsPrice: 0.25,
cacheWritesPrice: 2.875,
},
],
},
Expand Down Expand Up @@ -173,6 +203,15 @@ export const vertexModels = {
cacheWritesPrice: 3.75,
cacheReadsPrice: 0.3,
supportsReasoningBudget: true,
tiers: [
{
contextWindow: 1_000_000,
inputPrice: 6.0,
outputPrice: 22.5,
cacheWritesPrice: 7.5,
cacheReadsPrice: 0.6,
},
],
},
"claude-sonnet-4-5@20250929": {
maxTokens: 8192,
Expand All @@ -184,6 +223,15 @@ export const vertexModels = {
cacheWritesPrice: 3.75,
cacheReadsPrice: 0.3,
supportsReasoningBudget: true,
tiers: [
{
contextWindow: 1_000_000,
inputPrice: 6.0,
outputPrice: 22.5,
cacheWritesPrice: 7.5,
cacheReadsPrice: 0.6,
},
],
},
"claude-haiku-4-5@20251001": {
maxTokens: 8192,
Expand Down Expand Up @@ -216,6 +264,15 @@ export const vertexModels = {
outputPrice: 75.0,
cacheWritesPrice: 18.75,
cacheReadsPrice: 1.5,
tiers: [
{
contextWindow: 1_000_000,
inputPrice: 30.0,
outputPrice: 112.5,
cacheWritesPrice: 37.5,
cacheReadsPrice: 3.0,
},
],
},
"claude-3-7-sonnet@20250219:thinking": {
maxTokens: 64_000,
Expand Down
22 changes: 20 additions & 2 deletions src/api/providers/fetchers/__tests__/openrouter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,19 @@ describe("OpenRouter API", () => {
inputPrice: 1.25,
outputPrice: 10,
cacheWritesPrice: 1.625,
cacheReadsPrice: 0.31,
cacheReadsPrice: 0.125,
description: undefined,
supportsReasoningEffort: undefined,
supportedParameters: undefined,
tiers: [
{
contextWindow: 1_000_000,
inputPrice: 2.5,
outputPrice: 15,
cacheReadsPrice: 0.25,
cacheWritesPrice: 2.875,
},
],
},
"google-ai-studio": {
maxTokens: 65536,
Expand All @@ -107,10 +116,19 @@ describe("OpenRouter API", () => {
inputPrice: 1.25,
outputPrice: 10,
cacheWritesPrice: 1.625,
cacheReadsPrice: 0.31,
cacheReadsPrice: 0.125,
description: undefined,
supportsReasoningEffort: undefined,
supportedParameters: undefined,
tiers: [
{
contextWindow: 1_000_000,
inputPrice: 2.5,
outputPrice: 15,
cacheReadsPrice: 0.25,
cacheWritesPrice: 2.875,
},
],
},
})

Expand Down
Loading