litellm - 💡(How to fix) Fix [Feature]: Add native bedrock/zai.glm-5 support with tool calling [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#24993Fetched 2026-04-08 02:35:11
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
1
Author
Participants
Timeline (top)
labeled ×2cross-referenced ×1

Fix Action

Fix / Workaround

  • bedrock/zai.glm-5 fails with NotFoundError: Unknown provider=None, model=zai.glm-5
  • The suggested workaround bedrock/converse/zai.glm-5 works for basic chat but raises UnsupportedParamsError when tools are passed
  • This makes GLM 5 unusable for agentic workflows (OpenCode, Claude Code, etc.) that require function calling

Code Example

import boto3, json
client = boto3.client('bedrock-runtime', region_name='eu-west-2')
r = client.invoke_model(
    modelId='zai.glm-5',
    body=json.dumps({'messages': [{'role': 'user', 'content': 'hi'}], 'max_tokens': 5}),
    contentType='application/json'
)
print(json.loads(r['body'].read()))
# OK: {'choices': [{'message': {'content': "Hello! I'm GL", 'role': 'assistant'}}], ...}
RAW_BUFFERClick to expand / collapse

Feature Request

Add zai.glm-5 (GLM 5 by Z.AI/Zhipu AI) to the Bedrock model registry so it can be used as bedrock/zai.glm-5 with full tool-use support.

Current Behavior

  • bedrock/zai.glm-5 fails with NotFoundError: Unknown provider=None, model=zai.glm-5
  • The suggested workaround bedrock/converse/zai.glm-5 works for basic chat but raises UnsupportedParamsError when tools are passed
  • This makes GLM 5 unusable for agentic workflows (OpenCode, Claude Code, etc.) that require function calling

Expected Behavior

bedrock/zai.glm-5 should work like other Bedrock models (bedrock/deepseek.v3.2, bedrock/zai.glm-4.7) — supporting streaming, tool calling, and message format transformation.

Evidence

GLM 5 is available on Bedrock in eu-west-2 (and other regions) since March 18, 2026. Direct boto3 calls work fine:

import boto3, json
client = boto3.client('bedrock-runtime', region_name='eu-west-2')
r = client.invoke_model(
    modelId='zai.glm-5',
    body=json.dumps({'messages': [{'role': 'user', 'content': 'hi'}], 'max_tokens': 5}),
    contentType='application/json'
)
print(json.loads(r['body'].read()))
# OK: {'choices': [{'message': {'content': "Hello! I'm GL", 'role': 'assistant'}}], ...}

The model supports tools natively — it's only the LiteLLM routing layer that's missing the registry entry.

Environment

  • LiteLLM version: 1.83.0
  • AWS region: eu-west-2
  • Model ID on Bedrock: zai.glm-5
  • Related: #23327 (dashboard UI), #21087 (tool calling transformation)

Motivation

GLM 5 scores 30/30 tasks 5/5 on SWE-Bench (highly consistent), has 200K context and 128K output window, making it one of the strongest open-weight coding models on Bedrock. Without native support in LiteLLM, it can't be used in tool-calling workflows.

extent analysis

TL;DR

Add zai.glm-5 to the Bedrock model registry to enable native support in LiteLLM for tool-calling workflows.

Guidance

  • Verify that the zai.glm-5 model is available in the eu-west-2 region and can be invoked directly using boto3 to ensure the model itself is functional.
  • Check the LiteLLM version (currently 1.83.0) to see if there are any known issues or updates related to model registry support.
  • Investigate the LiteLLM routing layer to determine why the registry entry for zai.glm-5 is missing and how it can be added.
  • Review related issues (#23327 and #21087) for potential insights into the problem and possible solutions.

Example

No code snippet is provided as the issue is more related to configuration and registry updates rather than code changes.

Notes

The solution may require updates to the LiteLLM routing layer or the Bedrock model registry, which could involve changes to configuration files or database entries. The exact steps will depend on the specific implementation details of LiteLLM and Bedrock.

Recommendation

Apply a workaround by manually adding the zai.glm-5 model to the LiteLLM routing layer or Bedrock model registry, if possible, to enable native support for tool-calling workflows. This will allow GLM 5 to be used with LiteLLM until a more permanent solution is implemented.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING