Skip to content

v2 provider: HTTP 400 from Copilot model restarts active session server #42089

Closed

Description

@stevoland

Summary

An active session repeatedly restarts when GitHub Copilot rejects gpt-5.6-sol on the /chat/completions endpoint. This interrupts tool calls and requires the user to ask the agent to continue.

Environment

  • opencode version: 0.0.0-next-17297
  • OS: Darwin 25.6.0, arm64
  • Terminal: Ghostty (TERM=xterm-256color, COLORTERM=truecolor)
  • Shell: /bin/zsh
  • Install/channel: v2 next/dev runtime
  • Active plugins:
    • boxedcode-atlassian-mcp.ts
    • boxedcode-box.ts
    • boxedcode-config.ts
    • boxedcode-local.ts
    • boxedcode-task.ts
    • zzz.ts
    • jj.ts
    • boxedcode.js

Reproduction

  1. Configure an agent with "model": "github-copilot/gpt-5.6-sol".
  2. Start a session and perform a multi-step task involving tool calls.
  3. Continue interacting with the session until the provider rejects a request to /chat/completions.

Expected Behavior

Either route the model through a supported endpoint or report the provider error without restarting the active session server. Tool and conversation state should remain usable.

Actual Behavior

The server restarts and interrupts the current operation. This happened repeatedly in the same session, including while invoking an interactive question tool.

The server log contains:

Failed to drain Session
AI.Error: RequestExecutor.execute: Provider request failed with HTTP 400:
model "gpt-5.6-sol" is not accessible via the /chat/completions endpoint

Relevant sanitized stack:

at RequestExecutor.execute (ai/src/route/executor.ts:244:25)
at SessionRunner.callModel (core/src/session/runner/llm.ts:191:32)
at SessionRunner.runSteps (core/src/session/runner/llm.ts:133:16)
at SessionRunner.drain (core/src/session/runner/llm.ts:124:26)
at ServerProcess.start (cli/src/server-process.ts:73:29)

Additional Context

  • The configured provider is github-copilot.
  • The configured agent variant is medium.
  • The failure occurred repeatedly during one session rather than only at startup.
  • After each restart, the user was shown: “The server restarted while you were working. Continue from where you left off without repeating completed work.”
  • No workaround was attempted during the session.

Activity

  1. github-actions commented on Aug 12, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of or related to existing issues. Please check:

  2. santhiprakash commented on Aug 13, 2026

    @santhiprakash

    Hi — I'd like to work on this one. I traced the failure path to the v2 session runner in packages/core/src/session/runner/llm.ts: after publisher.failAssistant durably records the provider AIError (e.g. the Copilot HTTP 400), the function still falls through to return yield* Effect.failCause(stream.cause), which re-throws the raw provider error through SessionRunner.drain. I will open a PR that stops the runner from re-throwing an already-recorded provider failure and instead lets it surface as the durable step failure it already published.

  3. stevoland commented on Aug 13, 2026

    @stevoland
    ContributorAuthor

    fyi: I think there's a couple of things here that I poorly reported.

    Root cause of the service restart was my plugin throwing an exception in setup.

    I'm no longer seeing the /chat/completions error on 0.0.0-next-17403

  4. stevoland commented on Aug 19, 2026

    @stevoland
    ContributorAuthor

    gonna close cos root cause was my bad, although I think exception should be handled better, things moving fast

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions