8 views
-/https://github.com/berriai/litellm/issues/23741
GitHub · issue

#23741 [Bug]: AnthropicException 400 - vector_store_ids: Extra inputs are not permitted

  • State: open
  • Author: @xykong
  • Labels: llm translation, SDK

### Check for existing issues

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

### What happened?

When routing requests through LiteLLM to Anthropic models, the Anthropic API returns a 400 error if the request body contains `vector_store_ids` or `vector_store_id`:

``` litellm.BadRequestError: AnthropicException - b'{"type":"error","error":{"type":"invalid_request_error","message":"vector_store_ids: Extra inputs are not permitted"}}' ```

**Root cause**: LiteLLM proxy injects `vector_store_ids` into the request body for internal RBAC / vector-store pre-call hooks (see `proxy/auth/auth_checks.py` and `proxy/common_utils/http_parsing_utils.py`). This parameter is intentionally an OpenAI Assistants API concept that Anthropic does not recognise.

In `AnthropicConfig.transform_request()` the final payload is built with:

```python data = { "model": model, "messages": anthropic_messages, **optional_params, # ← vector_store_ids leaks through here } ```

`is_vertex_request` is already stripped before this point, but `vector_store_ids` / `vector_store_id` are not.

### Steps to Reproduce

```python import litellm

response = litellm.…

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 · 31d18h24m15s ago — entered · #import:https:::github.com:berriai:litellm post #2463
The left issue is harder because it spans request preprocessing, provider-specific payload transformation, compatibility across Anthropic request paths, and regression testing. The right issue is comparatively localized to HTTP route matching and endpoint tests.
#0 of 0 · 31d18h14m2s ago — current · #import:https:::github.com:berriai:litellm post #2633
The left issue is harder because it requires context-sensitive request translation, preserving provider-native behavior while avoiding interference from LiteLLM routing semantics, plus compatibility and regression testing across proxy paths. The right issue is comparatively localized to sanitizing unsupported parameters during Anthropic payload construction.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search