[BUG] WebSearch tool fails with invalid_request_error — references deprecated model name claude-haiku-4-5-20251001

Resolved 💬 3 comments Opened May 4, 2026 by blakemcclary Closed May 8, 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 in Claude Code consistently fails with the following error, making web search completely non-functional:

API Error: 400 {
"error": {
"code": 400,
"message": "model_name 'claude-haiku-4-5-20251001' is not a valid LLM model.",
"param": null,
"type": "invalid_request_error"
}
}

Steps to reproduce:

  1. Open Claude Code (claude.ai/code or CLI)
  2. Ask any question that triggers a WebSearch tool call (e.g., "search for X", or any research question)
  3. Tool call fails immediately with the 400 error above

Expected behavior: Web search returns results.

Actual behavior: Every search fails. The error indicates the tool is internally invoking claude-haiku-4-5-20251001 as a sub-model, which is either deprecated, renamed, or no longer a valid model ID.

Impact: The WebSearch tool is completely unusable. The WebFetch tool appears to be affected by the same underlying issue in some invocations.

Environment:

  • Model: claude-sonnet-4-6
  • Platform: macOS (darwin 25.4.0)
  • Date observed: May 4, 2026

Suspected root cause: The WebSearch tool appears to use a small/fast model internally to process search results. The model ID claude-haiku-4-5-20251001 hardcoded in the tool backend appears to no longer be
valid — possibly needs to be updated to claude-haiku-4-5 or the current equivalent

What Should Happen?

Webfetch should work in a managed environment

Error Messages/Logs

Steps to Reproduce

Steps to reproduce:

  1. Open Claude Code (claude.ai/code or CLI)
  2. Ask any question that triggers a WebSearch tool call (e.g., "search for X", or any research question)
  3. Tool call fails immediately with the 400 error above

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Sonnet 4.6

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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