fix(openai): omit reasoning item id when store is false#12952
Open
giulio-leone wants to merge 1 commit intovercel:mainfrom
Open
fix(openai): omit reasoning item id when store is false#12952giulio-leone wants to merge 1 commit intovercel:mainfrom
giulio-leone wants to merge 1 commit intovercel:mainfrom
Conversation
d37411d to
b286a36
Compare
Author
|
Intervention note for this PR: Current blocker appears to be Vercel deployment authorization, not code/test correctness. Observed pattern:
Recommended unblock sequence:
If useful, I can follow up with a PR-by-PR status sweep after authorization is completed. |
Author
|
This PR is ready for review — all CI checks pass, no merge conflicts, and all review threads have been resolved. Ready to merge when approved. 🚀 |
Azure OpenAI rejects reasoning items that include an id field when store is disabled. The Responses API input converter was including id: reasoningId in reasoning messages even in the store=false path. Remove the id field from reasoning messages created in the store=false branch so Azure endpoints accept the payload. Fixes vercel#12687
b286a36 to
ecc1933
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #12687
Azure OpenAI rejects reasoning items that include an
idfield whenstoreis disabled.Root Cause
In
convert-to-openai-responses-input.ts, thestore: falsebranch for reasoning messages was creating objects withid: reasoningId:The
store: truebranch correctly usesitem_referencewithid(line 384). But whenstoreis false, the reasoning content should be sent inline without anid— the same pattern used for reasoning without anitemId(lines 450-454).Fix
Remove
id: reasoningIdfrom the reasoning message object created in thestore: falsepath. ThereasoningIdis still used as the local tracking key inreasoningMessagesfor deduplication, but it is not sent to the API.594/594 OpenAI provider tests pass (2 consecutive clean runs).