19 views
-/https://github.com/berriai/litellm/issues/26389
GitHub · issue

#26389 [Bug]: WebSearch Interception follow-up request ignores custom `api_base` / `api_key`, causing 401 and deployment cooldown cascade

  • State: open
  • Author: @jesset
  • Labels: bug, proxy, llm translation

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

## Summary

When using the `websearch_interception` callback with models behind a custom Anthropic-compatible endpoint (e.g. `api_base: https://my-proxy.example.com/anthropic`), the follow-up request in the agentic loop **ignores the deployment's `api_base` and `api_key`** and falls back to `https://api.anthropic.com` with `ANTHROPIC_API_KEY` env var. This results in a `401 Unauthorized` error, which then triggers a **deployment cooldown cascade** that blocks all subsequent requests to that model for the cooldown duration (default 5s).

## Environment

- LiteLLM Proxy (latest `main` branch) - Model configured with `custom_llm_provider: anthropic` and a custom `api_base` (e.g. Tencent Cloud Anthropic-compatible endpoint) - `websearch_interception` callback enabled in `litellm_settings.callbacks` - Request via Anthropic Messages API: `POST /v1/messages?beta=true`

## Steps to Reproduce

1. Add a model deployment with `custom_llm_provider: anthropic` and a custom `api_base` (not `api.anthropic.com`), e.g.:

```yaml model_list: - model_…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d17h50m11s ago — entered · #import:https:::github.com:berriai:litellm post #3140
The left issue is harder because it spans callback-driven follow-up execution, deployment credential propagation, provider endpoint selection, and failure-state isolation, requiring cross-layer fixes and regression coverage. The right issue is narrower provider/mode routing and validation work in the image-generation path.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search