Skip to content

feat(pricing): add ZenMux Kimi K3 rates - #71

Merged
choi138 merged 1 commit into
mainfrom
feature/zenmux-kimi-pricing
Aug 5, 2026
Merged

feat(pricing): add ZenMux Kimi K3 rates#71
choi138 merged 1 commit into
mainfrom
feature/zenmux-kimi-pricing

Conversation

@choi138

@choi138 choi138 commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Why

moonshotai/kimi-k3-free displayed as unpriced in the Models tab, even though its price is known to be zero.

Traced the ID to ZenMux via ~/.hermes/config.yaml and its models.dev cache, which lists:

model ID input output cache_read
moonshotai/kimi-k3 $3.00 $15.00 $0.30
moonshotai/kimi-k3-free 0 0 0

The paid figures match Moonshot's official published K3 rates ($3 / $15 with a $0.30 cache-hit rate), which cross-validates the catalog. Note the -free suffix is a ZenMux convention, not OpenRouter's :free, so web lookups for the exact ID find nothing.

Toki had no entry for either ID. And because isPriceKnown requires event.cost > 0 or a table hit, a reported cost of exactly zero never counts as known — so a genuinely free model could not resolve as free. It rendered unpriced instead of $0.00.

What

Add both IDs and register both as exact-only.

Exact-only matters in both directions here:

  • without it, moonshotai/kimi-k3-free would inherit the paid $3/$15 through a moonshotai/kimi-k3 prefix match;
  • and an unknown future tier such as moonshotai/kimi-k3-turbo would silently inherit one of the two rates.

Neither ID publishes a cache-write rate, so cache writes stay at zero. This follows the existing kr/claude-opus-5 and zai-org/GLM-5.2 pattern.

Verification

  • 476 app tests and 125 package tests pass (473 and 125 before; 3 new).
  • The new tests were confirmed to fail first: removing the two exact-only registrations makes kimi-k3-turbo resolve to $3/$15 and kimi-k3-free-preview resolve to $0, and the test catches both.
  • swiftformat --lint 0/210, swiftlint --strict, and git diff --check clean.

Note

Only moonshotai/kimi-k3-free appears in the local ledger today. The paid ID is included so switching routes does not reintroduce an unpriced row. ZenMux also offers moonshotai/kimi-k2.7-code-free at zero; it is not added here since it is unused.

moonshotai/kimi-k3-free showed as unpriced even though its price is known to
be zero. The ID comes from ZenMux, whose catalog lists the free route at
$0/$0/$0 and the paid route at $3/$15 with a $0.30 cache-hit rate, matching
Moonshot's official published rates. Toki simply had no entry, and a reported
cost of exactly zero does not count as a known price, so a genuinely free model
could never resolve.

Register both IDs as exact-only. This matters in both directions: without it
the free ID would inherit the paid rates through a moonshotai/kimi-k3 prefix
match, and unknown future tiers would inherit one of the two. Neither ID
publishes a cache-write rate, so cache writes stay at zero.
@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 Aug 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 54 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7ff26c2b-baec-4809-aee0-0b4a053ed64f

📥 Commits

Reviewing files that changed from the base of the PR and between 0436600 and e4a42c3.

📒 Files selected for processing (2)
  • Sources/TokiUsageReaders/ModelPricing.swift
  • TokiTests/ModelPricingBehaviorTests.swift

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.

@choi138
choi138 merged commit 0dd8c6e into main Aug 5, 2026
7 checks passed
@choi138
choi138 deleted the feature/zenmux-kimi-pricing branch August 5, 2026 01:03
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.

1 participant