8 views
-/https://github.com/berriai/litellm/issues/34239
GitHub · issue

#34239 [Bug]: bedrock/zai.glm-5 tool_call ids exceed Bedrock's 64-char toolUseId limit on multi-turn tool calls

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

### What happened?

Calling `bedrock/zai.glm-5` through a litellm proxy (self-hosted) fails on multi-turn tool-calling conversations with a `BedrockException` — the `toolUseId` / `toolResult.toolUseId` values litellm sends to the Bedrock Converse API exceed AWS's hard 64-character limit.

``` litellm.BadRequestError: BedrockException - {"message":"4 validation errors detected: Value at 'messages.4.member.content.2.member.toolUse.toolUseId' failed to satisfy constraint: Member must have length less than or equal to 64; Value at 'messages.4.member.content.3.member.toolUse.toolUseId' failed to satisfy constraint: Member must have length less than or equal to 64; Value at 'messages.5.member.content.1.member.toolResult.toolUseId' failed to satisfy constraint: Member must have length less than or equal to 64; Value at 'messages.5.member.content.2.member.toolResult.toolUseId' failed to satisfy constraint: Member must have length less than or equal to 64"}. Received Model Group=bedrock/zai.glm-5 Available Model Group Fallbacks=None ```

### Root cause (best guess)

`bedrock/zai.glm-5` has no native model-registry / transform entry in litellm yet (tracked separately in #24993 and #24227). M…

GitHub resolver

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

Refresh page
vote history (3 events)
#0 of 0 · 31d18h37m11s ago — entered · #import:https:::github.com:berriai:litellm post #2245
The right-hand task spans multiple request and streaming code paths, failure semantics, and security-sensitive regression coverage, creating substantially greater implementation and testing risk. The left-hand task is comparatively localized to identifier normalization and round-trip consistency.
The left issue is harder because it requires integrating entity-level authorization into proxy model discovery, reconciling multiple configuration sources, and preserving correct visibility semantics across existing access-control paths. The right issue is comparatively localized to provider-specific identifier normalization and multi-turn mapping, with narrower compatibility risk.
#0 of 0 · 31d18h17m41s ago — current · #import:https:::github.com:berriai:litellm post #2549
The right-hand task requires tracing provider-specific request/response translation, preserving identifier consistency across multi-turn flows, enforcing an external constraint safely, and adding regression coverage. The left-hand task is a localized logging-level adjustment with comparatively low behavioral risk.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search