claude-code - 💡(How to fix) Fix [BUG] WebSearch tool fails with invalid_request_error — references deprecated model name claude-haiku-4-5-20251001 [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56133Fetched 2026-05-05 05:57:21
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Error Message

The WebSearch tool in Claude Code consistently fails with the following error, making web search completely non-functional: API Error: 400 { "error": { 3. Tool call fails immediately with the 400 error above 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.

Error Messages/Logs

  1. Tool call fails immediately with the 400 error above

Root Cause

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

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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](http://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

extent analysis

TL;DR

The WebSearch tool in Claude Code fails due to an invalid model name 'claude-haiku-4-5-20251001', which may need to be updated to a valid model ID.

Guidance

  • Verify the model ID 'claude-haiku-4-5-20251001' is indeed deprecated or no longer valid by checking the official Claude Code documentation or API references.
  • Check if there's an updated model ID, such as 'claude-haiku-4-5', that can be used as a replacement.
  • Investigate if the issue is specific to the 'claude-sonnet-4-6' model or if it affects other models as well.
  • Consider reaching out to the Claude Code support team or community forums for further assistance or to report the issue.

Notes

The exact solution may depend on the specific requirements and constraints of the project, such as compatibility with other models or versions.

Recommendation

Apply workaround: Update the model ID to a valid one, if possible, to mitigate the issue until a official fix is released.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] WebSearch tool fails with invalid_request_error — references deprecated model name claude-haiku-4-5-20251001 [1 comments, 2 participants]