Skip to content

OpenCode Go: GPT-5.6 Luna truncates streaming tool-call responses #40888

Closed as not planned

Description

@emanuelmustea

Description

Summary

GPT-5.6 Luna through the OpenCode Go provider fails when a request uses streaming together with tool definitions. The upstream stream emits response.created and then fails or terminates during a tool call. The same model works when the request is non-streaming/buffered.

Environment

  • Provider: OpenCode Go
  • Endpoint: https://opencode.ai/zen/go/v1
  • Model: gpt-5.6-luna
  • Client/proxy: OpenCodex 2.10.2
  • OS: macOS
  • Adapter: OpenAI-compatible chat adapter; same behavior observed through a Responses adapter

Reproduction matrix

Request Result
stream:false + tools Works
stream:true + no tools Works
stream:true + tools Fails with HTTP 502 / truncated tool-call stream

Observed error: upstream stream ended mid tool call without a terminal signal — possible truncation

Expected behavior

A streaming tool request should produce a complete terminal tool-call event sequence, or return a normal structured API error.

Workaround

Buffer upstream (stream:false) and reframe the completed response as downstream SSE. This removes token-by-token output but allows the tool loop to complete.

Plugins

OpenCode Go provider (openai-chat adapter); OpenCodex 2.10.2

OpenCode version

OpenCode Go endpoint; OpenCodex 2.10.2 client/proxy

Steps to reproduce

  1. Send a request to the OpenCode Go endpoint using model gpt-5.6-luna, at least one function tool, and streaming enabled.
  2. Observe response.created, followed by HTTP 502 or stream termination during the tool call.
  3. Repeat with stream:false + the same tool: it completes.
  4. Repeat with streaming but no tools: it completes.

Screenshot and/or share link

No response

Operating System

macOS

Terminal

Codex Desktop integrated environment

Activity

  1. github-actions commented on Oct 7, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions