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
MCP tool schemas can include unsupported OpenAI JSON Schema keywords #32488
MCP tool input schemas are forwarded through the OpenAI provider with JSON Schema keywords that OpenAI tool schemas do not support, such as pattern, minimum, maxItems, or tuple-style items. Some MCP tools include these and are passed through by opencode
Plugins
no plugins
OpenCode version
Current dev branch
Steps to reproduce
Configure an MCP server with a tool whose input schema includes unsupported OpenAI JSON Schema keywords.
Use an OpenAI model with that MCP tool enabled.
Send a prompt that includes tool definitions.
The OpenAI request can fail because the tool schema contains unsupported keywords.
Activity
github-actions commentedon Jun 16, 2026
This issue might be a duplicate of existing issues. Please check:
patternschemas — same root cause: MCP tool schemas containing JSON Schema keywords (e.g.pattern) that OpenAI's API rejects, causing requests to fail before tool execution.contentEncodingfrom MCP tool schemas — same class of problem (provider-specific schema sanitization needed) but for the Gemini provider.If your issue is specifically about the OpenAI provider not stripping unsupported keywords, it may overlap significantly with #30553.