[BUG] WebSearch tool missing input_schema - API Error 422

Resolved 💬 12 comments Opened Oct 7, 2025 by macedonianking 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

  1. Use the WebSearch tool with any query
  2. 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

View original on GitHub ↗

This issue has 12 comments on GitHub. Read the full discussion on GitHub ↗