fix(cost): add Kimi K3 (moonshotai) to the model cost registry - #5743
Open
Mohith26 wants to merge 2 commits into
Open
fix(cost): add Kimi K3 (moonshotai) to the model cost registry#5743Mohith26 wants to merge 2 commits into
Mohith26 wants to merge 2 commits into
Conversation
Kimi K3 requests routed through Helicone resolved to no cost registry entry, so all K3 traffic was billed at $0 even though token counts were recorded correctly. The moonshotai author only aggregated kimi-k2 and kimi-k2.5. Add kimi-k3 model config and endpoint configs for the two registry providers currently serving it (openrouter, novita), and register them in the moonshotai author index. Pricing independently verified on 2026-07-28 against both providers' machine-readable model listings: - https://openrouter.ai/api/v1/models (moonshotai/kimi-k3): prompt 0.000003, completion 0.000015, input_cache_read 0.0000003, context_length 1048576 - https://api.novita.ai/v3/openai/models (moonshotai/kimi-k3): input 30000 / output 150000 / cache read 3000 (per-1M price units of $1/10,000, same scale as the existing kimi-k2.5 novita entry), i.e. $3.00 / $15.00 / $0.30 per 1M tokens; max_output_tokens 1048576 Both agree: $3.00/1M input, $15.00/1M output, cached input $0.30/1M (cachedInput multiplier 0.1). Moonshot's official docs (https://platform.moonshot.ai/docs/pricing/chat-k3) confirm the model and its 1M-token context window. OpenRouter supported_parameters used for the openrouter endpoint; novita parameters follow the existing kimi-k2.5 novita entry. Registry snapshots updated for the new endpoints. Fixes Helicone#5742
Add registry tests following the registry-perplexity conventions: - kimi-k3 model definition and metadata - kimi-k3:openrouter and kimi-k3:novita endpoints exist with the verified $3.00/1M input, $15.00/1M output, 0.1 cached-input multiplier pricing - regression for Helicone#5742: modelCostBreakdownFromRegistry and calculateModelCostBreakdown resolve nonzero (exact) cost for providerModelId moonshotai/kimi-k3 on both providers, including the cached-input discount All 12 tests fail on main (cost lookup returns null -> billed $0) and pass with the registry entries added.
Contributor
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
@Mohith26 is attempting to deploy a commit to the Helicone Team on Vercel. A member of the Team first needs to authorize it. |
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.
Fixes #5742, reported by @sophiaashi.
Kimi K3 traffic had no cost registry entry (the moonshotai author only covered kimi-k2 and kimi-k2.5), so K3 requests resolved to null cost and billed at $0 while token counts were recorded correctly.
Adds the kimi-k3 model config and endpoints for the two registry providers currently serving it (openrouter, novita), registered in the moonshotai author index. Pricing was verified against both providers' machine-readable model listings on 2026-07-28 and they agree: $3.00/1M input, $15.00/1M output, cached input $0.30/1M (0.1 multiplier). Moonshot's own pricing page confirms the model and 1M context window. Registry snapshots updated.
Tests follow the registry-perplexity conventions; the 12 new tests fail on main (cost resolves to null) and pass with the entries added.