Skip to content

feat(models): add GLM-5.2 and DS V4 via ByteDance#2966

Merged
steebchen merged 2 commits into
mainfrom
add-bytedance-glm-5-2
Jul 9, 2026
Merged

feat(models): add GLM-5.2 and DS V4 via ByteDance#2966
steebchen merged 2 commits into
mainfrom
add-bytedance-glm-5-2

Conversation

@steebchen

Copy link
Copy Markdown
Member

Summary

Adds three new ByteDance (BytePlus ModelArk) model mappings:

  • GLM-5.2 — new model glm-5-2-260617 (flagship long-horizon text model, 1M context, tunable reasoning)
  • DeepSeek V4 Pro — new ByteDance provider mapping deepseek-v4-pro-260425 on the existing deepseek-v4-pro model
  • DeepSeek V4 Flash — new ByteDance provider mapping deepseek-v4-flash-260425 on the existing deepseek-v4-flash model

Details

Model IDs, pricing, context sizes, and max-output values were verified against the live BytePlus ModelArk /models catalog and the official pricing page:

Model Input Cached Output Context Max out
GLM-5.2 $1.4/M $0.26/M $4.4/M 1024k 128k
DeepSeek V4 Pro $1.74/M $0.145/M $3.48/M 1048576 393216
DeepSeek V4 Flash $0.14/M $0.028/M $0.28/M 1048576 393216

Capability notes:

  • GLM-5.2 wraps JSON-mode streamed output in markdown code fences, so it sets healStreamingJsonOutput: true (same mechanism used by the NVIDIA mapping) to buffer and heal the JSON before it reaches the client.
  • The DeepSeek V4 mappings are adaptive-thinking reasoning models whose ByteDance catalog reports json_object: false; they set jsonOutput: false and reasoningOutput: "omit", matching the existing DeepSeek-on-ByteDance (v3.1/v3.2) mappings.

Testing

  • pnpm format and pnpm build pass (models + gateway + api).
  • Model metadata/provider/compliance specs pass.
  • Scoped e2e (TEST_MODELS="bytedance/glm-5-2,bytedance/deepseek-v4-pro,bytedance/deepseek-v4-flash", CI=true, FULL_MODE=true) passes across basic, streaming, reasoning, tool calls, and JSON output — including the GLM-5.2 JSON-fence healing. Requires the models to be activated in the ByteDance Ark Console for the account behind the e2e secret.

🤖 Generated with Claude Code

Add GLM-5.2 (glm-5-2-260617) as a new ByteDance model and add
ByteDance provider mappings for DeepSeek V4 Pro (deepseek-v4-pro-260425)
and DeepSeek V4 Flash (deepseek-v4-flash-260425).

Pricing and limits verified against the BytePlus ModelArk catalog and
pricing page. GLM-5.2 wraps JSON-mode streaming output in markdown
fences, so it sets healStreamingJsonOutput. The DeepSeek V4 mappings are
adaptive-thinking reasoning models and set reasoningOutput: "omit" and
jsonOutput: false to match the upstream capability flags.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 9, 2026 13:55
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@steebchen, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 13 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: cb207ee3-f04d-49f1-8e73-776643a03226

📥 Commits

Reviewing files that changed from the base of the PR and between a107b6e and 2cb55be.

📒 Files selected for processing (3)
  • AGENTS.md
  • packages/models/src/models/bytedance.ts
  • packages/models/src/models/deepseek.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-bytedance-glm-5-2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Convert all per-token prices in the ByteDance model file from e-3 to e-6
so the coefficient reads directly as USD per million tokens (the number
providers publish). Values are unchanged. Document the convention in
AGENTS.md; requestPrice/perSecondPrice are exempt as they are flat USD.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@steebchen steebchen enabled auto-merge July 9, 2026 14:01
@steebchen steebchen added this pull request to the merge queue Jul 9, 2026
Merged via the queue into main with commit 694eb37 Jul 9, 2026
16 checks passed
@steebchen steebchen deleted the add-bytedance-glm-5-2 branch July 9, 2026 14:23
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.

2 participants