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

#29190 [Bug]: Claude Code 3P tab in Claude Desktop fails proxy auth — likely Authorization header (Anthropic OAuth token) takes precedence over user's x-api-key LiteLLM virtual key

  • State: open
  • Author: @marty-sullivan
  • Labels: proxy, llm translation, claude code

> **Note on root cause:** The LiteLLM-side behavior described below is verified by reading the code on `main` and v1.86.0. The assumption that Claude Desktop's Code 3P tab sends `Authorization: Bearer sk-ant-oat-...` alongside `x-api-key: sk-<litellm-key>` is a strong hypothesis but **has not been confirmed by capturing the actual request headers**. It fits the symptoms (CLI and Cowork tab work with the same key; the error reports a token-not-found rather than a malformed key) but a maintainer or reporter should validate by capturing the headers Claude Code 3P actually sends before designing the fix.

## Check for existing issues

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

Closest existing items, but **none cover this specific bug**: - #24436 / #24454 / #24539 — same OAuth-token-collision family, but those are about the *outbound* headers LiteLLM forwards to the upstream Anthropic API. This bug is in the *inbound* proxy auth itself (`user_api_key_auth`), which fails before any upstream call is made. - #24680 — same surface error message ("Unable to find token in cache or `LiteLLM_VerificationTokenTable`"), but unrelated cause (key cache…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d17h43m40s ago — entered · #import:https:::github.com:berriai:litellm post #3150
29190 requires validating an uncertain interaction, changing authentication precedence safely, and adding regression coverage across proxy and provider flows; 27458 is comparatively localized input validation and error-handling work.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search