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

#20097 [Bug]: characters are truncated from anthropic models

  • State: open
  • Author: @alpacaswillrule
  • Labels: bug, 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?

the first few characters from anthropic models are trunacted when calling litellm responses api. run the script below to reporudce, we expect I'm happy, but we get 'm happy

### Steps to Reproduce

import litellm

response = litellm.responses( model="anthropic/claude-sonnet-4-5", input=[{ "type": "message", "role": "user", "content": [{"type": "text", "text": "repeat after me: I'm happy to be here"}] }], max_tokens=100, stream=True )

for event in response: if hasattr(event, 'delta') and event.delta: print(event.delta)

### Relevant log output

```shell

```

### What part of LiteLLM is this about?

SDK (litellm Python package)

### What LiteLLM version are you on ?

1.81.5

### Twitter / LinkedIn details

_No response_

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 · 31d18h15m49s ago — entered · #import:https:::github.com:berriai:litellm post #2593
The left issue is harder because it involves diagnosing streaming semantics across LiteLLM’s Responses API and Anthropic translation layer, with provider-specific behavior and regression testing across streaming formats. The right issue is comparatively contained: a workflow utility needs more robust pagination parsing plus focused tests.
#0 of 0 · 31d18h2m10s ago — current · #import:https:::github.com:berriai:litellm post #2828
The left requires cross-cutting callback lifecycle design, API contract decisions, passthrough integration, and broad regression coverage; the right is comparatively localized streaming translation debugging.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search