Repository navigation
Conversation
GoDiao
left a comment
There was a problem hiding this comment.
Thanks @jay23606, and welcome to DreamCoder! The change itself is right: with thinking on, responses_reasoning now sends reasoning: { effort, summary: "auto" }, a model that can turn thinking off still gets only { effort: "none" }, and the response side already turns summaries into thinking blocks (openaiResponsesStreamToAnthropic.ts:332-345 for streaming, openaiResponsesToAnthropic.ts without streaming, reasoningReplay.ts for the next turn). Reverting requestRules.ts fails both updated tests. A few things before we merge.
Must fix
CI fails on this PR. The ChatGPT subscription path builds its request through the same rules and the same Responses transform (src/services/openaiAuth/fetch.ts:37-45), so it now sends summary: "auto" too, and src/services/openaiAuth/fetch.test.ts:119 still expects { effort: 'high' }. Sending the summary there is right: Codex itself sends summary whenever the model supports it, with auto as the default (codex-rs/core/src/client.rs, build_reasoning). Please update that expectation, and run the full bun test before pushing; the PR only ran proxy-model-rules.test.ts.
Should fix
1. Run the checks #295 lists under "To check before implementing", and put the results in the PR description. #295 measured only non-streaming requests, so before we change every Responses provider we'd like to see:
- a streamed request with
summary: "auto"showing summary text arriving as thinking; - a second turn that replays the reasoning item with both
summaryandencrypted_content, accepted by the upstream; - what other Responses-compatible endpoints do with
reasoning.summary: accept, ignore or reject.
You don't need a paid key for this: OpenRouter's Responses endpoint (/api/v1/responses) has free models (the :free ones, several of which support reasoning, for example the Nemotron and Gemma models). For OpenAI directly, the Codex behaviour above is enough for us unless you have an OpenAI key to check the organization-verification case. If any of these rejects the field, say so; the summary would then need to be a rule a site or user can turn off rather than a fixed field.
2. model-rules.md still describes the old request. The dialect table (docs/features/harness/model-rules.md:458) shows reasoning:{effort:L} for responses_reasoning, and item 6 of the reasoning replay section (around line 750) says reasoning summaries are not requested. P-REQ-08 now points readers to that section, so the two contradict each other.
3. P-REQ-08's status line. The new sentence follows "已在 #264 修复:…", so it reads as if #264 added the summary. Please say what each PR did, e.g. #264 added include, #297 requests reasoning.summary: "auto".
4. CHANGELOG. #295 is a bug, so the entry fits under ### Fixed. It should reference the PR and end with a thank-you like the other external entries: (#297). Thanks @jay23606. Please describe what the user sees ("only a signature" isn't visible to them), for example: "Providers in the OpenAI Responses format show the model's thinking in the conversation instead of none."
Notes
- A model whose thinking can't be turned off (e.g.
gpt-6.1-sol, perproxy-model-rules.test.ts:144) now requests a summary even when the user turned thinking off. That's fine, but "when thinking is on" in the CHANGELOG and status line isn't quite accurate. - The "Regression test: …" line at the end of the PR description repeats the Testing section; please drop it.
Signed-off-by: jay23606 <4602056+jay23606@users.noreply.github.com>
bea71bd to
8b06751
Compare
Signed-off-by: jay23606 <4602056+jay23606@users.noreply.github.com>
|
This round changed item 4 of the 现状 list in docs/features/harness/proxy/transport.md, which said Responses requests do not set reasoning.summary; it now says they set summary: "auto" when thinking is on. The fetch.test.ts:119 expectation, the model-rules.md dialect table and replay item 6, the P-REQ-08 status line and the CHANGELOG entry already read as requested, and the focused tests pass. The live OpenRouter checks were not run because no OpenRouter key is available in this environment, and the full bun test run fails on this Windows checkout from missing modules (@dagrejs/dagre, katex) and tar errors. |
|
No code changed in this round. The CI expectation at src/services/openaiAuth/fetch.test.ts:119 already reads { effort: 'high', summary: 'auto' }, and the two focused test files pass (65 passed, 0 failed). The model-rules table, item 6, the P-REQ-08 status line and the CHANGELOG entry already carry the wording you asked for. I could not run the streamed, replay or other-endpoint checks here because this environment has no OpenRouter key, so the PR description still lists them as unverified. |
Problem
With a provider in the OpenAI Responses format, the model thinks but the conversation shows no thinking text. The proxy sent
reasoning: { effort }only and never asked forreasoning.summary, so Responses returned reasoning items with an empty summary and onlyencrypted_content.Change
When thinking is on, the
responses_reasoningdialect now sendsreasoning: { effort, summary: "auto" }. The request type allows the optionalsummaryfield. P-REQ-08 and the model-rules documentation now distinguish the reasoning replay added in #264 from the summary request in this PR. The CHANGELOG describes the visible result.Testing
bun test src/services/openaiAuth/fetch.test.ts src/server/__tests__/proxy-model-rules.test.ts --randomize --seed=1: 65 passed, 0 failed.bun teston Windows with Bun 1.4.5, frozen root andvendor/showaidependencies, and the pinned ripgrep prepared: 3,387 passed, 27 skipped, 10 failed (3,424 tests, 252.69 seconds). The failures were in artifact/deck path and symlink-boundary tests, CLI environment/session startup tests, the deck-edit integration test, and a Claude billing-attribution test. I have not established whether these failures reproduce on Linux. The PR checks currently report GitGuardian success; hosted project test checks are not reported yet.Responses compatibility checks
The non-streaming measurements reported in #295 (2026-11-20) found that a third-party GPT-6 Luna gateway returned
encrypted_contentfor all requests and produced summary text for a multi-step task withsummary: "auto", but not for a short task. OpenRouter returned HTTP 200 for GPT-5 mini and Claude Haiku withsummary: "auto"; GPT-5 mini returned summary text, while Claude Haiku returned reasoning content with or without the parameter. Those measurements predate this PR and were not repeated here.This environment has no OpenRouter API key, so live streaming, replaying a reasoning item containing both
summaryandencrypted_content, and compatibility with other Responses endpoints remain unverified. The automated tests cover streamed summary conversion and replay serialization. No rejection has been observed that would require making the summary field configurable.Fixes #295