Skip to content

fix: skip reasoning.summary for o1-pro and gpt-5-chat models#2173

Merged
dgageot merged 1 commit intodocker:mainfrom
dgageot:board/fix-https-github-com-docker-docker-agent-3744de66
Mar 19, 2026
Merged

fix: skip reasoning.summary for o1-pro and gpt-5-chat models#2173
dgageot merged 1 commit intodocker:mainfrom
dgageot:board/fix-https-github-com-docker-docker-agent-3744de66

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Mar 19, 2026

Summary

Fixes #2165 and #2166.

The OpenAI API rejects reasoning.summary for o1-pro and gpt-5-chat-latest models. This PR fixes both issues:

  1. gpt-5-chat-* variants are excluded from isOpenAIReasoningModel since they are non-reasoning chat models and should not receive any reasoning parameters.

  2. o1-pro remains classified as a reasoning model (so reasoning.effort still works), but a new supportsReasoningSummary helper skips setting reasoning.summary for it.

Changes

  • isOpenAIReasoningModel: early return false for gpt-5-chat* prefix
  • New supportsReasoningSummary function: returns false for o1-pro* models
  • CreateResponseStream: conditionally sets reasoning.summary only when supported
  • Tests added for both isOpenAIReasoningModel and supportsReasoningSummary

Exclude gpt-5-chat* variants from isOpenAIReasoningModel since they are
non-reasoning chat models. Add supportsReasoningSummary helper to avoid
sending reasoning.summary to o1-pro models which reject that parameter.

Fixes docker#2165
Fixes docker#2166

Assisted-By: docker-agent
@dgageot dgageot requested a review from a team as a code owner March 19, 2026 14:16
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

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

Assessment: 🟢 APPROVE

No bugs detected in this PR. The changes correctly implement conditional logic to skip reasoning.summary for models that don't support it (o1-pro and gpt-5-chat variants), while maintaining support for reasoning.effort on o1-pro. The implementation includes:

  • Proper case-insensitive string handling
  • Comprehensive test coverage for both helper functions
  • Clear separation of concerns between reasoning model detection and summary support
  • Appropriate debug logging

The fix addresses the reported API rejection issues for these specific models.

@dgageot dgageot merged commit 5579669 into docker:main Mar 19, 2026
8 checks passed
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.

openai/o1-pro not supported

2 participants