Skip to content

[Bug]: Chat Completions translator omits reasoning.summary; gpt-6-astra 400s after tool turns #4628

Description

@rjoleinik

Client or integration

Direct HTTP/API client

Area

Proxy and routing

Summary

OpenCodex 2.55.0 translates Chat Completions history into Responses input items without a summary field on type: "reasoning" items. A subsequent gpt-6-astra turn that replays that history is rejected by the Responses backend with HTTP 400 missing_required_parameter for input[N].summary.

A new Chat Completions conversation hits the same error after the first tool/reasoning round-trip. This is not a stuck client transcript.

Expected: chatCompletionsToResponsesBody emits reasoning items with a summary array, matching the Claude inbound translator (summary: [{ type: "summary_text", text: ... }] or summary: []).

Reproduction

  1. Run stock OpenCodex 2.55.0 (@bitkyc08/opencodex) as the proxy.
  2. From any Chat Completions client, send gpt-6-astra (reasoning enabled) to OpenCodex /v1/chat/completions with tools.
  3. First assistant turn returns reasoning plus at least one tool call; the client posts the tool result.
  4. OpenCodex translates the follow-up via chatCompletionsToResponsesBody in src/chat/inbound.ts.
  5. The translated input item is { type: "reasoning", content: [{ type: "reasoning_text", text }] } with no summary key.
  6. The upstream Responses API returns 400: missing required parameter input[N].summary (N is the reasoning item index after preamble/tool items).

Suggested one-line shape (same file, assistant branch):

input.push({
  type: "reasoning",
  summary: [{ type: "summary_text", text: reasoningText }],
  content: [{ type: "reasoning_text", text: reasoningText }],
});

Version

2.55.0

Operating system

macOS 26.6.2

Provider and model

openai / gpt-6-astra

Logs or error output

Error: 400: {"message":"[ObjectParam] [input[17].summary] [missing_required_parameter] Missing required parameter: 'input[17].summary'.","type":"invalid_request_error","param":null,"code":"invalid_request_error"}

The index 17 is from one captured turn; the stable defect is the missing summary key on the reasoning item, not that specific index.

Screenshots and supporting files

No response

Redacted configuration

{
  "proxy": "opencodex /v1/chat/completions",
  "model": "gpt-6-astra",
  "client_api": "openai-chat-completions",
  "reasoning": true,
  "tools": true
}

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingproxyHTTP proxy, routing, reverse-proxy / management authtoolstool_calls, MCP, web-search / sidecar tools

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions