Skip to content
Merged
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
60 changes: 45 additions & 15 deletions packages/types/src/providers/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,53 @@ export type OpenAiNativeModelId = keyof typeof openAiNativeModels
export const openAiNativeDefaultModelId: OpenAiNativeModelId = "gpt-5.1"

export const openAiNativeModels = {
"gpt-5.1": {
"gpt-5.1-codex-max": {
maxTokens: 128000,
contextWindow: 400000,
supportsNativeTools: true,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
promptCacheRetention: "24h",
supportsReasoningEffort: ["none", "low", "medium", "high"],
supportsReasoningEffort: ["low", "medium", "high"],
reasoningEffort: "medium",
inputPrice: 1.25,
outputPrice: 10.0,
cacheReadsPrice: 0.125,
supportsVerbosity: true,
supportsTemperature: false,
tiers: [
{ name: "flex", contextWindow: 400000, inputPrice: 0.625, outputPrice: 5.0, cacheReadsPrice: 0.0625 },
{ name: "priority", contextWindow: 400000, inputPrice: 2.5, outputPrice: 20.0, cacheReadsPrice: 0.25 },
],
description: "GPT-5.1: The best model for coding and agentic tasks across domains",
tiers: [{ name: "priority", contextWindow: 400000, inputPrice: 2.5, outputPrice: 20.0, cacheReadsPrice: 0.25 }],
description:
"GPT-5.1 Codex Max: Our most intelligent coding model optimized for long-horizon, agentic coding tasks",
},
"gpt-5.1-codex": {
"gpt-5.1": {
maxTokens: 128000,
contextWindow: 400000,
supportsNativeTools: true,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
promptCacheRetention: "24h",
supportsReasoningEffort: ["low", "medium", "high"],
supportsReasoningEffort: ["none", "low", "medium", "high"],
reasoningEffort: "medium",
inputPrice: 1.25,
outputPrice: 10.0,
cacheReadsPrice: 0.125,
supportsVerbosity: true,
supportsTemperature: false,
tiers: [{ name: "priority", contextWindow: 400000, inputPrice: 2.5, outputPrice: 20.0, cacheReadsPrice: 0.25 }],
description: "GPT-5.1 Codex: A version of GPT-5.1 optimized for agentic coding in Codex",
tiers: [
{ name: "flex", contextWindow: 400000, inputPrice: 0.625, outputPrice: 5.0, cacheReadsPrice: 0.0625 },
{ name: "priority", contextWindow: 400000, inputPrice: 2.5, outputPrice: 20.0, cacheReadsPrice: 0.25 },
],
description: "GPT-5.1: The best model for coding and agentic tasks across domains",
},
"gpt-5.1-codex-max": {
"gpt-5.1-codex": {
maxTokens: 128000,
contextWindow: 400000,
supportsNativeTools: true,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
promptCacheRetention: "24h",
Expand All @@ -56,13 +63,14 @@ export const openAiNativeModels = {
cacheReadsPrice: 0.125,
supportsTemperature: false,
tiers: [{ name: "priority", contextWindow: 400000, inputPrice: 2.5, outputPrice: 20.0, cacheReadsPrice: 0.25 }],
description:
"GPT-5.1 Codex Max: Our most intelligent coding model optimized for long-horizon, agentic coding tasks",
description: "GPT-5.1 Codex: A version of GPT-5.1 optimized for agentic coding in Codex",
},
"gpt-5.1-codex-mini": {
maxTokens: 128000,
contextWindow: 400000,
supportsNativeTools: true,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
promptCacheRetention: "24h",
Expand All @@ -78,6 +86,8 @@ export const openAiNativeModels = {
maxTokens: 128000,
contextWindow: 400000,
supportsNativeTools: true,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
Expand All @@ -97,6 +107,8 @@ export const openAiNativeModels = {
maxTokens: 128000,
contextWindow: 400000,
supportsNativeTools: true,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
Expand All @@ -116,6 +128,8 @@ export const openAiNativeModels = {
maxTokens: 128000,
contextWindow: 400000,
supportsNativeTools: true,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["low", "medium", "high"],
Expand All @@ -131,6 +145,8 @@ export const openAiNativeModels = {
maxTokens: 128000,
contextWindow: 400000,
supportsNativeTools: true,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
Expand All @@ -147,6 +163,8 @@ export const openAiNativeModels = {
maxTokens: 128000,
contextWindow: 400000,
supportsNativeTools: true,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
inputPrice: 1.25,
Expand All @@ -158,6 +176,8 @@ export const openAiNativeModels = {
maxTokens: 32_768,
contextWindow: 1_047_576,
supportsNativeTools: true,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2,
Expand All @@ -172,6 +192,8 @@ export const openAiNativeModels = {
maxTokens: 32_768,
contextWindow: 1_047_576,
supportsNativeTools: true,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
inputPrice: 0.4,
Expand All @@ -186,6 +208,8 @@ export const openAiNativeModels = {
maxTokens: 32_768,
contextWindow: 1_047_576,
supportsNativeTools: true,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
inputPrice: 0.1,
Expand Down Expand Up @@ -394,6 +418,8 @@ export const openAiNativeModels = {
maxTokens: 128000,
contextWindow: 400000,
supportsNativeTools: true,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
Expand All @@ -413,6 +439,8 @@ export const openAiNativeModels = {
maxTokens: 128000,
contextWindow: 400000,
supportsNativeTools: true,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
Expand All @@ -432,6 +460,8 @@ export const openAiNativeModels = {
maxTokens: 128000,
contextWindow: 400000,
supportsNativeTools: true,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
Expand Down
Loading