From ccb7f70e56d6a014388fe69f82ef9b8c8a4b46d0 Mon Sep 17 00:00:00 2001 From: Hammad Shami Date: Tue, 12 May 2026 14:18:28 -0700 Subject: [PATCH 1/5] feat: add 5.5 models to gateway --- .../authors/openai/gpt-5.5/endpoints.ts | 101 ++++++++++++++++++ .../models/authors/openai/gpt-5.5/models.ts | 30 ++++++ 2 files changed, 131 insertions(+) create mode 100644 packages/cost/models/authors/openai/gpt-5.5/endpoints.ts create mode 100644 packages/cost/models/authors/openai/gpt-5.5/models.ts 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..a165195ea6 --- /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 { GPT54ModelName } 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, // $5.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<`${GPT54ModelName}:${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..712b52fc4d --- /dev/null +++ b/packages/cost/models/authors/openai/gpt-5.5/models.ts @@ -0,0 +1,30 @@ + +import type { ModelConfig } from "../../../types"; + +export const models = { + "gpt-5.5": { + name: "OpenAI GPT-5.5", + author: "openai", + description: + "GPT-5.5 is our frontier model for complex professional work. Reasoning.effort supports: none (default), low, medium, high and xhigh. Features a 1.05M context window and 128K max output tokens with improvements in general intelligence, instruction following, accuracy, multimodality, code generation, tool calling, and context management over GPT-5.2.", + contextLength: 1_050_000, + maxOutputTokens: 128_000, + created: "2026-03-05T00:00:00.000Z", + modality: { inputs: ["text", "image"], outputs: ["text"] }, + tokenizer: "GPT", + }, + "gpt-5.4-2026-03-05": { + name: "OpenAI GPT-5.4", + author: "openai", + description: + "GPT-5.4 is our frontier model for complex professional work. Reasoning.effort supports: none (default), low, medium, high and xhigh. Features a 1.05M context window and 128K max output tokens with improvements in general intelligence, instruction following, accuracy, multimodality, code generation, tool calling, and context management over GPT-5.2.", + contextLength: 1_050_000, + maxOutputTokens: 128_000, + created: "2026-03-05T00:00:00.000Z", + modality: { inputs: ["text", "image"], outputs: ["text"] }, + tokenizer: "GPT", + pinnedVersionOfModel: "gpt-5.4", + }, +} satisfies Record; + +export type GPT54ModelName = keyof typeof models; From 23da83feb14688079974999eb4700cea325f3728 Mon Sep 17 00:00:00 2001 From: Hammad Shami Date: Thu, 14 May 2026 15:33:03 -0700 Subject: [PATCH 2/5] model info update --- .../cost/models/authors/openai/gpt-5.5/models.ts | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/packages/cost/models/authors/openai/gpt-5.5/models.ts b/packages/cost/models/authors/openai/gpt-5.5/models.ts index 712b52fc4d..910b1a5b08 100644 --- a/packages/cost/models/authors/openai/gpt-5.5/models.ts +++ b/packages/cost/models/authors/openai/gpt-5.5/models.ts @@ -6,25 +6,13 @@ export const models = { name: "OpenAI GPT-5.5", author: "openai", description: - "GPT-5.5 is our frontier model for complex professional work. Reasoning.effort supports: none (default), low, medium, high and xhigh. Features a 1.05M context window and 128K max output tokens with improvements in general intelligence, instruction following, accuracy, multimodality, code generation, tool calling, and context management over GPT-5.2.", + "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-03-05T00:00:00.000Z", + created: "2026-04-23T00:00:00.000Z", modality: { inputs: ["text", "image"], outputs: ["text"] }, tokenizer: "GPT", }, - "gpt-5.4-2026-03-05": { - name: "OpenAI GPT-5.4", - author: "openai", - description: - "GPT-5.4 is our frontier model for complex professional work. Reasoning.effort supports: none (default), low, medium, high and xhigh. Features a 1.05M context window and 128K max output tokens with improvements in general intelligence, instruction following, accuracy, multimodality, code generation, tool calling, and context management over GPT-5.2.", - contextLength: 1_050_000, - maxOutputTokens: 128_000, - created: "2026-03-05T00:00:00.000Z", - modality: { inputs: ["text", "image"], outputs: ["text"] }, - tokenizer: "GPT", - pinnedVersionOfModel: "gpt-5.4", - }, } satisfies Record; export type GPT54ModelName = keyof typeof models; From 256ec92ef842614956a499cd071077c3d787d61a Mon Sep 17 00:00:00 2001 From: Hammad Shami Date: Thu, 14 May 2026 15:34:49 -0700 Subject: [PATCH 3/5] chore: update package tests --- .../registrySnapshots.test.ts.snap | 103 +++++++++++++++++- 1 file changed, 99 insertions(+), 4 deletions(-) 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, } From ffa841de2795262355f51bb611c57058c731916e Mon Sep 17 00:00:00 2001 From: Hammad Shami Date: Thu, 14 May 2026 15:36:05 -0700 Subject: [PATCH 4/5] update class to right model vers --- packages/cost/models/authors/openai/gpt-5.5/endpoints.ts | 4 ++-- packages/cost/models/authors/openai/gpt-5.5/models.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cost/models/authors/openai/gpt-5.5/endpoints.ts b/packages/cost/models/authors/openai/gpt-5.5/endpoints.ts index a165195ea6..6835b4937e 100644 --- a/packages/cost/models/authors/openai/gpt-5.5/endpoints.ts +++ b/packages/cost/models/authors/openai/gpt-5.5/endpoints.ts @@ -1,6 +1,6 @@ import { ModelProviderName } from "../../../providers"; import type { ModelProviderConfig } from "../../../types"; -import { GPT54ModelName } from "./models"; +import { GPT55ModelName } from "./models"; export const endpoints = { "gpt-5.5:openai": { @@ -97,5 +97,5 @@ export const endpoints = { }, }, } satisfies Partial< - Record<`${GPT54ModelName}:${ModelProviderName}`, ModelProviderConfig> + 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 index 910b1a5b08..2474c92717 100644 --- a/packages/cost/models/authors/openai/gpt-5.5/models.ts +++ b/packages/cost/models/authors/openai/gpt-5.5/models.ts @@ -15,4 +15,4 @@ export const models = { }, } satisfies Record; -export type GPT54ModelName = keyof typeof models; +export type GPT55ModelName = keyof typeof models; From 3e32a4076a67204cf95b9e015fa68e268720271b Mon Sep 17 00:00:00 2001 From: Hammad Shami Date: Thu, 14 May 2026 15:36:58 -0700 Subject: [PATCH 5/5] update comment --- packages/cost/models/authors/openai/gpt-5.5/endpoints.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cost/models/authors/openai/gpt-5.5/endpoints.ts b/packages/cost/models/authors/openai/gpt-5.5/endpoints.ts index 6835b4937e..4445514d24 100644 --- a/packages/cost/models/authors/openai/gpt-5.5/endpoints.ts +++ b/packages/cost/models/authors/openai/gpt-5.5/endpoints.ts @@ -19,7 +19,7 @@ export const endpoints = { }, { threshold: 272000, - input: 0.000010, // $5.00 per 1M tokens (2x for >272K context) + 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) }, ],