Repository navigation
[Bug] Custom OpenAI-compatible provider errors with "Unknown parameter: 'reasoningSummary'" for GPT-5 series models #13546
Description
Activity
github-actions commented
on Feb 14, 2026 on Feb 14, 2026 – with GitHub ActionsContributorMore actionsThis issue might be related to existing issues about custom providers receiving unsupported parameters. Please check:
- @ai-sdk/openai-compatible max_tokens error for GPT 5.x #5421: @ai-sdk/openai-compatible max_tokens error for GPT 5.x (similar parameter compatibility issue with custom providers)
- Azure models fail due to reasoning_effort being sent even with --variant none #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.
Could help to fix as of add a parameter to trun off/on the 'reasoningSummary'?
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#1794Same here, same logs (on Mac though):
litellm.BadRequestError: OpenAIException - Unknown parameter: 'reasoningSummary'.. Received Model Group=openai/gpt-5.2
Available Model Group Fallbacks=NoneHad a similar issue with Claude:
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=Noneand 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=NoneThis worked for me (config in
opencode.json) withv1.20.10:"provider": { "my-litellm-provider": { "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "https://my-provider.url/api/v1" }, "models": { "azure.gpt-5.1": { "name": "my-gpt-5.1", "options": { "reasoningSummary": null, } }, }
"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.5Reacted by Guilherme DeschampsReacted by Guilherme DeschampsIn my experience, setting it to
nullwould likely not work, but setting it tofalsewill, but at the expense of completely disabling reasoning.Getting the same error when using Helicone.ai as my gateway for gpt models.
@ayaz Hmm, I just checked actually,
https://opencode.ai/docs/providers/#custom-provider
There is no other way to set a custom provider apart from using openai-compatible.Some providers serve anthropic models, which actually support this parameter. The only way (workaround?) is to use openai-compatible
What are your thoughts in making this configurable? Any other suggestions?
1 remaining item
"models": { "azure.gpt-5.1": { "name": "my-gpt-5.1", "options": { "reasoningSummary": null, // null or false is not work for me } }, }
opencode version 1.2.15
@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:
"models": { "do-primary": { "id": "do-primary", "name": "GPT 5.2", "options": { "model": "openai-gpt-5.2" } }Reacted by Adrián López, Nicolás Escobar and happyxu92@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/名称字段。以下是我使用的示例:
"models": { "do-primary": { "id": "do-primary", "name": "GPT 5.2", "options": { "model": "openai-gpt-5.2" } }I resolve it by add a plugin
@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:
"models": { "do-primary": { "id": "do-primary", "name": "GPT 5.2", "options": { "model": "openai-gpt-5.2" } }I add a plugin to resolve it
add
~/.config/opencode/plugin/myArgPatch.tsimport { Plugin } from "@opencode-ai/plugin" export const myArgPatch: Plugin = async (ctx) => { return { auth: { provider: "YUOR_PROVDER_NAME", loader: async (getAuth, provider) => { return { async fetch(input, init) { const opts = init ?? {} if (opts.body && typeof opts.body === "string") { try { const body = JSON.parse(opts.body) // delete this arg delete body.reasoningSummary opts.body = JSON.stringify(body) } catch (e) {} } return fetch(input, { ...opts, timeout: false, }) }, } }, }, } }
in ~/config/opencode/opencode.jsonc
{ ... "plugin": ["myArgPatch"], }+1. Still reproducible on the latest version (tested via Azure and custom provider).
I'm able to call GPT-5.4 with the setup below:
"gpt-5.4": { "name": "gpt-5.4", "limit": { "context": 1000000, "output": 128000 }, "options": { "reasoningSummary": null }, "extra_body": { "drop_params": true } },
I'm using opencode with version
1.2.27Reacted by absolutegravitasI'm able to call GPT-5.4 with the setup below:
"gpt-5.4": {
"name": "gpt-5.4",
"limit": {
"context": 1000000,
"output": 128000
},
"options": {
"reasoningSummary": null
},
"extra_body": {
"drop_params": true
}
},
I'm using opencode with version1.2.27no joy -- still get reasoningSummary unknown parameter.
tried with previous example as follows and get an issue with max_tokens param:
"gpt-5.4": { "name": "gapt-5.4", "limit": { "context": 262144, "output": 25000 }, "modalities": { "input": ["text"], "output": ["text"] }, "options": { "model":"gpt-5.4", } },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": { ... } } } }Reacted by Stephen Bolton, Zeyd Boukhers, Chalermpun, cloud, fqiu-zendesk, Marcos and LefterisIf 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 } } } } } }Reacted by Guilherme DeschampsReacted by Guilherme Deschamps"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.5Worked 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/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": {
...
}
}
}
}Worked for me ;)
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
any fix regarding this issue guys? i still face same issue
@damarowen join discussion here:
#27716 (comment)Reacted by Damar OwenI 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" } } }
Description
Summary
OpenCode automatically injects the
reasoningSummaryparameter (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
opencode.jsonc: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