Skip to content

Bug: claude-opus-4.7 via GitHub Copilot fails with 'output_config: Extra inputs are not permitted' #24527

Description

@jimicze

Bug Report

Description

When using claude-opus-4.7 model via the github-copilot provider, every LLM request fails immediately with:

AI_APICallError: output_config: Extra inputs are not permitted

The model is completely unusable — no response is ever generated.

Steps to Reproduce

  1. Configure OpenCode to use github-copilot provider with claude-opus-4.7 model
  2. Start a session and send any message
  3. Request fails with the error above

Expected Behavior

The request should succeed and the model should respond normally.

Actual Behavior

The API call to https://api.githubcopilot.com/v1/messages is rejected with a Pydantic validation error. OpenCode includes an output_config field in the request body that claude-opus-4.7 does not accept.

Log Evidence

From ~/.local/share/opencode/log/:

ERROR service=llm providerID=github-copilot modelID=claude-opus-4.7
  error=AI_APICallError url=https://api.githubcopilot.com/v1/messages

ERROR service=session.processor
  error=output_config: Extra inputs are not permitted
  stack=AI_APICallError: output_config: Extra inputs are not permitted

The error occurs on every request attempt, twice per attempt (first try + retry).

Root Cause (Hypothesis)

OpenCode unconditionally includes an output_config field in the Anthropic Messages API request body. The claude-opus-4.7 model as exposed via GitHub Copilot proxy (api.githubcopilot.com/v1/messages) does not support this parameter and rejects it with Pydantic strict-mode validation error.

output_config appears to be a newer/experimental Anthropic API feature (possibly for extended thinking or output format configuration) not yet supported by all models or provider proxies.

Suggested Fix

Conditionally omit output_config from the request body when the model/provider does not support it, or implement a fallback retry without the parameter when this specific error is received.

Test Results

Version Config Result
v1.14.29 claude-opus-4.7 without reasoningEffort ✅ works
v1.14.18 claude-opus-4.7 + reasoningEffort: medium ❌ fails (original bug)
dev (0.0.0-dev-202604281959) claude-opus-4.7 + reasoningEffort: medium ✅ fixed

Environment

  • OpenCode version: v1.14.18 (latest at time of report; current latest is v1.14.29)
  • Provider: github-copilot
  • Model: claude-opus-4.7
  • Platform: macOS (darwin)
  • API endpoint: https://api.githubcopilot.com/v1/messages

Activity

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

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions