6 views
-/https://github.com/berriai/litellm/issues/28756
GitHub · issue

#28756 use_chat_completions_url_for_anthropic_messages config key not loaded from proxy YAML

  • State: open
  • Author: @kamman2
  • Labels: llm translation, claude code

## Bug Description

The config key `use_chat_completions_url_for_anthropic_messages` is not respected when set in `litellm_settings` in the LiteLLM proxy configuration YAML.

## Root Cause

In `litellm/llms/anthropic/experimental_pass_through/messages/handler.py`:

```python _RESPONSES_API_PROVIDERS = frozenset({"openai"})

def _should_route_to_responses_api(custom_llm_provider: Optional[str]) -> bool: if litellm.use_chat_completions_url_for_anthropic_messages: return False return custom_llm_provider in _RESPONSES_API_PROVIDERS ```

The module-level variable `litellm.use_chat_completions_url_for_anthropic_messages` is **never populated from the proxy config YAML**. Setting `use_chat_completions_url_for_anthropic_messages: true` under `litellm_settings` has no effect because the config parsing code does not map this key to the `litellm` module attribute.

## Reproduction Steps

1. Configure LiteLLM proxy with an `openai/`-prefixed vLLM backend 2. Set `use_chat_completions_url_for_anthropic_messages: true` in `litellm_settings` in the proxy config YAML 3. Send an Anthropic Messages API request through the proxy (e.g., via Claude Code with `ANTHROPIC_BASE_URL` pointing…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h45m50s ago — entered · #import:https:::github.com:berriai:litellm post #2202
The right-side change is harder because it affects shared asynchronous logging state, request lifecycle integration, backward compatibility, and concurrency-sensitive tests; the left-side change is a localized configuration-plumbing fix.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search