fix: route GPT-5.6 tools+reasoning through the Responses API - #7
Merged
Conversation
New live suite (build tag e2e, OPENAI_API_KEY from env or .env, model overridable via OPENAI_E2E_MODEL, default gpt-5-mini): - TestE2EOpenAIReasoningBuffered: Thinking=medium must surface reasoning (reasoning_content text or Usage.ReasoningTokens) with canonical finish. - TestE2EOpenAIReasoningStreaming: reasoning deltas/tokens are probed softly — gpt-5-mini sometimes skips reasoning on short prompts, and provider-side elision is not an SDK contract. - TestE2EOpenAIReasoningDisabled: Thinking=disabled round-trips cleanly (effort omitted, call succeeds). Verified live: buffered observed 128 reasoning tokens; all three pass.
Chat Completions rejects function tools with a non-none reasoning_effort on gpt-5.6-*, and the learn-once fallback pinned effort to none. Those calls now go to POST /v1/responses so thinking stays on. Co-authored-by: Cursor <cursoragent@cursor.com>
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
reasoning_effort; the learn-once fallback pinned effort tononeand silently disabled reasoning.POST /v1/responseswithreasoning.effortand a summary so thinking stays on;thinking=disabledstill uses Chat Completions withnone.gpt-5.6-lunawith tools:POST /v1/responses, reasoning tokens present.Test plan
go test -count=1 -timeout 120s .go test -tags e2e -run TestE2EOpenAIReasoning -timeout 5mwithOPENAI_E2E_MODEL=gpt-5.6-luna