Skip to content

fix(zcode): recognize current Z.ai built-in plan provider IDs - #1832

Merged
ryoppippi merged 1 commit into
mainfrom
pullfrog/issue-1831-run-37592701288-attempt-1
Oct 8, 2026
Merged

ryoppippi merged 1 commit into
mainfrom
pullfrog/issue-1831-run-37592701288-attempt-1

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Recognizes current Z.ai built-in plan provider IDs in the ZCode adapter so GLM-5.3 and GLM-5.3-Flash rows price from the existing embedded data instead of reporting $0.00 with missing-pricing warnings.

is_zai_provider in rust/adapters/zcode/src/parser.rs now matches the account:zai- and builtin:zai- families by prefix, covering the reported account:zai-individual-coding-plan and account:zai-start-plan IDs plus variants such as builtin:zai-start-plan without enumerating each plan. Existing exact matches and the unknown-custom-provider guard are unchanged, so opaque provider UUIDs still report zero cost with a missing-pricing warning.

Added prices_current_zai_account_and_builtin_plan_ids regression test pricing both GLM models across the three observed plan ID shapes.

Tests: cargo test -p ccusage-adapter-zcode (20 passed), cargo test -p ccusage-adapter-all -- zcode (2 passed), cargo fmt --check and cargo clippy -p ccusage-adapter-zcode -- -D warnings clean.

Out of scope per the issue: BigModel account: plan equivalents and OpenRouter/OpenCode-Go provider mappings were not added since their IDs and usage record shapes are unverified.

Changes left uncommitted in the working tree as instructed.

Closes #1831


Summary by cubic

Fixes the ZCode adapter so current Z.ai built-in plan provider IDs are recognized, pricing GLM-5.3 and GLM-5.3-Flash rows from the embedded data instead of $0.00 with missing-pricing warnings.

  • is_zai_provider now matches account:zai- and builtin:zai- provider ID prefixes instead of enumerating each plan, covering account:zai-individual-coding-plan, account:zai-start-plan, and builtin:zai-start-plan plus variants.
  • Existing exact matches and the unknown-custom-provider guard are unchanged, so opaque provider UUIDs still report zero cost with a warning.
  • Added a regression test pricing both GLM models across the three observed plan ID shapes.

Written for commit 210bf3d. Summary will update on new commits.

Review in cubic Turn on auto-fix

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ccusage-guide 210bf3d Commit Preview URL

Branch Preview URL
Oct 07 2026, 08:36 AM

@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f6e6c39e-a50c-400d-b05a-2c2c64eda0ba

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@ryoppippi
ryoppippi merged commit b05147a into main Oct 8, 2026
7 checks passed
@ryoppippi
ryoppippi deleted the pullfrog/issue-1831-run-37592701288-attempt-1 branch October 8, 2026 17:12
@github-actions github-actions Bot mentioned this pull request Oct 8, 2026
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.

ZCode: missing pricing for built-in Z.ai plans

1 participant