Skip to content

feat(openai): add gpt-5.5 models - #2076

Merged
smakosh merged 4 commits into
mainfrom
claude/add-gpt-5.5-models-QS0Sd
Apr 25, 2026
Merged

smakosh merged 4 commits into
mainfrom
claude/add-gpt-5.5-models-QS0Sd

Conversation

@smakosh

@smakosh smakosh commented Apr 24, 2026 •

Copy link
Copy Markdown
Member

Summary

This PR adds support for two new OpenAI models: GPT-5.5 and GPT-5.5 Pro, with configurations for both OpenAI and Azure providers.

Key Changes

  • GPT-5.5: Added base model configuration with 1.05M context size, 128K max output, vision, tools, web search, and reasoning capabilities

    • OpenAI provider: $5.00/$30.00 per 1M input/output tokens
    • Azure provider: Same pricing with 30% discount and marked as unstable
  • GPT-5.5 Pro: Added premium variant with enhanced reasoning using more compute

    • OpenAI provider: $30.00/$180.00 per 1M input/output tokens with 30% discount
    • Azure provider: Same pricing without discount
    • Both providers marked with test: "skip" flag
    • JSON output schema support disabled (vs enabled in base model)

Notable Implementation Details

  • Both models released on 2026-04-23
  • Both support streaming, vision, tools, web search ($0.01 per search), and reasoning with "omit" output mode
  • Both support Responses API and JSON output
  • Context window: 1,050,000 tokens with 128,000 token max output
  • Cached input pricing available for GPT-5.5 ($0.5 per 1M tokens)
  • Standard parameters supported: temperature, top_p, frequency_penalty, presence_penalty, response_format

https://claude.ai/code/session_01XrSSeRjBSUYtNLurCbG9Nm

Summary by CodeRabbit

  • New Features
    • Added two new GPT models: gpt-5.5 and gpt-5.5-pro for advanced AI use cases.
    • Both models enable enhanced reasoning and JSON output; gpt-5.5 includes JSON schema support while gpt-5.5-pro does not.
    • Platform-optimized provider configurations (pricing, context/output capacities, streaming, vision, tools, web search support) included to support diverse operational needs.

@coderabbitai

coderabbitai Bot commented Apr 24, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f06e472a-f46c-4a79-aa17-86e67ce773b7

📥 Commits

Reviewing files that changed from the base of the PR and between 97bb9af and e55125c.

📒 Files selected for processing (1)
  • packages/models/src/models/openai.ts

Walkthrough

Adds two new model entries, gpt-5.5 and gpt-5.5-pro, to the exported openaiModels array with provider-specific configurations for openai and azure (pricing, contexts, capability flags, Responses API support, and JSON output settings).

Changes

Cohort / File(s) Summary
GPT-5.5 Model Definitions
packages/models/src/models/openai.ts
Added two exported model definitions (gpt-5.5, gpt-5.5-pro) with dual provider blocks (openai, azure). Includes pricing (input/output/cached, discounts), context and max token settings, capability flags (streaming, vision, tools, webSearch + webSearchPrice), reasoning fields, supportsResponsesApi: true, and jsonOutput/jsonOutputSchema configuration. gpt-5.5 declares supported params; gpt-5.5-pro providers marked test: "skip".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(openai): add gpt-5.5 models' accurately summarizes the main change: adding support for GPT-5.5 model variants to the OpenAI models configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/add-gpt-5.5-models-QS0Sd

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot changed the title Add GPT-5.5 and GPT-5.5 Pro model configurations feat(openai): add gpt-5.5 models Apr 24, 2026
@smakosh smakosh self-assigned this Apr 24, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/models/src/models/openai.ts (1)

1539-1655: Optional: consider placing the new entries near other gpt-5.x siblings.

gpt-5.5 / gpt-5.5-pro are inserted between gpt-5.4-nano and gpt-5.2-codex, which further fragments the already-mixed ordering of the gpt-5.x family in this array. Grouping them after gpt-5.4-nano alongside the rest of the 5.x series (or consistently by release date) would make the file easier to scan. Purely cosmetic; no behavioral impact.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/models/src/models/openai.ts` around lines 1539 - 1655, The new model
entries with id "gpt-5.5" and "gpt-5.5-pro" are placed between "gpt-5.4-nano"
and "gpt-5.2-codex", breaking the logical grouping of the gpt-5.x family;
relocate the entire objects for gpt-5.5 and gpt-5.5-pro so they appear adjacent
to the other gpt-5.x siblings (for example, immediately after the "gpt-5.4-nano"
entry) to keep the 5.x models grouped consistently in the array.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/models/src/models/openai.ts`:
- Around line 1539-1655: The new model entries with id "gpt-5.5" and
"gpt-5.5-pro" are placed between "gpt-5.4-nano" and "gpt-5.2-codex", breaking
the logical grouping of the gpt-5.x family; relocate the entire objects for
gpt-5.5 and gpt-5.5-pro so they appear adjacent to the other gpt-5.x siblings
(for example, immediately after the "gpt-5.4-nano" entry) to keep the 5.x models
grouped consistently in the array.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0fbd7db7-09df-468e-9e21-8e483b69f1b8

📥 Commits

Reviewing files that changed from the base of the PR and between fac1a7b and 577a975.

📒 Files selected for processing (1)
  • packages/models/src/models/openai.ts

@smakosh
smakosh added this pull request to the merge queue Apr 25, 2026
Merged via the queue into main with commit 62f7174 Apr 25, 2026
17 of 18 checks passed
@smakosh
smakosh deleted the claude/add-gpt-5.5-models-QS0Sd branch April 25, 2026 11:09
steebchen added a commit that referenced this pull request May 7, 2026
## Summary

OpenAI's API has no numeric reasoning-budget primitive — only
`reasoning.effort` (none/minimal/low/medium/high/xhigh). The
`reasoningMaxTokens: true` flag on `gpt-5.5` and `gpt-5.5-pro` (added in
#2076) was unsupported upstream: a request with `reasoning.max_tokens:
1024` is rejected by OpenAI with `Unknown parameter:
'reasoning.max_tokens'`. The flag is dropped from those provider
mappings; the gateway now correctly returns 400 instead of silently
sending a budget that gets stripped or rejected.

The earlier e2e `test.each(reasoningMaxTokensModels)` round-tripped a
real completion against every capable model just to inspect the upstream
request body — wasteful (real reasoning tokens are not free) and the
response-shape assertions duplicated `basic reasoning`. Replaced with
focused unit tests on `prepareRequestBody` covering each provider that
maps the budget:

- `anthropic` → `thinking.budget_tokens`
- `aws-bedrock` → `additionalModelRequestFields.thinking.budget_tokens`
- `google-ai-studio` → `generationConfig.thinkingConfig.thinkingBudget`
- `google-vertex` → `generationConfig.thinkingConfig.thinkingBudget`

The negative e2e in `api-individual.e2e.ts` (gateway returns 400 when
`reasoning.max_tokens` is sent to a non-capable model) is kept — it
short-circuits at validation, no provider call.

## Test plan
- [x] `pnpm vitest run
packages/actions/src/prepare-request-body.spec.ts` — 35/35 pass,
including 4 new forwarding tests.
- [x] `pnpm vitest run -c vitest/vitest.e2e.config.mts
apps/gateway/src/api-individual.e2e.ts -t "reasoning.max_tokens error"`
— gateway 400 path still verified.
- [x] `pnpm format` clean; full build succeeds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Corrected reasoning.max_tokens support status for gpt-5.5 and
gpt-5.5-pro models on OpenAI and Azure.
* Enhanced validation to reject reasoning.max_tokens requests on models
that don't support this feature with appropriate error messaging.

* **Tests**
* Added end-to-end tests for reasoning.max_tokens handling and
validation across providers.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
pull Bot pushed a commit to soitun/llmgateway that referenced this pull request May 7, 2026
…nco#2079)

## Summary

OpenAI's API has no numeric reasoning-budget primitive — only
`reasoning.effort` (none/minimal/low/medium/high/xhigh). The
`reasoningMaxTokens: true` flag on `gpt-5.5` and `gpt-5.5-pro` (added in
theopenco#2076) was unsupported upstream: a request with `reasoning.max_tokens:
1024` is rejected by OpenAI with `Unknown parameter:
'reasoning.max_tokens'`. The flag is dropped from those provider
mappings; the gateway now correctly returns 400 instead of silently
sending a budget that gets stripped or rejected.

The earlier e2e `test.each(reasoningMaxTokensModels)` round-tripped a
real completion against every capable model just to inspect the upstream
request body — wasteful (real reasoning tokens are not free) and the
response-shape assertions duplicated `basic reasoning`. Replaced with
focused unit tests on `prepareRequestBody` covering each provider that
maps the budget:

- `anthropic` → `thinking.budget_tokens`
- `aws-bedrock` → `additionalModelRequestFields.thinking.budget_tokens`
- `google-ai-studio` → `generationConfig.thinkingConfig.thinkingBudget`
- `google-vertex` → `generationConfig.thinkingConfig.thinkingBudget`

The negative e2e in `api-individual.e2e.ts` (gateway returns 400 when
`reasoning.max_tokens` is sent to a non-capable model) is kept — it
short-circuits at validation, no provider call.

## Test plan
- [x] `pnpm vitest run
packages/actions/src/prepare-request-body.spec.ts` — 35/35 pass,
including 4 new forwarding tests.
- [x] `pnpm vitest run -c vitest/vitest.e2e.config.mts
apps/gateway/src/api-individual.e2e.ts -t "reasoning.max_tokens error"`
— gateway 400 path still verified.
- [x] `pnpm format` clean; full build succeeds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Corrected reasoning.max_tokens support status for gpt-5.5 and
gpt-5.5-pro models on OpenAI and Azure.
* Enhanced validation to reject reasoning.max_tokens requests on models
that don't support this feature with appropriate error messaging.

* **Tests**
* Added end-to-end tests for reasoning.max_tokens handling and
validation across providers.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants