diff --git a/packages/__tests__/cost/__snapshots__/registrySnapshots.test.ts.snap b/packages/__tests__/cost/__snapshots__/registrySnapshots.test.ts.snap index ab023ddc00..3686c3aadd 100644 --- a/packages/__tests__/cost/__snapshots__/registrySnapshots.test.ts.snap +++ b/packages/__tests__/cost/__snapshots__/registrySnapshots.test.ts.snap @@ -5932,6 +5932,59 @@ exports[`Registry Snapshots endpoint configurations snapshot 1`] = ` ], }, }, + "openai/gpt-5.5": { + "gpt-5.5:openai": { + "context": 1050000, + "crossRegion": false, + "maxTokens": 128000, + "modelId": "gpt-5.5-2026-04-23", + "parameters": [ + "logprobs", + "max_completion_tokens", + "response_format", + "seed", + "stop", + "temperature", + "tool_choice", + "tools", + "top_p", + "verbosity", + ], + "provider": "openai", + "ptbEnabled": false, + "regions": [ + "*", + ], + }, + "gpt-5.5:openrouter": { + "context": 1050000, + "crossRegion": false, + "maxTokens": 128000, + "modelId": "openai/gpt-5.5", + "parameters": [ + "frequency_penalty", + "logit_bias", + "logprobs", + "max_completion_tokens", + "max_tokens", + "presence_penalty", + "response_format", + "seed", + "stop", + "temperature", + "tool_choice", + "tools", + "top_logprobs", + "top_p", + "verbosity", + ], + "provider": "openrouter", + "ptbEnabled": false, + "regions": [ + "*", + ], + }, + }, "openai/gpt-image-1": { "gpt-image-1.5:openai": { "context": 8192, @@ -7657,6 +7710,10 @@ exports[`Registry Snapshots model coverage snapshot 1`] = ` "openrouter", "openrouter", ], + "openai/gpt-5.5": [ + "openai", + "openrouter", + ], "openai/gpt-image-1": [ "openai", "openai", @@ -9713,6 +9770,37 @@ exports[`Registry Snapshots pricing snapshot 1`] = ` }, ], }, + "openai/gpt-5.5": { + "openai": [ + { + "cacheMultipliers": { + "cachedInput": 0.1, + }, + "input": 0.000005, + "output": 0.00003, + "threshold": 0, + "web_search": 0.01, + }, + { + "input": 0.00001, + "output": 0.000045, + "threshold": 272000, + }, + ], + "openrouter": [ + { + "input": 0.000005275, + "output": 0.00003165, + "threshold": 0, + "web_search": 0.01, + }, + { + "input": 0.00001055, + "output": 0.000047475, + "threshold": 272000, + }, + ], + }, "openai/gpt-image-1": { "openai": [ { @@ -10495,6 +10583,13 @@ exports[`Registry Snapshots verify registry state 1`] = ` "openrouter", ], }, + { + "model": "gpt-5.5", + "providers": [ + "openai", + "openrouter", + ], + }, { "model": "gpt-image-1", "providers": [ @@ -10910,11 +11005,11 @@ exports[`Registry Snapshots verify registry state 1`] = ` "provider": "novita", }, { - "modelCount": 33, + "modelCount": 34, "provider": "openai", }, { - "modelCount": 71, + "modelCount": 72, "provider": "openrouter", }, { @@ -11049,8 +11144,8 @@ exports[`Registry Snapshots verify registry state 1`] = ` "claude-3.5-haiku:anthropic:*", ], "totalArchivedConfigs": 0, - "totalEndpoints": 329, - "totalModelProviderConfigs": 329, + "totalEndpoints": 331, + "totalModelProviderConfigs": 331, "totalModelsWithPtb": 108, "totalProviders": 21, } diff --git a/packages/cost/models/authors/openai/gpt-5.5/endpoints.ts b/packages/cost/models/authors/openai/gpt-5.5/endpoints.ts new file mode 100644 index 0000000000..4445514d24 --- /dev/null +++ b/packages/cost/models/authors/openai/gpt-5.5/endpoints.ts @@ -0,0 +1,101 @@ +import { ModelProviderName } from "../../../providers"; +import type { ModelProviderConfig } from "../../../types"; +import { GPT55ModelName } from "./models"; + +export const endpoints = { + "gpt-5.5:openai": { + providerModelId: "gpt-5.5-2026-04-23", + provider: "openai", + author: "openai", + pricing: [ + { + threshold: 0, + input: 0.0000050, // $5.00 per 1M tokens + output: 0.000030, // $30.00 per 1M tokens + web_search: 0.01, // $10 per 1000 searches (1:1 USD; 10/1K) + cacheMultipliers: { + cachedInput: 0.1, // $0.50 per 1M tokens + }, + }, + { + threshold: 272000, + input: 0.000010, // $10.00 per 1M tokens (2x for >272K context) + output: 0.000045, // $45.00 per 1M tokens (1.5x for >272K context) + }, + ], + contextLength: 1_050_000, + maxCompletionTokens: 128_000, + rateLimits: { + rpm: 15000, + tpm: 40000000, + tpd: 15000000000, + }, + supportedParameters: [ + "tools", + "tool_choice", + "seed", + "max_completion_tokens", + "response_format", + "stop", + "verbosity", + "temperature", + "top_p", + "logprobs", + ], + unsupportedParameters: [ + "presence_penalty", + "frequency_penalty", + "top_logprobs", + "logit_bias", + "max_tokens", + ], + ptbEnabled: false, + endpointConfigs: { + "*": {}, + }, + }, + "gpt-5.5:openrouter": { + provider: "openrouter", + author: "openai", + providerModelId: "openai/gpt-5.5", + pricing: [ + { + threshold: 0, + input: 0.000005_275, // $5.275/1M - worst-case: $5/1M (OpenAI) * 1.055 + output: 0.000031_65, // $31.65/1M - worst-case: $30.00/1M (OpenAI) * 1.055 + web_search: 0.01, // $10 per 1000 searches (1:1 USD; 10/1K) + }, + { + threshold: 272000, + input: 0.000010_55, // $10.55/1M - worst-case: $10.00/1M (OpenAI) * 1.055 + output: 0.000047_475, // $47.475/1M - worst-case: $45.00/1M (OpenAI) * 1.055 + }, + ], + contextLength: 1_050_000, + maxCompletionTokens: 128_000, + supportedParameters: [ + "tools", + "tool_choice", + "seed", + "max_completion_tokens", + "response_format", + "stop", + "temperature", + "top_p", + "logprobs", + "presence_penalty", + "frequency_penalty", + "logit_bias", + "max_tokens", + "top_logprobs", + "verbosity", + ], + unsupportedParameters: [], + ptbEnabled: false, + endpointConfigs: { + "*": {}, + }, + }, +} satisfies Partial< + Record<`${GPT55ModelName}:${ModelProviderName}`, ModelProviderConfig> +>; diff --git a/packages/cost/models/authors/openai/gpt-5.5/models.ts b/packages/cost/models/authors/openai/gpt-5.5/models.ts new file mode 100644 index 0000000000..2474c92717 --- /dev/null +++ b/packages/cost/models/authors/openai/gpt-5.5/models.ts @@ -0,0 +1,18 @@ + +import type { ModelConfig } from "../../../types"; + +export const models = { + "gpt-5.5": { + name: "OpenAI GPT-5.5", + author: "openai", + description: + "GPT-5.5 is our newest frontier model for the most complex professional work. Learn more in our latest model guide. Reasoning.effort supports: none, low, medium (default), high and xhigh.", + contextLength: 1_050_000, + maxOutputTokens: 128_000, + created: "2026-04-23T00:00:00.000Z", + modality: { inputs: ["text", "image"], outputs: ["text"] }, + tokenizer: "GPT", + }, +} satisfies Record; + +export type GPT55ModelName = keyof typeof models;