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
Anthropic API rejects MCP tools with anyOf in input_schema #35516
Claude models in opencode fails with:
tools.36.custom.input_schema: input_schema does not support oneOf, allOf, or anyOf at the top level
Same error as the one in anthropics/claude-code#4886 (anthropics/claude-code#4886).
OpenCode adds anyOf to the input_schema of some MCP tools. For example, gitnexus_api_impact gets:
"anyOf": [{"required": ["route"]}, {"required": ["file"]}]
The Anthropic API does not allow anyOf (or oneOf/allOf) at the top level of a tool schema. Same restriction as OpenAI.
PR #32489 (#32489) (shipped in v1.17.8) sanitizes tool schemas for OpenAI models by dropping composition keywords. But that sanitization only runs for OpenAI/Azure adapters. It never touches the Anthropic path.
Plugins
gitnexus
OpenCode version
1.17.13
Steps to reproduce
install gitnexus
pick claude models
run anything
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Reacted by Luiz Gustavo, mac.bae, Jason George, Tomas Ekeli and Jono
Activity
github-actions commentedon Sep 5, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.