icebear0828 Claude Opus 4.6 commited on
Commit
d7a5e25
·
1 Parent(s): 8068f1c

docs: add comment explaining stream:true hardcoding in responses route

Browse files

Codex API only supports streaming, so the proxy always sends stream:true
upstream and uses collect mode to assemble JSON for non-streaming clients.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. src/routes/responses.ts +2 -0
src/routes/responses.ts CHANGED
@@ -218,6 +218,8 @@ export function createResponsesRoutes(
218
  const modelInfo = getModelInfo(modelId);
219
 
220
  // Build CodexResponsesRequest
 
 
221
  const codexRequest: CodexResponsesRequest = {
222
  model: modelId,
223
  instructions: body.instructions,
 
218
  const modelInfo = getModelInfo(modelId);
219
 
220
  // Build CodexResponsesRequest
221
+ // Codex API only supports streaming — stream/store are always true/false.
222
+ // When client sends stream:false, the proxy collects SSE events and returns assembled JSON.
223
  const codexRequest: CodexResponsesRequest = {
224
  model: modelId,
225
  instructions: body.instructions,