Skip to content

[Feature]: Add native bedrock/zai.glm-5 support with tool calling #24993

Closed as not planned

Description

@eugenio

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

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.

Activity

  1. github-actions commented on Jul 2, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions