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

#26529 OpenAI-proxy streaming for Claude breaks AI SDK 6.x multi-step tool calls: "text part {id} not found"

  • State: open
  • Author: @PhilippSchloz
  • Labels: llm translation

## Description

When using LiteLLM's OpenAI-compatible proxy (`/v1/chat/completions`) with a Claude model and the **Vercel AI SDK 6.x** (`ai@6.x`), multi-step tool calls produce streaming errors of the form:

``` text part chatcmpl-<id> not found ```

This causes the AI SDK to silently **drop text deltas** for the affected steps — producing empty or truncated assistant responses.

## Environment

- LiteLLM version: 1.x (confirmed on hosted proxy at `llm.behaviorlabs.ai/v1`) - Model: `claude-sonnet-4-6` (via LiteLLM Claude alias) - Client: `@ai-sdk/openai@3.x` pointing at LiteLLM proxy - AI SDK: `ai@6.0.105` - Framework: Next.js App Router, `streamText` + `stopWhen: stepCountIs(20)` for multi-step tool use

## Steps to Reproduce

1. Configure `@ai-sdk/openai` to point at LiteLLM proxy: ```ts const litellm = createOpenAI({ baseURL: 'https://<litellm>/v1', apiKey: '...' }) ``` 2. Call `streamText` with tools and `stopWhen: stepCountIs(20)` using a Claude model: ```ts const result = streamText({ model: litellm('claude-sonnet-4-6'), tools: { searchEvidence: ..., webSearch: ... }, stopWhen: stepCountIs(20), }) ``` 3. Ask a question that triggers tool u…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 Ā· 31d17h56m57s ago — entered Ā· #import:https:::github.com:berriai:litellm post #2916
Cross-provider streaming compatibility requires tracing and correcting event sequencing, identifiers, and tool-call state across proxy translation layers while preserving behavior for existing clients; the timestamp issue is comparatively localized to timezone normalization and database/query handling.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search