anomalyco / anomalyco/opencode
Kimi rejects tool properties without explicit types
Open
@kitlangton is already working on this.
Since Aug 2, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Kimi through Console Go rejects MCP tool schemas when a property uses enum, const, or structural keywords but omits an explicit type. OpenCode currently forwards those otherwise valid JSON Schema nodes unchanged, so the request fails before the model can run:
tools.function.parameters is not a valid moonshot flavored json schema, details: <At path 'properties.view': type is not defined>
Plugins
A custom MCP server whose tool schema contains a property such as view: { enum: ["text", "raw"] }.
OpenCode version
1.18.8 (the same Moonshot sanitizer is present on current dev)
Steps to reproduce
- Configure a Kimi model through Console Go.
- Connect an MCP tool with
parameters: { type: "object", properties: { view: { enum: ["text", "raw"] } } }. - Send a prompt with tools enabled.
- The provider rejects the request before any tool call.
Screenshot and/or share link
No response
Operating System
Ubuntu 22.04
Terminal
Headless API server
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.