Skip to content

feat(baseten): add baseten/zai-org/GLM-5.3 to model pricing registry (#39342) - #39656

Closed
dlowzzxx wants to merge 2 commits into
BerriAI:litellm_internal_stagingfrom
dlowzzxx:feat/baseten-glm-5.3-39342
Closed

feat(baseten): add baseten/zai-org/GLM-5.3 to model pricing registry (#39342)#39656
dlowzzxx wants to merge 2 commits into
BerriAI:litellm_internal_stagingfrom
dlowzzxx:feat/baseten-glm-5.3-39342

Conversation

@dlowzzxx

@dlowzzxx dlowzzxx commented Sep 3, 2026

Copy link
Copy Markdown

Closes #39342

Summary

Adds baseten/zai-org/GLM-5.3 to LiteLLM's model pricing and capability registry across both model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json according to upstream Baseten specifications.

Key Changes

  • Pricing & Context Registry for baseten/zai-org/GLM-5.3
  • Schema validation verified via generate_model_prices_schema.py --check
  • Automated unit tests added in test_baseten_completions.py

Tests

  • python ci_cd/generate_model_prices_schema.py --check (passed)
  • python -m pytest tests/test_litellm/test_model_prices_schema.py --basetemp=./tmp_pytest (21 passed)
  • python -m pytest tests/test_litellm/llms/baseten/chat/test_baseten_completions.py --basetemp=./tmp_pytest (5 passed)

Type of Change

  • New feature / model registry addition
  • Tests added

@codspeed-hq

codspeed-hq Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing dlowzzxx:feat/baseten-glm-5.3-39342 (21fc4fb) with litellm_internal_staging (0b7773d)

Open in CodSpeed

@greptile-apps

greptile-apps Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds Baseten GLM-5.3 pricing, context limits, and capability metadata to both model registries.

  • Registers standard and cached-input token pricing.
  • Advertises context, output, reasoning, tool-calling, caching, and response-schema capabilities.
  • Adds local tests for model lookup, ordinary cost calculation, and cached-token cost calculation.

Confidence Score: 4/5

The PR appears safe to merge, with only a non-blocking redundant test comment to remove.

The registry copies remain synchronized, and the added tests exercise local metadata and cached-token accounting without an established behavioral failure.

Files Needing Attention: tests/test_litellm/llms/baseten/chat/test_baseten_completions.py

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds the GLM-5.3 Baseten registry entry with pricing, token limits, and capability flags; no correctness issue was established.
litellm/model_prices_and_context_window_backup.json Mirrors the new GLM-5.3 entry exactly in the packaged fallback registry.
tests/test_litellm/llms/baseten/chat/test_baseten_completions.py Adds isolated metadata and cost tests; one inline comment unnecessarily restates straightforward arithmetic.

Reviews (1): Last reviewed commit: "feat(baseten): add baseten/zai-org/GLM-5..." | Re-trigger Greptile

prompt_tokens_details=PromptTokensDetailsWrapper(cached_tokens=400),
)
prompt_cost, completion_cost = litellm.cost_per_token(
"baseten/zai-org/GLM-5.3", usage_object=usage

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Redundant arithmetic comment

This comment repeats the constants and operations expressed directly by the following calculation, adding maintenance noise and creating an opportunity for the explanation to drift when the test inputs change.

Context Used: CLAUDE.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Superseded by the rolling registry PR #39388, which carries the same GLM-5.3 prices and limits with vision enabled per Baseten docs

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Add baseten/zai-org/GLM-5.3 to the model pricing registry

1 participant