[BUG] WebSearch tool missing input_schema - API Error 422
Status Closed — not planned
Maintainer reply None cached
Activity 12 comments · opened Oct 7, 2025 · closed Jan 26, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The WebSearch tool is returning a 422 error indicating a missing input_schema field.
What Should Happen?
the websearch tool can work.
Error Messages/Logs
API Error: 422 {"detail":[{"type":"missing","loc":["body","tools",0,"input_schema"],"msg":"Field required","input":{"type":"web_search_20250305","name":"web_search","max_uses":8}}]}
Steps to Reproduce
- Use the WebSearch tool with any query
- Tool returns 422 error immediately
Claude Model
Other
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.9
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
i use custom model, it is ZhipuAI/GLM-4.6
12 Comments
Found the same issue today, also happened after connecting to GLM 4.6 (doc). It is obvious that the ANTHROPIC_BASE_URL serves as the API host for using the WebSearch tool. However, your model customizing changes the API host setting, causing the tool to fail. If you remove the settings.json, you will find the WebSearch tool comes back (for sure, you also lose your GLM).
I was wondering whether Anthropic really supports third-party models connecting to Claude Code, or this is only just a hack to use customized models. 🤔
same, maybe related to this?
I've tried this with the Z.ai Web Search MCP Server:
https://docs.z.ai/devpack/mcp/search-mcp-server
Seems to work in early testing.
Though SOL if custom model doesn't have something like this.
Meanwhile, as I'm still learning... seems the Search-Plus plugin would be clutch for those in this bind:
https://github.com/shrwnsan/vibekit-claude-plugins/tree/main/plugins/search-plus
Hope this helps
Facing the same here.
Using Claude Code version 2.0.50.
I have been able to reproduce the issue using the following custom models: Minimax M2 and GLM 4.6.
It is working correctly with Kimi K2 and Claude models.
Any ideas on how to fix?
Seems quiet for the time being @alfredocs16-lab
Check on the webSearchPrime MCP from Z.ai if you are using their inference for GLM. Check w/ your inference provider, perhaps they have search MCP too w/ your MiniMax M2 plan.
Else, can try the Search Plus plugin if needed to smooth out your flow
Cheers!
Agree with @shrwnsan that using a third-party search MCP is a walkaround. It is a bit surprising that Kimi K2 works. How?
Thank you @shrwnsan and @dashidhy for the insights!
I've successfully tested MCP Web Search Prime with GLM 4.6, and it's working flawlessly.
@dashidhy I can confirm that Kimi K2 Thinking works seamlessly with Claude Code's native Web Search tool with no external MCP required. This actually explains my initial confusion: I was expecting GLM and MiniMax to have the same out-of-the-box compatibility.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Any others still experiencing this w/ latest CC version?
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.