Skip to content

Handle thinking setting for GPT-5.5#5196

Merged
dsfaccini merged 2 commits intopydantic:mainfrom
dsfaccini:add-gpt-5.5-support
Apr 24, 2026
Merged

Handle thinking setting for GPT-5.5#5196
dsfaccini merged 2 commits intopydantic:mainfrom
dsfaccini:add-gpt-5.5-support

Conversation

@dsfaccini
Copy link
Copy Markdown
Collaborator

@dsfaccini dsfaccini commented Apr 24, 2026

OpenAI shipped gpt-5.5 and gpt-5.5-pro on 2026-04-23. This PR flips the profile detection so 5.5 gets the same handling as 5.4 (adds 'gpt-5.5' to the is_gpt_5_1_plus tuple in openai_model_profile). Runtime is already permissive — OpenAIModelName = str | AllModels means Agent('openai:gpt-5.5') works today with a plain string.

Capability shape verified against the Responses API: gpt-5.5 matches gpt-5.4 exactly (effort none/low/medium/high/xhigh, sampling params work with effort='none'). gpt-5.5-pro inherits the same medium/high/xhigh-only restriction as the already-listed gpt-5.4-pro; pre-existing gap, out of scope here.

Adding the openai:gpt-5.5* literals to KnownModelName is split into a follow-up draft PR, blocked on the openai SDK shipping gpt-5.5 in its ChatModel literal (current 2.32.0 tops out at 5.4, and tests/models/test_model_names.py strictly enforces parity).

Checklist

  • Any AI generated code has been reviewed line-by-line by the human PR author, who stands by it.
  • No breaking changes in accordance with the version policy.
  • PR title is fit for the release changelog.

@github-actions github-actions Bot added size: S Small PR (≤100 weighted lines) feature New feature request, or PR implementing a feature (enhancement) labels Apr 24, 2026
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

The openai SDK (2.32.0) does not yet include gpt-5.5 in its ChatModel literal,
and tests/models/test_model_names.py strictly enforces parity. Literals will
be added in a follow-up PR once the SDK ships gpt-5.5.
@dsfaccini dsfaccini changed the title Add openai:gpt-5.5 and openai:gpt-5.5-pro Treat gpt-5.5 family as gpt-5.1+ in OpenAI profile Apr 24, 2026
@dsfaccini dsfaccini changed the title Treat gpt-5.5 family as gpt-5.1+ in OpenAI profile Handle thinking setting for GPT-5.5 Apr 24, 2026
@dsfaccini dsfaccini added new models Support for new model(s) openai labels Apr 24, 2026
@dsfaccini dsfaccini merged commit 8fb4667 into pydantic:main Apr 24, 2026
54 checks passed
Alex-Resch pushed a commit to Alex-Resch/pydantic-ai that referenced this pull request Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature request, or PR implementing a feature (enhancement) new models Support for new model(s) openai size: S Small PR (≤100 weighted lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant