#30139 [Bug]: LiteLLM Bedrock passthrough fails with Claude Code after several requests: missing model attribute on httpx.Response and h11 Content-Length error
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### What happened?
Hello everyone, I am using Claude Code through a LiteLLM proxy that routes Claude requests to Anthropic Claude models on AWS Bedrock.
After several successful or partially successful requests, LiteLLM starts failing repeatedly with the following error pattern:
1. LiteLLM logs:
"cannot override response model; missing `model` attribute. response_type=<class 'httpx.Response'>
2. Immediately after that, Uvicorn/h11 raises:
"h11._util.LocalProtocolError: Too much data for declared Content-Length"
This happens in repeated bursts, not as a single isolated failure. It happens especially when Claude Code needs to write new files.
The issue seems to happen when LiteLLM receives a raw httpx.Response from the Bedrock passthrough path and then tries to treat it as a modeled LiteLLM/OpenAI/Anthropic response with a model attribute. When this fails, the ASGI response handling also breaks due to a Content-Length mismatch.
How can I solve this issue? Thank you in advance.
### Steps to Reproduce
1. Configure Claude Code to use LiteLLM as an Anthropic-…