Repository navigation
fix(responses): tolerate null content parts and trace parse failures - #955
Merged
Merged
Conversation
opencode can send null entries in Responses input content arrays, which crashed convertContentParts with 'null is not an object (evaluating part.type)' and failed the request with a 500 before routing.
Inference routes called DebugManager.startLog only after parseRequest succeeded, so requests that failed during parsing never produced a debug trace even with capture enabled. Start the log before parsing in the responses, chat, messages, completions, gemini and images routes.
Contributor
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 7 selected item(s). |
Contributor
🔍 OpenCodeReview — detailed findings✅ Passing — no critical/high findings. Reviewed 7 file(s), 0 finding(s) total. |
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.
Overview
Some clients, including opencode, occasionally send Responses API requests with empty (
null) entries in their message content. Plexus rejected these requests with a server error. Plexus now ignores those empty entries, and requests that fail while being read are now captured by debug tracing, so problems like this can be diagnosed.🐛 Bug Fixes
nullentries ininput, in messagecontent, or in reasoning summaries no longer fail withnull is not an object (evaluating 'part.type'). The empty entries are now skipped.