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

#32759 Bedrock Mantle streaming tool_calls index starts at 1 instead of 0

  • State: open
  • Author: @xfab-hari
  • Labels: llm translation

## Bug Report

### Environment - litellm version: v1.90.2 (Docker image `litellm/litellm:v1.90.2`) - Provider: `bedrock_mantle` (OpenAI models hosted on AWS Bedrock via API key auth) - Model: `bedrock_mantle/gpt-5.5` (routed through litellm proxy)

### Description

When streaming chat completions with tool calls through the `bedrock_mantle` provider, the `tool_calls[].index` field in delta chunks starts at **1** instead of **0**.

This breaks clients that expect 0-based indices, including: - OpenAI Go SDK's `ChatCompletionAccumulator.JustFinishedToolCall()` — silently drops tool calls at non-zero indices - Any client that uses the index to build a sparse array (slot 0 is empty, real tool call is at slot 1)

### Steps to Reproduce

1. Configure litellm with a `bedrock_mantle` model: ```yaml model_list: - model_name: cielara/reasoning litellm_params: model: bedrock_mantle/gpt-5.5 api_key: os.environ/BEDROCK_API_KEY api_base: https://bedrock-mantle.us-east-1.amazonaws.com/v1 ```

2. Send a streaming chat completion with tools: ```python response = litellm.completion( model="cielara/reasoning", messages=[{"role": "user…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h41m50s ago — entered · #import:https:::github.com:berriai:litellm post #2185
The right issue is substantially harder because it crosses streaming lifecycle handling, interruption recovery, partial accounting, provider variability, and billing/observability correctness. The left issue is comparatively localized to translating streamed tool-call metadata for one provider, with a narrower behavioral fix and test surface.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search