litellm - ✅(Solved) Fix [Feature]: Add Z.AI GLM-5 Support for Bedrock Provider [1 pull requests, 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#24227Fetched 2026-04-08 01:09:14
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×3closed ×1cross-referenced ×1referenced ×1

Fix Action

Fixed

PR fix notes

PR #24338: feat(bedrock): add Z.AI GLM-5 model support

Description (problem / solution / changelog)

Relevant issues

Fixes #24227

Pre-Submission checklist

  • I have Added testing - N/A (model pricing JSON update only, no code logic changes)
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature

Changes

Add zai.glm-5 to model_prices_and_context_window.json with bedrock_converse provider routing.

  • Input cost: $1.00 / 1M tokens
  • Output cost: $3.20 / 1M tokens
  • Max input tokens: 200,000
  • Max output tokens: 128,000
  • Supports: function calling, reasoning, system messages, tool choice
  • Source: https://aws.amazon.com/bedrock/pricing/

Verified live with boto3 Converse API and litellm.completion("bedrock/zai.glm-5", ...) in us-east-1.

Changed files

  • model_prices_and_context_window.json (modified, +14/-0)
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

The Feature

Add Z.AI GLM-5 support for bedrock provider

Motivation, pitch

AWS announced support for this model on March 18, 2026

What part of LiteLLM is this about?

Proxy

LiteLLM is hiring a founding backend engineer, are you interested in joining us and shipping to all our users?

No

Twitter / LinkedIn details

No response

extent analysis

Fix Plan

To add Z.AI GLM-5 support for the bedrock provider, we need to implement the following steps:

  • Update the provider configuration to include the new model
  • Implement a new class or function to handle the GLM-5 model
  • Update the existing code to use the new class or function

Example Code

# Update the provider configuration
providers = {
    'bedrock': {
        'models': [
            'glm-4',
            'glm-5'  # Add the new model
        ]
    }
}

# Implement a new class to handle the GLM-5 model
class GLM5Model:
    def __init__(self, provider):
        self.provider = provider

    def generate_text(self, prompt):
        # Implement the logic to generate text using the GLM-5 model
        pass

# Update the existing code to use the new class
class Proxy:
    def __init__(self, provider):
        self.provider = provider
        self.models = {
            'glm-4': GLM4Model(provider),
            'glm-5': GLM5Model(provider)  # Use the new class
        }

    def generate_text(self, prompt, model):
        return self.models[model].generate_text(prompt)

Verification

To verify that the fix worked, you can test the new functionality by generating text using the GLM-5 model. You can do this by creating an instance of the Proxy class and calling the generate_text method with the glm-5 model.

Extra Tips

Make sure to update the documentation and tests to reflect the changes. Additionally, you may need to update the dependencies or libraries to support the new model.

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