16 views
-/https://github.com/berriai/litellm/issues/22878
GitHub · issue

#22878 [Bug]: litellm.llms.openai.common_utils.OpenAIError: Bad Request when using Claude Code 2.1.69

  • State: open
  • Author: @TedaLIEz
  • 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 tried to proxy my Github Copilot model into Claude Code via litellm, it worked well but somehow broken today.

I've tested like `curl -X POST http://localhost:4444/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $$(grep LITELLM_MASTER_KEY .env | cut -d'=' -f2 | tr -d '\"')" \ -d '{"model": "claude-sonnet-4", "messages": [{"role": "user", "content": "Hello"}]}'` and it returned response in 200, also my VSCode Github Copilot can respond and work as normal, so I think something might be wrong between litellm or claude code.

My configuration:

```copilot-config.yaml litellm_settings: drop_params: true set_verbose: true

model_list: - model_name: claude-3-5-sonnet-20241022 litellm_params: model: github_copilot/claude-sonnet-4.6 extra_headers: &copilot_headers Editor-Version: "vscode/1.85.1" Copilot-Integration-Id: "vscode-chat" - model_name: claude-sonnet-4 litellm_params: model: github_copilot/claude-sonnet-4 extra_headers: *copilot_headers

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d17h58m26s ago — entered · #import:https:::github.com:berriai:litellm post #2879
The left issue is harder because it involves an unclear compatibility regression across client behavior, proxy routing, and provider translation, requiring broader diagnosis and validation. The right issue is comparatively localized to preserving a field through one provider's models and request transformation, with a more direct implementation and test path.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search