Skip to content

fix(responses): tolerate null content parts and trace parse failures - #955

Merged
mcowger merged 2 commits into
mainfrom
fix/jev-price-display
Sep 29, 2026
Merged

mcowger merged 2 commits into
mainfrom
fix/jev-price-display

Conversation

@mcowger

@mcowger mcowger commented Sep 29, 2026

Copy link
Copy Markdown
Owner

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

  • Responses API requests with null entries in input, in message content, or in reasoning summaries no longer fail with null is not an object (evaluating 'part.type'). The empty entries are now skipped.
  • Debug tracing now records requests that fail while being read, across the Responses, Chat Completions, Messages, Completions, Gemini and Images endpoints. Before this change, such requests produced no debug trace even with debug capture turned on.

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.
@mcowger
mcowger merged commit a924bff into main Sep 29, 2026
3 checks passed
@mcowger
mcowger deleted the fix/jev-price-display branch September 29, 2026 23:38
@github-actions

Copy link
Copy Markdown
Contributor

✅ OpenCodeReview: Review complete: 0 finding(s) across 7 selected item(s).

@github-actions

Copy link
Copy Markdown
Contributor

🔍 OpenCodeReview — detailed findings

✅ Passing — no critical/high findings.

Reviewed 7 file(s), 0 finding(s) total.

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.

1 participant