mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
* Added Gemini 2.5 Pro model to Vertex AI Provider * Adds Gemini 2.5 Pro preview model Adds configuration for the new Gemini 2.5 Pro preview model, including its token limits, context window size, image support, and pricing information.
929 lines
26 KiB
TypeScript
929 lines
26 KiB
TypeScript
import { ModelInfo, ProviderName, ProviderSettings } from "../schemas"
|
|
|
|
export type { ModelInfo, ProviderName as ApiProvider }
|
|
|
|
export type ApiHandlerOptions = Omit<ProviderSettings, "apiProvider" | "id">
|
|
|
|
export type ApiConfiguration = ProviderSettings
|
|
|
|
// Anthropic
|
|
// https://docs.anthropic.com/en/docs/about-claude/models
|
|
export type AnthropicModelId = keyof typeof anthropicModels
|
|
export const anthropicDefaultModelId: AnthropicModelId = "claude-3-7-sonnet-20250219"
|
|
export const anthropicModels = {
|
|
"claude-3-7-sonnet-20250219:thinking": {
|
|
maxTokens: 128_000,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsComputerUse: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 3.0, // $3 per million input tokens
|
|
outputPrice: 15.0, // $15 per million output tokens
|
|
cacheWritesPrice: 3.75, // $3.75 per million tokens
|
|
cacheReadsPrice: 0.3, // $0.30 per million tokens
|
|
thinking: true,
|
|
},
|
|
"claude-3-7-sonnet-20250219": {
|
|
maxTokens: 8192,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsComputerUse: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 3.0, // $3 per million input tokens
|
|
outputPrice: 15.0, // $15 per million output tokens
|
|
cacheWritesPrice: 3.75, // $3.75 per million tokens
|
|
cacheReadsPrice: 0.3, // $0.30 per million tokens
|
|
thinking: false,
|
|
},
|
|
"claude-3-5-sonnet-20241022": {
|
|
maxTokens: 8192,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsComputerUse: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 3.0, // $3 per million input tokens
|
|
outputPrice: 15.0, // $15 per million output tokens
|
|
cacheWritesPrice: 3.75, // $3.75 per million tokens
|
|
cacheReadsPrice: 0.3, // $0.30 per million tokens
|
|
},
|
|
"claude-3-5-haiku-20241022": {
|
|
maxTokens: 8192,
|
|
contextWindow: 200_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: true,
|
|
inputPrice: 1.0,
|
|
outputPrice: 5.0,
|
|
cacheWritesPrice: 1.25,
|
|
cacheReadsPrice: 0.1,
|
|
},
|
|
"claude-3-opus-20240229": {
|
|
maxTokens: 4096,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 15.0,
|
|
outputPrice: 75.0,
|
|
cacheWritesPrice: 18.75,
|
|
cacheReadsPrice: 1.5,
|
|
},
|
|
"claude-3-haiku-20240307": {
|
|
maxTokens: 4096,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 0.25,
|
|
outputPrice: 1.25,
|
|
cacheWritesPrice: 0.3,
|
|
cacheReadsPrice: 0.03,
|
|
},
|
|
} as const satisfies Record<string, ModelInfo> // as const assertion makes the object deeply readonly
|
|
|
|
// AWS Bedrock
|
|
// https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html
|
|
export interface MessageContent {
|
|
type: "text" | "image" | "video" | "tool_use" | "tool_result"
|
|
text?: string
|
|
source?: {
|
|
type: "base64"
|
|
data: string | Uint8Array // string for Anthropic, Uint8Array for Bedrock
|
|
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp"
|
|
}
|
|
// Video specific fields
|
|
format?: string
|
|
s3Location?: {
|
|
uri: string
|
|
bucketOwner?: string
|
|
}
|
|
// Tool use and result fields
|
|
toolUseId?: string
|
|
name?: string
|
|
input?: any
|
|
output?: any // Used for tool_result type
|
|
}
|
|
|
|
export type BedrockModelId = keyof typeof bedrockModels
|
|
export const bedrockDefaultModelId: BedrockModelId = "anthropic.claude-3-7-sonnet-20250219-v1:0"
|
|
export const bedrockDefaultPromptRouterModelId: BedrockModelId = "anthropic.claude-3-sonnet-20240229-v1:0"
|
|
|
|
// March, 12 2025 - updated prices to match US-West-2 list price shown at https://aws.amazon.com/bedrock/pricing/
|
|
// including older models that are part of the default prompt routers AWS enabled for GA of the promot router feature
|
|
export const bedrockModels = {
|
|
"amazon.nova-pro-v1:0": {
|
|
maxTokens: 5000,
|
|
contextWindow: 300_000,
|
|
supportsImages: true,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: true,
|
|
inputPrice: 0.8,
|
|
outputPrice: 3.2,
|
|
cacheWritesPrice: 0.8, // per million tokens
|
|
cacheReadsPrice: 0.2, // per million tokens
|
|
minTokensPerCachePoint: 1,
|
|
maxCachePoints: 1,
|
|
cachableFields: ["system"],
|
|
},
|
|
"amazon.nova-pro-latency-optimized-v1:0": {
|
|
maxTokens: 5000,
|
|
contextWindow: 300_000,
|
|
supportsImages: true,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 1.0,
|
|
outputPrice: 4.0,
|
|
cacheWritesPrice: 1.0, // per million tokens
|
|
cacheReadsPrice: 0.25, // per million tokens
|
|
description: "Amazon Nova Pro with latency optimized inference",
|
|
},
|
|
"amazon.nova-lite-v1:0": {
|
|
maxTokens: 5000,
|
|
contextWindow: 300_000,
|
|
supportsImages: true,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: true,
|
|
inputPrice: 0.06,
|
|
outputPrice: 0.24,
|
|
cacheWritesPrice: 0.06, // per million tokens
|
|
cacheReadsPrice: 0.015, // per million tokens
|
|
minTokensPerCachePoint: 1,
|
|
maxCachePoints: 1,
|
|
cachableFields: ["system"],
|
|
},
|
|
"amazon.nova-micro-v1:0": {
|
|
maxTokens: 5000,
|
|
contextWindow: 128_000,
|
|
supportsImages: false,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: true,
|
|
inputPrice: 0.035,
|
|
outputPrice: 0.14,
|
|
cacheWritesPrice: 0.035, // per million tokens
|
|
cacheReadsPrice: 0.00875, // per million tokens
|
|
minTokensPerCachePoint: 1,
|
|
maxCachePoints: 1,
|
|
cachableFields: ["system"],
|
|
},
|
|
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
|
maxTokens: 8192,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsComputerUse: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 3.0,
|
|
outputPrice: 15.0,
|
|
cacheWritesPrice: 3.75,
|
|
cacheReadsPrice: 0.3,
|
|
minTokensPerCachePoint: 1024,
|
|
maxCachePoints: 4,
|
|
cachableFields: ["system", "messages", "tools"],
|
|
},
|
|
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
|
maxTokens: 8192,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsComputerUse: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 3.0,
|
|
outputPrice: 15.0,
|
|
cacheWritesPrice: 3.75,
|
|
cacheReadsPrice: 0.3,
|
|
minTokensPerCachePoint: 1024,
|
|
maxCachePoints: 4,
|
|
cachableFields: ["system", "messages", "tools"],
|
|
},
|
|
"anthropic.claude-3-5-haiku-20241022-v1:0": {
|
|
maxTokens: 8192,
|
|
contextWindow: 200_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: true,
|
|
inputPrice: 0.8,
|
|
outputPrice: 4.0,
|
|
cacheWritesPrice: 1.0,
|
|
cacheReadsPrice: 0.08,
|
|
minTokensPerCachePoint: 2048,
|
|
maxCachePoints: 4,
|
|
cachableFields: ["system", "messages", "tools"],
|
|
},
|
|
"anthropic.claude-3-5-sonnet-20240620-v1:0": {
|
|
maxTokens: 8192,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 3.0,
|
|
outputPrice: 15.0,
|
|
},
|
|
"anthropic.claude-3-opus-20240229-v1:0": {
|
|
maxTokens: 4096,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 15.0,
|
|
outputPrice: 75.0,
|
|
},
|
|
"anthropic.claude-3-sonnet-20240229-v1:0": {
|
|
maxTokens: 4096,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 3.0,
|
|
outputPrice: 15.0,
|
|
},
|
|
"anthropic.claude-3-haiku-20240307-v1:0": {
|
|
maxTokens: 4096,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.25,
|
|
outputPrice: 1.25,
|
|
},
|
|
"anthropic.claude-2-1-v1:0": {
|
|
maxTokens: 4096,
|
|
contextWindow: 100_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 8.0,
|
|
outputPrice: 24.0,
|
|
description: "Claude 2.1",
|
|
},
|
|
"anthropic.claude-2-0-v1:0": {
|
|
maxTokens: 4096,
|
|
contextWindow: 100_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 8.0,
|
|
outputPrice: 24.0,
|
|
description: "Claude 2.0",
|
|
},
|
|
"anthropic.claude-instant-v1:0": {
|
|
maxTokens: 4096,
|
|
contextWindow: 100_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.8,
|
|
outputPrice: 2.4,
|
|
description: "Claude Instant",
|
|
},
|
|
"deepseek.r1-v1:0": {
|
|
maxTokens: 32_768,
|
|
contextWindow: 128_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 1.35,
|
|
outputPrice: 5.4,
|
|
},
|
|
"meta.llama3-3-70b-instruct-v1:0": {
|
|
maxTokens: 8192,
|
|
contextWindow: 128_000,
|
|
supportsImages: false,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.72,
|
|
outputPrice: 0.72,
|
|
description: "Llama 3.3 Instruct (70B)",
|
|
},
|
|
"meta.llama3-2-90b-instruct-v1:0": {
|
|
maxTokens: 8192,
|
|
contextWindow: 128_000,
|
|
supportsImages: true,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.72,
|
|
outputPrice: 0.72,
|
|
description: "Llama 3.2 Instruct (90B)",
|
|
},
|
|
"meta.llama3-2-11b-instruct-v1:0": {
|
|
maxTokens: 8192,
|
|
contextWindow: 128_000,
|
|
supportsImages: true,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.16,
|
|
outputPrice: 0.16,
|
|
description: "Llama 3.2 Instruct (11B)",
|
|
},
|
|
"meta.llama3-2-3b-instruct-v1:0": {
|
|
maxTokens: 8192,
|
|
contextWindow: 128_000,
|
|
supportsImages: false,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.15,
|
|
outputPrice: 0.15,
|
|
description: "Llama 3.2 Instruct (3B)",
|
|
},
|
|
"meta.llama3-2-1b-instruct-v1:0": {
|
|
maxTokens: 8192,
|
|
contextWindow: 128_000,
|
|
supportsImages: false,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.1,
|
|
outputPrice: 0.1,
|
|
description: "Llama 3.2 Instruct (1B)",
|
|
},
|
|
"meta.llama3-1-405b-instruct-v1:0": {
|
|
maxTokens: 8192,
|
|
contextWindow: 128_000,
|
|
supportsImages: false,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 2.4,
|
|
outputPrice: 2.4,
|
|
description: "Llama 3.1 Instruct (405B)",
|
|
},
|
|
"meta.llama3-1-70b-instruct-v1:0": {
|
|
maxTokens: 8192,
|
|
contextWindow: 128_000,
|
|
supportsImages: false,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.72,
|
|
outputPrice: 0.72,
|
|
description: "Llama 3.1 Instruct (70B)",
|
|
},
|
|
"meta.llama3-1-70b-instruct-latency-optimized-v1:0": {
|
|
maxTokens: 8192,
|
|
contextWindow: 128_000,
|
|
supportsImages: false,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.9,
|
|
outputPrice: 0.9,
|
|
description: "Llama 3.1 Instruct (70B) (w/ latency optimized inference)",
|
|
},
|
|
"meta.llama3-1-8b-instruct-v1:0": {
|
|
maxTokens: 8192,
|
|
contextWindow: 8_000,
|
|
supportsImages: false,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.22,
|
|
outputPrice: 0.22,
|
|
description: "Llama 3.1 Instruct (8B)",
|
|
},
|
|
"meta.llama3-70b-instruct-v1:0": {
|
|
maxTokens: 2048,
|
|
contextWindow: 8_000,
|
|
supportsImages: false,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 2.65,
|
|
outputPrice: 3.5,
|
|
},
|
|
"meta.llama3-8b-instruct-v1:0": {
|
|
maxTokens: 2048,
|
|
contextWindow: 4_000,
|
|
supportsImages: false,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.3,
|
|
outputPrice: 0.6,
|
|
},
|
|
"amazon.titan-text-lite-v1:0": {
|
|
maxTokens: 4096,
|
|
contextWindow: 8_000,
|
|
supportsImages: false,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.15,
|
|
outputPrice: 0.2,
|
|
description: "Amazon Titan Text Lite",
|
|
},
|
|
"amazon.titan-text-express-v1:0": {
|
|
maxTokens: 4096,
|
|
contextWindow: 8_000,
|
|
supportsImages: false,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.2,
|
|
outputPrice: 0.6,
|
|
description: "Amazon Titan Text Express",
|
|
},
|
|
"amazon.titan-text-embeddings-v1:0": {
|
|
maxTokens: 8192,
|
|
contextWindow: 8_000,
|
|
supportsImages: false,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.1,
|
|
description: "Amazon Titan Text Embeddings",
|
|
},
|
|
"amazon.titan-text-embeddings-v2:0": {
|
|
maxTokens: 8192,
|
|
contextWindow: 8_000,
|
|
supportsImages: false,
|
|
supportsComputerUse: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.02,
|
|
description: "Amazon Titan Text Embeddings V2",
|
|
},
|
|
} as const satisfies Record<string, ModelInfo>
|
|
|
|
// Glama
|
|
// https://glama.ai/models
|
|
export const glamaDefaultModelId = "anthropic/claude-3-7-sonnet"
|
|
export const glamaDefaultModelInfo: ModelInfo = {
|
|
maxTokens: 8192,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsComputerUse: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 3.0,
|
|
outputPrice: 15.0,
|
|
cacheWritesPrice: 3.75,
|
|
cacheReadsPrice: 0.3,
|
|
description:
|
|
"Claude 3.7 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities. It introduces a hybrid reasoning approach, allowing users to choose between rapid responses and extended, step-by-step processing for complex tasks. The model demonstrates notable improvements in coding, particularly in front-end development and full-stack updates, and excels in agentic workflows, where it can autonomously navigate multi-step processes. Claude 3.7 Sonnet maintains performance parity with its predecessor in standard mode while offering an extended reasoning mode for enhanced accuracy in math, coding, and instruction-following tasks. Read more at the [blog post here](https://www.anthropic.com/news/claude-3-7-sonnet)",
|
|
}
|
|
|
|
// Requesty
|
|
// https://requesty.ai/router-2
|
|
export const requestyDefaultModelId = "anthropic/claude-3-7-sonnet-latest"
|
|
export const requestyDefaultModelInfo: ModelInfo = {
|
|
maxTokens: 8192,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsComputerUse: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 3.0,
|
|
outputPrice: 15.0,
|
|
cacheWritesPrice: 3.75,
|
|
cacheReadsPrice: 0.3,
|
|
description:
|
|
"Claude 3.7 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities. It introduces a hybrid reasoning approach, allowing users to choose between rapid responses and extended, step-by-step processing for complex tasks. The model demonstrates notable improvements in coding, particularly in front-end development and full-stack updates, and excels in agentic workflows, where it can autonomously navigate multi-step processes. Claude 3.7 Sonnet maintains performance parity with its predecessor in standard mode while offering an extended reasoning mode for enhanced accuracy in math, coding, and instruction-following tasks. Read more at the [blog post here](https://www.anthropic.com/news/claude-3-7-sonnet)",
|
|
}
|
|
|
|
// OpenRouter
|
|
// https://openrouter.ai/models?order=newest&supported_parameters=tools
|
|
export const openRouterDefaultModelId = "anthropic/claude-3.7-sonnet"
|
|
export const openRouterDefaultModelInfo: ModelInfo = {
|
|
maxTokens: 8192,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsComputerUse: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 3.0,
|
|
outputPrice: 15.0,
|
|
cacheWritesPrice: 3.75,
|
|
cacheReadsPrice: 0.3,
|
|
description:
|
|
"Claude 3.7 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities. It introduces a hybrid reasoning approach, allowing users to choose between rapid responses and extended, step-by-step processing for complex tasks. The model demonstrates notable improvements in coding, particularly in front-end development and full-stack updates, and excels in agentic workflows, where it can autonomously navigate multi-step processes. Claude 3.7 Sonnet maintains performance parity with its predecessor in standard mode while offering an extended reasoning mode for enhanced accuracy in math, coding, and instruction-following tasks. Read more at the [blog post here](https://www.anthropic.com/news/claude-3-7-sonnet)",
|
|
}
|
|
|
|
// Vertex AI
|
|
// https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-claude
|
|
export type VertexModelId = keyof typeof vertexModels
|
|
export const vertexDefaultModelId: VertexModelId = "claude-3-7-sonnet@20250219"
|
|
export const vertexModels = {
|
|
"gemini-2.0-flash-001": {
|
|
maxTokens: 8192,
|
|
contextWindow: 1_048_576,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.15,
|
|
outputPrice: 0.6,
|
|
},
|
|
"gemini-2.5-pro-preview-03-25": {
|
|
maxTokens: 65_535,
|
|
contextWindow: 1_048_576,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 2.5,
|
|
outputPrice: 15,
|
|
},
|
|
"gemini-2.5-pro-exp-03-25": {
|
|
maxTokens: 65_535,
|
|
contextWindow: 1_048_576,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
},
|
|
"gemini-2.0-pro-exp-02-05": {
|
|
maxTokens: 8192,
|
|
contextWindow: 2_097_152,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
},
|
|
"gemini-2.0-flash-lite-001": {
|
|
maxTokens: 8192,
|
|
contextWindow: 1_048_576,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.075,
|
|
outputPrice: 0.3,
|
|
},
|
|
"gemini-2.0-flash-thinking-exp-01-21": {
|
|
maxTokens: 8192,
|
|
contextWindow: 32_768,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
},
|
|
"gemini-1.5-flash-002": {
|
|
maxTokens: 8192,
|
|
contextWindow: 1_048_576,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.075,
|
|
outputPrice: 0.3,
|
|
},
|
|
"gemini-1.5-pro-002": {
|
|
maxTokens: 8192,
|
|
contextWindow: 2_097_152,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 1.25,
|
|
outputPrice: 5,
|
|
},
|
|
"claude-3-7-sonnet@20250219:thinking": {
|
|
maxTokens: 64_000,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsComputerUse: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 3.0,
|
|
outputPrice: 15.0,
|
|
cacheWritesPrice: 3.75,
|
|
cacheReadsPrice: 0.3,
|
|
thinking: true,
|
|
},
|
|
"claude-3-7-sonnet@20250219": {
|
|
maxTokens: 8192,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsComputerUse: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 3.0,
|
|
outputPrice: 15.0,
|
|
cacheWritesPrice: 3.75,
|
|
cacheReadsPrice: 0.3,
|
|
thinking: false,
|
|
},
|
|
"claude-3-5-sonnet-v2@20241022": {
|
|
maxTokens: 8192,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsComputerUse: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 3.0,
|
|
outputPrice: 15.0,
|
|
cacheWritesPrice: 3.75,
|
|
cacheReadsPrice: 0.3,
|
|
},
|
|
"claude-3-5-sonnet@20240620": {
|
|
maxTokens: 8192,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 3.0,
|
|
outputPrice: 15.0,
|
|
cacheWritesPrice: 3.75,
|
|
cacheReadsPrice: 0.3,
|
|
},
|
|
"claude-3-5-haiku@20241022": {
|
|
maxTokens: 8192,
|
|
contextWindow: 200_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: true,
|
|
inputPrice: 1.0,
|
|
outputPrice: 5.0,
|
|
cacheWritesPrice: 1.25,
|
|
cacheReadsPrice: 0.1,
|
|
},
|
|
"claude-3-opus@20240229": {
|
|
maxTokens: 4096,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 15.0,
|
|
outputPrice: 75.0,
|
|
cacheWritesPrice: 18.75,
|
|
cacheReadsPrice: 1.5,
|
|
},
|
|
"claude-3-haiku@20240307": {
|
|
maxTokens: 4096,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 0.25,
|
|
outputPrice: 1.25,
|
|
cacheWritesPrice: 0.3,
|
|
cacheReadsPrice: 0.03,
|
|
},
|
|
} as const satisfies Record<string, ModelInfo>
|
|
|
|
export const openAiModelInfoSaneDefaults: ModelInfo = {
|
|
maxTokens: -1,
|
|
contextWindow: 128_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
}
|
|
|
|
// Gemini
|
|
// https://ai.google.dev/gemini-api/docs/models/gemini
|
|
export type GeminiModelId = keyof typeof geminiModels
|
|
export const geminiDefaultModelId: GeminiModelId = "gemini-2.0-flash-001"
|
|
export const geminiModels = {
|
|
"gemini-2.5-pro-exp-03-25": {
|
|
maxTokens: 65_536,
|
|
contextWindow: 1_048_576,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
},
|
|
"gemini-2.5-pro-preview-03-25": {
|
|
maxTokens: 65_535,
|
|
contextWindow: 1_048_576,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 2.5,
|
|
outputPrice: 15,
|
|
},
|
|
"gemini-2.0-flash-001": {
|
|
maxTokens: 8192,
|
|
contextWindow: 1_048_576,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
},
|
|
"gemini-2.0-flash-lite-preview-02-05": {
|
|
maxTokens: 8192,
|
|
contextWindow: 1_048_576,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
},
|
|
"gemini-2.0-pro-exp-02-05": {
|
|
maxTokens: 8192,
|
|
contextWindow: 2_097_152,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
},
|
|
"gemini-2.0-flash-thinking-exp-01-21": {
|
|
maxTokens: 65_536,
|
|
contextWindow: 1_048_576,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
},
|
|
"gemini-2.0-flash-thinking-exp-1219": {
|
|
maxTokens: 8192,
|
|
contextWindow: 32_767,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
},
|
|
"gemini-2.0-flash-exp": {
|
|
maxTokens: 8192,
|
|
contextWindow: 1_048_576,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
},
|
|
"gemini-1.5-flash-002": {
|
|
maxTokens: 8192,
|
|
contextWindow: 1_048_576,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
},
|
|
"gemini-1.5-flash-exp-0827": {
|
|
maxTokens: 8192,
|
|
contextWindow: 1_048_576,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
},
|
|
"gemini-1.5-flash-8b-exp-0827": {
|
|
maxTokens: 8192,
|
|
contextWindow: 1_048_576,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
},
|
|
"gemini-1.5-pro-002": {
|
|
maxTokens: 8192,
|
|
contextWindow: 2_097_152,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
},
|
|
"gemini-1.5-pro-exp-0827": {
|
|
maxTokens: 8192,
|
|
contextWindow: 2_097_152,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
},
|
|
"gemini-exp-1206": {
|
|
maxTokens: 8192,
|
|
contextWindow: 2_097_152,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0,
|
|
outputPrice: 0,
|
|
},
|
|
} as const satisfies Record<string, ModelInfo>
|
|
|
|
// OpenAI Native
|
|
// https://openai.com/api/pricing/
|
|
export type OpenAiNativeModelId = keyof typeof openAiNativeModels
|
|
export const openAiNativeDefaultModelId: OpenAiNativeModelId = "gpt-4o"
|
|
export const openAiNativeModels = {
|
|
// don't support tool use yet
|
|
"o3-mini": {
|
|
maxTokens: 100_000,
|
|
contextWindow: 200_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: true,
|
|
inputPrice: 1.1,
|
|
outputPrice: 4.4,
|
|
reasoningEffort: "medium",
|
|
},
|
|
"o3-mini-high": {
|
|
maxTokens: 100_000,
|
|
contextWindow: 200_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: true,
|
|
inputPrice: 1.1,
|
|
outputPrice: 4.4,
|
|
reasoningEffort: "high",
|
|
},
|
|
"o3-mini-low": {
|
|
maxTokens: 100_000,
|
|
contextWindow: 200_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: true,
|
|
inputPrice: 1.1,
|
|
outputPrice: 4.4,
|
|
reasoningEffort: "low",
|
|
},
|
|
o1: {
|
|
maxTokens: 100_000,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 15,
|
|
outputPrice: 60,
|
|
},
|
|
"o1-preview": {
|
|
maxTokens: 32_768,
|
|
contextWindow: 128_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 15,
|
|
outputPrice: 60,
|
|
},
|
|
"o1-mini": {
|
|
maxTokens: 65_536,
|
|
contextWindow: 128_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 1.1,
|
|
outputPrice: 4.4,
|
|
},
|
|
"gpt-4.5-preview": {
|
|
maxTokens: 16_384,
|
|
contextWindow: 128_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 75,
|
|
outputPrice: 150,
|
|
},
|
|
"gpt-4o": {
|
|
maxTokens: 16_384,
|
|
contextWindow: 128_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 2.5,
|
|
outputPrice: 10,
|
|
},
|
|
"gpt-4o-mini": {
|
|
maxTokens: 16_384,
|
|
contextWindow: 128_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 0.15,
|
|
outputPrice: 0.6,
|
|
},
|
|
} as const satisfies Record<string, ModelInfo>
|
|
|
|
// DeepSeek
|
|
// https://platform.deepseek.com/docs/api
|
|
export type DeepSeekModelId = keyof typeof deepSeekModels
|
|
export const deepSeekDefaultModelId: DeepSeekModelId = "deepseek-chat"
|
|
export const deepSeekModels = {
|
|
"deepseek-chat": {
|
|
maxTokens: 8192,
|
|
contextWindow: 64_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: true,
|
|
inputPrice: 0.27, // $0.27 per million tokens (cache miss)
|
|
outputPrice: 1.1, // $1.10 per million tokens
|
|
cacheWritesPrice: 0.27, // $0.27 per million tokens (cache miss)
|
|
cacheReadsPrice: 0.07, // $0.07 per million tokens (cache hit).
|
|
description: `DeepSeek-V3 achieves a significant breakthrough in inference speed over previous models. It tops the leaderboard among open-source models and rivals the most advanced closed-source models globally.`,
|
|
},
|
|
"deepseek-reasoner": {
|
|
maxTokens: 8192,
|
|
contextWindow: 64_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: true,
|
|
inputPrice: 0.55, // $0.55 per million tokens (cache miss)
|
|
outputPrice: 2.19, // $2.19 per million tokens
|
|
cacheWritesPrice: 0.55, // $0.55 per million tokens (cache miss)
|
|
cacheReadsPrice: 0.14, // $0.14 per million tokens (cache hit)
|
|
description: `DeepSeek-R1 achieves performance comparable to OpenAI-o1 across math, code, and reasoning tasks. Supports Chain of Thought reasoning with up to 32K tokens.`,
|
|
},
|
|
} as const satisfies Record<string, ModelInfo>
|
|
|
|
// Azure OpenAI
|
|
// https://learn.microsoft.com/en-us/azure/ai-services/openai/api-version-deprecation
|
|
// https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#api-specs
|
|
export const azureOpenAiDefaultApiVersion = "2024-08-01-preview"
|
|
|
|
// Mistral
|
|
// https://docs.mistral.ai/getting-started/models/models_overview/
|
|
export type MistralModelId = keyof typeof mistralModels
|
|
export const mistralDefaultModelId: MistralModelId = "codestral-latest"
|
|
export const mistralModels = {
|
|
"codestral-latest": {
|
|
maxTokens: 256_000,
|
|
contextWindow: 256_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.3,
|
|
outputPrice: 0.9,
|
|
},
|
|
"mistral-large-latest": {
|
|
maxTokens: 131_000,
|
|
contextWindow: 131_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 2.0,
|
|
outputPrice: 6.0,
|
|
},
|
|
"ministral-8b-latest": {
|
|
maxTokens: 131_000,
|
|
contextWindow: 131_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.1,
|
|
outputPrice: 0.1,
|
|
},
|
|
"ministral-3b-latest": {
|
|
maxTokens: 131_000,
|
|
contextWindow: 131_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.04,
|
|
outputPrice: 0.04,
|
|
},
|
|
"mistral-small-latest": {
|
|
maxTokens: 32_000,
|
|
contextWindow: 32_000,
|
|
supportsImages: false,
|
|
supportsPromptCache: false,
|
|
inputPrice: 0.2,
|
|
outputPrice: 0.6,
|
|
},
|
|
"pixtral-large-latest": {
|
|
maxTokens: 131_000,
|
|
contextWindow: 131_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: false,
|
|
inputPrice: 2.0,
|
|
outputPrice: 6.0,
|
|
},
|
|
} as const satisfies Record<string, ModelInfo>
|
|
|
|
// Unbound Security
|
|
export const unboundDefaultModelId = "anthropic/claude-3-5-sonnet-20241022"
|
|
export const unboundDefaultModelInfo: ModelInfo = {
|
|
maxTokens: 8192,
|
|
contextWindow: 200_000,
|
|
supportsImages: true,
|
|
supportsPromptCache: true,
|
|
inputPrice: 3.0,
|
|
outputPrice: 15.0,
|
|
cacheWritesPrice: 3.75,
|
|
cacheReadsPrice: 0.3,
|
|
}
|