-
Notifications
You must be signed in to change notification settings - Fork 1.3k
OpenAI-compatible non-streaming Responses requests fail on Codex pool (Hindsight 0.10.1) #6162
Copy link
Copy link
Closed
Labels
account-poolOAuth, credentials, Codex pool, quota, failover, plansOAuth, credentials, Codex pool, quota, failover, plansbugSomething isn't workingSomething isn't workingpriority: P2Medium: provider/client-specific bug with a workaround, bounded enhancement tied to a tracked issue,Medium: provider/client-specific bug with a workaround, bounded enhancement tied to a tracked issue,providerProvider adapters, OpenAI-compat presets, upstream API quirksProvider adapters, OpenAI-compat presets, upstream API quirksprovider-compatibilityProvider compatibility reportsProvider compatibility reportsstreamingSSE, WebSocket, terminal stream framesSSE, WebSocket, terminal stream framestoolstool_calls, MCP, web-search / sidecar toolstool_calls, MCP, web-search / sidecar tools
Description
Activity
Metadata
Metadata
Assignees
Labels
account-poolOAuth, credentials, Codex pool, quota, failover, plansOAuth, credentials, Codex pool, quota, failover, plansbugSomething isn't workingSomething isn't workingpriority: P2Medium: provider/client-specific bug with a workaround, bounded enhancement tied to a tracked issue,Medium: provider/client-specific bug with a workaround, bounded enhancement tied to a tracked issue,providerProvider adapters, OpenAI-compat presets, upstream API quirksProvider adapters, OpenAI-compat presets, upstream API quirksprovider-compatibilityProvider compatibility reportsProvider compatibility reportsstreamingSSE, WebSocket, terminal stream framesSSE, WebSocket, terminal stream framestoolstool_calls, MCP, web-search / sidecar toolstool_calls, MCP, web-search / sidecar tools
Client or integration
OpenAI-compatible SDK: Hindsight 0.10.1's
openai-responsesprovider.Provider or upstream service
OpenAI Codex through an OpenCodex OAuth account pool.
OpenCodex version
Reproduced on 2.64.0. I inspected the v2.69.0 source but have not run this reproduction on 2.69.0, so I am not claiming a runtime failure on that release.
Endpoint or capability
POST /v1/responses, non-streaming requests.Current behaviour
A non-streaming Responses request reaches the Codex pool but returns HTTP 400 with
{"detail":"Stream must be set to true"}. The same model and admission key work withstream:true: HTTP 200 with aresponse.completedevent. OpenCodex's request log identifies the successful route as an OpenAI Codex pool account.A disposable process using Hindsight 0.10.1's actual
OpenAIResponsesLLM.call()path also raisesBadRequestError(HTTP 400) with that detail. Hindsight callsresponses.create(**params)without settingstream; its normal and tool-call request builders both use this pattern:Expected behaviour
The official OpenAI Responses create reference defines
streamas optional; setting it totrueenables server-sent events. An OpenAI-compatible client that omitsstreamor sets it tofalseexpects a complete JSON Response.For a Codex upstream that requires SSE, OpenCodex could make the upstream request with
stream:trueand return a complete JSON Response to a non-streaming client. If this endpoint intentionally supports streaming clients only, please document that limitation so compatible clients can choose another route.Minimal redacted request or reproduction
Control: set
"stream":truein the same request. It returns HTTP 200 and reachesresponse.completed.Actual response or error
Upstream documentation
OpenAI Responses create reference:
streamis optional and enables server-sent events when set totrue.Suggested mapping or implementation notes
A focused implementation should preserve complete output and usage, fail closed when no terminal event arrives, retain the existing storage semantics, and leave
stream:truecallers unchanged.Additional context and attachments
The related PR #293 proposed SSE-to-JSON buffering but was closed without merge. Maintainer review identified incomplete reconstruction of tool calls, reasoning summaries, refusals, and annotations; false HTTP 200 on truncated streams; and unintended
storechanges.Checks