Repository navigation
Conversation
… chat completions
When a Responses-API client (e.g. Claude Code) routes through Plexus to a
Chat Completions provider, the nested `reasoning: { effort, summary }`
object was forwarded verbatim onto the outbound Chat Completions payload.
Chat Completions does not accept that nested object — it expects the
top-level `reasoning_effort` string — so strict upstreams rejected the
request with `UNKNOWN_FIELD: reasoning.effort`.
Translate the nested object to `reasoning_effort` on cross-format routes
(responses -> chat). Same-format (chat -> chat) pass-through is left
untouched: it starts from the client's originalBody, which already
preserves whatever reasoning shape the chat client sent.
Fixes mcowger#783
Co-Authored-By: Claude <noreply@anthropic.com>
|
Failed to generate code suggestions for PR |
Owner
Author
|
Verification complete — CI passed (Typecheck + backend tests). Submitting upstream PR to mcowger/plexus. |
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 mcowger#783 (cross-posted for verification on fork).
When a Responses-API client (e.g. Claude Code) routes through Plexus to a Chat Completions provider, the nested
reasoning: { effort, summary }object was forwarded verbatim onto the outbound Chat Completions payload. Chat Completions does not accept that nested object — it expects the top-levelreasoning_effortstring — so strict upstreams rejected the request withUNKNOWN_FIELD: reasoning.effort.This PR translates the nested object to
reasoning_efforton cross-format routes (responses -> chat). Same-format (chat -> chat) pass-through is left untouched.Verification PR for upstream submission — do not merge here.