Repository navigation
fix(zcode): recognize current Z.ai built-in plan provider IDs - #1832
Merged
Merged
Conversation
Co-authored-by: omeraltinova <[email protected]>
Deploying with
|
| 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 |
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_providerinrust/adapters/zcode/src/parser.rsnow matches theaccount:zai-andbuiltin:zai-families by prefix, covering the reportedaccount:zai-individual-coding-planandaccount:zai-start-planIDs plus variants such asbuiltin:zai-start-planwithout 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_idsregression 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 --checkandcargo clippy -p ccusage-adapter-zcode -- -D warningsclean.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_providernow matchesaccount:zai-andbuiltin:zai-provider ID prefixes instead of enumerating each plan, coveringaccount:zai-individual-coding-plan,account:zai-start-plan, andbuiltin:zai-start-planplus variants.Written for commit 210bf3d. Summary will update on new commits.