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

#25427 [Bug]: Authentication failure when making requests from claude code

  • State: open
  • Author: @yuri-alias
  • Labels: bug, proxy, llm translation, claude code

### Check for existing issues

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

### What happened?

I'm trying to use liteLLM as backend for claude code, following the documentation [here](https://docs.litellm.ai/docs/tutorials/claude_non_anthropic_models).

LiteLLM has been working great with the desired model for a while, and the setup works using other tools to make the request. However, when I make the requests from claude, I get the following error in claude code:

``` {"error":{"message":"litellm.AuthenticationError: AuthenticationError: OpenAIException - {\n \"error\": {\n \"message\": \"Incorrect API key provided: sk-1234. You can find your API key at https://platform.openai.com/account/api-keys.\",\n \"type\": \"invalid_request_error\",\n \"code\": \"invalid_api_key\",\n \"param\": null\n },\n \"status\": 401\n}. Received Model Group=<model>\nAvailable Model Group Fallbacks=None","type":null,"param":null,"code":"401"} ```

And the following exception in the liteLLM logs:

``` 14:19:58 - LiteLLM Proxy:ERROR: …

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h50m16s ago — entered · #import:https:::github.com:berriai:litellm post #2038
Issue 34890 is harder because it involves shared parameter propagation across multiple API implementations, async call boundaries, and regression coverage for distinct request paths. Issue 25427 is more likely localized to authentication or configuration handling for one client integration, with narrower implementation scope and lower cross-cutting risk.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search