[Bug] Custom OpenAI-compatible provider errors with "Unknown parameter: 'reasoningSummary'" for GPT-5 series models #9294

Open
opened 2026-02-16 18:12:07 -05:00 by yindo · 3 comments
Owner

Originally created by @Yang-Kevin-DH on GitHub (Feb 13, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Summary

OpenCode automatically injects the reasoningSummary parameter (likely defaulting to "auto" or similar) when calling GPT-5 series models (e.g., gpt-5, gpt-5-codex). This works for official OpenAI endpoints but breaks with custom OpenAI-compatible providers routed through LiteLLM (or Azure), where the backend models do not support this parameter.

This is a compatibility issue for users routing GPT-5-named models to third-party backends (e.g., DeepSeek, Gemini, or Azure deployments) via LiteLLM proxy.

Steps to Reproduce

  1. Configure a custom OpenAI-compatible provider in opencode.jsonc:
    "provider": {
      "compatible": {
        "npm": "@ai-sdk/openai-compatible",
        "options": {
          "baseURL": "https://your-litellm-proxy/v1",
          "apiKey": "{env:YOUR_KEY}"
        },
        "models": {
          "gpt-5-codex": { "name": "GPT-5 Codex" },
          // other GPT-5 series models
        }
      }
    },
    "model": "compatible/gpt-5-codex"
    
    

Plugins

None

OpenCode version

V1.1.65

Steps to reproduce

litellm.BadRequestError: litellm.ContentPolicyViolationError: litellm.ContentPolicyViolationError: AzureException - Unknown parameter: 'reasoningSummary'.
model=gpt-5. content_policy_fallback=None. fallbacks=None.

Screenshot and/or share link

No response

Operating System

Windows11

Terminal

Powershell

Originally created by @Yang-Kevin-DH on GitHub (Feb 13, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description ### Summary OpenCode automatically injects the `reasoningSummary` parameter (likely defaulting to "auto" or similar) when calling GPT-5 series models (e.g., `gpt-5`, `gpt-5-codex`). This works for official OpenAI endpoints but breaks with custom OpenAI-compatible providers routed through LiteLLM (or Azure), where the backend models do not support this parameter. This is a compatibility issue for users routing GPT-5-named models to third-party backends (e.g., DeepSeek, Gemini, or Azure deployments) via LiteLLM proxy. ### Steps to Reproduce 1. Configure a custom OpenAI-compatible provider in `opencode.jsonc`: ```json "provider": { "compatible": { "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "https://your-litellm-proxy/v1", "apiKey": "{env:YOUR_KEY}" }, "models": { "gpt-5-codex": { "name": "GPT-5 Codex" }, // other GPT-5 series models } } }, "model": "compatible/gpt-5-codex" ### Plugins None ### OpenCode version V1.1.65 ### Steps to reproduce litellm.BadRequestError: litellm.ContentPolicyViolationError: litellm.ContentPolicyViolationError: AzureException - Unknown parameter: 'reasoningSummary'. model=gpt-5. content_policy_fallback=None. fallbacks=None. ### Screenshot and/or share link _No response_ ### Operating System Windows11 ### Terminal Powershell
yindo added the windowsbug labels 2026-02-16 18:12:07 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 13, 2026):

This issue might be related to existing issues about custom providers receiving unsupported parameters. Please check:

  • #5421: @ai-sdk/openai-compatible max_tokens error for GPT 5.x (similar parameter compatibility issue with custom providers)
  • #12113: Azure models fail due to reasoning_effort being sent even with --variant none (same pattern of reasoning parameters being sent to backends that don't support them)

These issues may help understand the broader parameter-handling pattern and could be relevant to the solution.

@github-actions[bot] commented on GitHub (Feb 13, 2026): This issue might be related to existing issues about custom providers receiving unsupported parameters. Please check: - #5421: @ai-sdk/openai-compatible max_tokens error for GPT 5.x (similar parameter compatibility issue with custom providers) - #12113: Azure models fail due to reasoning_effort being sent even with --variant none (same pattern of reasoning parameters being sent to backends that don't support them) These issues may help understand the broader parameter-handling pattern and could be relevant to the solution.
Author
Owner

@Yang-Kevin-DH commented on GitHub (Feb 13, 2026):

Could help to fix as of add a parameter to trun off/on the 'reasoningSummary'?

@Yang-Kevin-DH commented on GitHub (Feb 13, 2026): Could help to fix as of add a parameter to trun off/on the 'reasoningSummary'?
Author
Owner

@acanova commented on GitHub (Feb 15, 2026):

Having the same problem recently, using LiteLLM base URL with GPT-5.2...

Some logs:
litellm.BadRequestError: OpenAIException - Error code: 400 - {'path': '/ai-orchestration-api/v1/openai/chat/completions',
'history': [{'response': {'response': '{\n "error": {\n "message": "Unknown parameter: 'reasoning_summary'.",\n "type": "invalid_request_error",\n "param": "reasoning_summary",\n "code": "unknown_parameter"\n }\n}

Found this, maybe useful for a fix?
https://github.com/code-yeongyu/oh-my-opencode/issues/1788
https://github.com/code-yeongyu/oh-my-opencode/pull/1794

@acanova commented on GitHub (Feb 15, 2026): Having the same problem recently, using LiteLLM base URL with GPT-5.2... Some logs: litellm.BadRequestError: OpenAIException - Error code: 400 - {'path': '/ai-orchestration-api/v1/openai/chat/completions', 'history': [{'response': {'response': '{\n "error": {\n "message": "Unknown parameter: \'reasoning_summary\'.",\n "type": "invalid_request_error",\n "param": "reasoning_summary",\n "code": "unknown_parameter"\n }\n} Found this, maybe useful for a fix? https://github.com/code-yeongyu/oh-my-opencode/issues/1788 https://github.com/code-yeongyu/oh-my-opencode/pull/1794
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9294