You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Custom OpenAI-compatible provider errors with "Unknown parameter: 'reasoningSummary'" for GPT-5 series models #13546
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
Configure a custom OpenAI-compatible provider in opencode.jsonc:
Same here, same logs (on Mac though):
litellm.BadRequestError: OpenAIException - Unknown parameter: 'reasoningSummary'.. Received Model Group=openai/gpt-5.2
Available Model Group Fallbacks=None
litellm.BadRequestError: Vertex_aiException BadRequestError - b'{"type":"error","error":{"type":"invalid_request_error","message":"invalid beta flag"},"request_id":"..."}'. Received Model Group=claude-sonnet-4.5
Available Model Group Fallbacks=None
and now I have the same issue with GPT models
litellm.BadRequestError: litellm.ContentPolicyViolationError: litellm.ContentPolicyViolationError: AzureException - Unknown parameter: 'reasoningSummary'.
model=gpt-5.1. content_policy_fallback=None. fallbacks=None.
Set 'content_policy_fallback' - https://docs.litellm.ai/docs/routing#fallbacks. Received Model Group=gpt-5.1
Available Model Group Fallbacks=None
@aizigao That is because the moment you use strings like "gpt-5" in the model's ID or name, opencode considers it a GPT-5 model and starts sending the reasoning fields. The idea is to use a name for the id/name fields that does not include the GPT characters. Here's an example of what I used:
@aizigao That is because the moment you use strings like "gpt-5" in the model's ID or name, opencode considers it a GPT-5 model and starts sending the reasoning fields. The idea is to use a name for the id/name fields that does not include the GPT characters. Here's an example of what I used:这是因为一旦你在模型的 ID 或名称中使用类似“gpt-5”这样的字符串,OpenCode 就会将其视为 GPT-5 模型并开始发送推理字段。因此,我们需要使用不包含 GPT 字符的 ID/名称字段。以下是我使用的示例:
@aizigao That is because the moment you use strings like "gpt-5" in the model's ID or name, opencode considers it a GPT-5 model and starts sending the reasoning fields. The idea is to use a name for the id/name fields that does not include the GPT characters. Here's an example of what I used:
If you're using LiteLLM, adding a separate provider for OpenAI models (GPT-5.4) pointing at @ai-sdk/openai rather than @ai-sdk/openai-compatible should resolve the issue:
"models": {
"azure.gpt-5.1": {
"name": "my-gpt-5.1",
"options": {
"reasoningSummary": null,
}
},
}
This does not work for me ~ on opencode version 1.2.10 oh-my-opencode version 3.8.5
Worked for me!! I'm using gpt-5.1 with variants and was facing the same problem, after adding the "options" part it fixed all of them :) Thanks!
If you're using LiteLLM, adding a separate provider for OpenAI models (GPT-5.4) pointing at @ai-sdk/openai rather than @ai-sdk/openai-compatible should resolve the issue:
Activity
github-actions commentedon Feb 14, 2026
This issue might be related to existing issues about custom providers receiving unsupported parameters. Please check:
These issues may help understand the broader parameter-handling pattern and could be relevant to the solution.
Yang-Kevin-DH commentedon Feb 14, 2026
Could help to fix as of add a parameter to trun off/on the 'reasoningSummary'?
acanova commentedon 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?
code-yeongyu/oh-my-openagent#1788
code-yeongyu/oh-my-openagent#1794
zchrysaylor commentedon Feb 19, 2026
Same here, same logs (on Mac though):
litellm.BadRequestError: OpenAIException - Unknown parameter: 'reasoningSummary'.. Received Model Group=openai/gpt-5.2
Available Model Group Fallbacks=None
X4ndras commentedon Feb 20, 2026
Had a similar issue with Claude:
and now I have the same issue with GPT models
ggbetz commentedon Feb 24, 2026
This worked for me (config in
opencode.json) withv1.20.10:shahrin014 commentedon Feb 24, 2026
This does not work for me ~ on
opencode version 1.2.10
oh-my-opencode version 3.8.5
ayaz commentedon Feb 25, 2026
In my experience, setting it to
nullwould likely not work, but setting it tofalsewill, but at the expense of completely disabling reasoning.dailyherold commentedon Feb 25, 2026
Getting the same error when using Helicone.ai as my gateway for gpt models.
shahrin014 commentedon Feb 26, 2026
#14783 (comment)
1 remaining item
aizigao commentedon Mar 3, 2026
opencode version 1.2.15
ayaz commentedon Mar 3, 2026
@aizigao That is because the moment you use strings like "gpt-5" in the model's ID or name, opencode considers it a GPT-5 model and starts sending the reasoning fields. The idea is to use a name for the id/name fields that does not include the GPT characters. Here's an example of what I used:
aizigao commentedon Mar 3, 2026
I resolve it by add a plugin
I add a plugin to resolve it
add
~/.config/opencode/plugin/myArgPatch.ts
in ~/config/opencode/opencode.jsonc
{ ... "plugin": ["myArgPatch"], }ar27111994 commentedon Mar 14, 2026
+1. Still reproducible on the latest version (tested via Azure and custom provider).
billkuojhgf commentedon Mar 16, 2026
I'm able to call GPT-5.4 with the setup below:
I'm using opencode with version
1.2.27absolutegravitas commentedon Mar 19, 2026
no joy -- still get reasoningSummary unknown parameter.
tried with previous example as follows and get an issue with max_tokens param:
paulgrow-octane commentedon Mar 20, 2026
If you're using LiteLLM, adding a separate provider for OpenAI models (GPT-5.4) pointing at
@ai-sdk/openairather than@ai-sdk/openai-compatibleshould resolve the issue:{ "provider": { "my-litellm-provider": { "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "https://my-provider.url/api/v1" }, "models": { ... } }, "my-litellm-provider-openai": { "npm": "@ai-sdk/openai", "options": { "baseURL": "https://my-provider.url/api/v1" }, "models": { ... } } } }Yang-Kevin-DH commentedon Mar 20, 2026
If you are using the LiteLLM proxy, you can refer to this setting:
{ "$schema": "https://opencode.ai/config.json", "provider": { "custom_provider": { "npm": "@ai-sdk/openai-compatible", "name": "custom_name", "options": { "baseURL": "${your_llm_base_url}" }, "models": { "gpt-5-codex": { "name": "GPT-5 Codex", "options": { "reasoningSummary": null } } } } } }guilherme-deschamps commentedon Mar 20, 2026
Worked for me!! I'm using gpt-5.1 with variants and was facing the same problem, after adding the "options" part it fixed all of them :) Thanks!
zeyd31 commentedon Mar 24, 2026
Worked for me ;)
royfrancis commentedon Mar 24, 2026
I still have the error and I've tried all these options. I am not using LiteLLM. I think this might be related to this #14783
damarowen commentedon Jun 4, 2026
any fix regarding this issue guys? i still face same issue
rekram1-node commentedon Jun 4, 2026
@damarowen join discussion here:
#27716 (comment)
hopoffbaby commentedon Jun 8, 2026
I managed to get this working with gpt5-4 in azure foundary using this:
"foundary2": { "name": "foundry-gpt", "npm": "@ai-sdk/openai", "options": { "baseURL": "https://foundry-123451.cognitiveservices.azure.com/openai/v1/" }, "models": { "gpt-5-4": { "name": "gpt-5-4", "family": "gpt-5", "reasoning": true, "interleaved": { "field": "reasoning_content" }, "modalities": { "input": ["text"], "output": ["text"] }, "temperature": true, "tool_call": true, "attachment": false, "experimental": false, "status": "active" } } }