chore(models): deprecate GLM-5.1 on Together AI - #2844
Conversation
Together AI is deprecating serverless zai-org/GLM-5.1 on July 10, 2026. Mark the together-ai provider mapping as deactivated on that date so it auto-disables; GLM-5.2 remains the recommended alternative. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
WalkthroughAdds a Changesglm-5.1 together-ai provider deactivation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85893b6930
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { | ||
| providerId: "together-ai", | ||
| externalId: "zai-org/GLM-5.1", | ||
| deactivatedAt: new Date("2026-07-10"), |
There was a problem hiding this comment.
Add Together's GLM-5.2 replacement mapping
When this deactivation date passes, Together-only users lose the ZAI route because glm-5.2 currently has no together-ai provider mapping in this file, even though Together's current GLM-5.2 docs list the serverless endpoint as zai-org/GLM-5.2 with the same pricing/cached-input support. Please add the replacement mapping before disabling zai-org/GLM-5.1; otherwise requests such as together-ai/glm-5.2 remain unsupported and root glm-5.2 routing can never select Together after the cutoff.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/models/src/models/zai.ts`:
- Line 122: The deactivation cutoff in the ZAI model mapping is using a
date-only value that becomes midnight UTC at the start of July 10, so it expires
too early. Update the deactivatedAt value in the zai model mapping to an
explicit instant after July 10, using the same mapping object where
deactivatedAt is set, so the active window extends through the full day.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 172e8d76-1a0e-496f-a8bc-9a7766eeacb1
📒 Files selected for processing (1)
packages/models/src/models/zai.ts
| { | ||
| providerId: "together-ai", | ||
| externalId: "zai-org/GLM-5.1", | ||
| deactivatedAt: new Date("2026-07-10"), |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== Relevant source lines ==\n'
sed -n '112,128p' packages/models/src/models/zai.ts
printf '\n== Downstream comparison logic ==\n'
sed -n '170,190p' packages/scripts/src/export-models-dev.ts
printf '\n---\n'
sed -n '236,252p' packages/shared/src/components/model-selector.tsx
printf '\n== Date parsing probe ==\n'
node - <<'JS'
const d = new Date("2026-07-10");
console.log("input:", "2026-07-10");
console.log("toISOString:", d.toISOString());
console.log("UTC millis:", d.getTime());
console.log("UTC date parts:", d.getUTCFullYear(), d.getUTCMonth()+1, d.getUTCDate(), d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds());
JSRepository: theopenco/llmgateway
Length of output: 1958
Use an explicit post-July-10 cutoff here.
new Date("2026-07-10") resolves to 2026-07-10T00:00:00.000Z, so the > now / <= now checks will deactivate this mapping at the start of July 10, not after that day. If it should stay available through July 10, use a later instant such as 2026-07-11T00:00:00Z.
Suggested fix
- deactivatedAt: new Date("2026-07-10"),
+ deactivatedAt: new Date("2026-07-11T00:00:00Z"),📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| deactivatedAt: new Date("2026-07-10"), | |
| deactivatedAt: new Date("2026-07-11T00:00:00Z"), |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/models/src/models/zai.ts` at line 122, The deactivation cutoff in
the ZAI model mapping is using a date-only value that becomes midnight UTC at
the start of July 10, so it expires too early. Update the deactivatedAt value in
the zai model mapping to an explicit instant after July 10, using the same
mapping object where deactivatedAt is set, so the active window extends through
the full day.
Summary
Together AI notified us that the serverless
zai-org/GLM-5.1model will be deprecated on July 10, 2026 and removed from the serverless API after that date. The recommended alternative iszai-org/GLM-5.2.This marks the
together-aiprovider mapping for GLM-5.1 withdeactivatedAt: new Date("2026-07-10"), so the mapping stays active until the deprecation date and then auto-disables (matching the existing pattern used for other deactivated provider mappings, e.g. GLM-5 on Together).Notes
🤖 Generated with Claude Code
Summary by CodeRabbit
glm-5.1provider entry is marked with a deactivation date, helping ensure it is treated appropriately after the listed cutoff.