Description
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
Description
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
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response