MTPLX icon indicating copy to clipboard operation
MTPLX copied to clipboard

[Responses API] requests rejected when Codex clients send reasoning_summary_delivery in stream_options/reasoning

Open tao7465465789 opened this issue 1 month ago • 1 comments

Summary

Clients that follow the latest Codex desktop app (build 26.1016, binary updated 2026-10) no longer work against MTPLX: every turn is rejected with

Responses API: stream_options has unsupported key(s): reasoning_summary_delivery

The Codex client (both the desktop app and the bundled codex CLI binary) now sends a reasoning_summary_delivery key — both inside stream_options and inside the reasoning object (the client's string table lists it alongside the other reasoning keys: effort, summary, context, sequential_cutoff). MTPLX 2.12.2's strict validation in server/responses.py rejects any unknown key in _validate_stream_options() and _reasoning_to_chat(), so the whole request fails with a 400 and the client cannot submit any message at all.

Environment

  • mtplx 2.12.2 (latest on PyPI), macOS / Apple Silicon, python -m mtplx.server.openai
  • Codex desktop app build 26.1016 used as a custom wire_api = "responses" provider

Reproduction

curl -N -X POST http://127.0.0.1:8001/v1/responses \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "<your model id>",
    "input": "Say hi",
    "stream": true,
    "max_output_tokens": 16,
    "stream_options": {"reasoning_summary_delivery": "auto"},
    "reasoning": {"effort": "low", "summary": "auto", "reasoning_summary_delivery": "auto"}
  }'
# -> 400: {"error":{"message":"Responses API: stream_options has unsupported key(s): reasoning_summary_delivery", ...}}

Suggested fix

MTPLX streams reasoning inline and emits no separate reasoning-summary item, so the key can be accepted and ignored. Minimal change (what I am running locally):

--- a/mtplx/server/responses.py
+++ b/mtplx/server/responses.py
@@ -521,7 +521,12 @@
         return None, None
     if not isinstance(reasoning, Mapping):
         raise unsupported("reasoning must be an object")
-    unknown = sorted(set(reasoning) - {"effort", "summary"})
+    # Newer Codex clients also send `reasoning_summary_delivery` in this
+    # object; MTPLX streams reasoning inline and emits no separate summary
+    # item, so the key is accepted and ignored.
+    unknown = sorted(
+        set(reasoning) - {"effort", "summary", "reasoning_summary_delivery"}
+    )
     if unknown:
         raise unsupported("reasoning has unsupported key(s): " + ", ".join(unknown))
@@ -549,7 +554,14 @@
         return
     if not isinstance(stream_options, Mapping):
         raise unsupported("stream_options must be an object")
-    unknown = sorted(set(stream_options) - {"include_usage", "include_obfuscation"})
+    # Newer Codex clients (>= 26.1016) send `reasoning_summary_delivery` in
+    # stream_options to control reasoning-summary delivery; MTPLX streams
+    # reasoning inline and emits no separate summary item, so the key is
+    # accepted and ignored.
+    unknown = sorted(
+        set(stream_options)
+        - {"include_usage", "include_obfuscation", "reasoning_summary_delivery"}
+    )
     if unknown:
         raise unsupported(
             "stream_options has unsupported key(s): " + ", ".join(unknown)

With the patch applied, the same request streams normally.

Longer-term consideration

Clients evolve faster than local server releases, and each new client-only field becomes a hard 400 for every deployment pinned to the current release. You may want to consider an opt-in lenient mode (e.g. --lenient-stream-options / config flag) that accepts unknown stream_options/reasoning keys with a log warning instead of rejecting the request — at least for these two fields, which are pure delivery hints the local server can safely ignore.

Happy to send this as a PR instead if you prefer.

tao7465465789 avatar Oct 23 '26 10:10 tao7465465789

Fixed in 2.12.3. The Responses API now accepts reasoning_summary_delivery, so Codex desktop 26.1016 and its CLI work again. Thanks for the report.

https://github.com/youssofal/MTPLX/releases/tag/v2.12.3

youssofal avatar Nov 06 '26 21:11 youssofal