Skip to content

kimi-for-coding: inherit indicative costs from base models instead of zeroing - #4071

Open
lorecanc wants to merge 1 commit into
anomalyco:devfrom
lorecanc:fix/kimi-for-coding-indicative-costs
Open

kimi-for-coding: inherit indicative costs from base models instead of zeroing#4071
lorecanc wants to merge 1 commit into
anomalyco:devfrom
lorecanc:fix/kimi-for-coding-indicative-costs

Conversation

@lorecanc

@lorecanc lorecanc commented Aug 5, 2026

Copy link
Copy Markdown

Summary

The kimi-for-coding provider models currently ship with zeroed [cost] tables, with the comment "Cost is zeroed per this provider's subscription convention". This makes usage tracking in opencode (and any models.dev consumer) report $0.00 for all Kimi For Coding traffic, even though the models are billed on the underlying model's token economics.

This PR removes the zeroed [cost] tables so each model inherits the cost of its base_model, keeping the pricing in sync automatically when the underlying model or its price changes.

What changed

  • providers/kimi-for-coding/models/kimi-for-coding.toml — no longer zeroes cost; inherits from moonshotai/kimi-k2.7-code (input $0.95 / output $4.00 / cache read $0.19)
  • providers/kimi-for-coding/models/kimi-for-coding-highspeed.toml — inherits from moonshotai/kimi-k2.7-code-highspeed (input $1.90 / output $8.00 / cache read $0.38)
  • providers/kimi-for-coding/models/k3.toml — inherits from moonshotai/kimi-k3 (input $3.00 / output $15.00 / cache read $0.30)
  • providers/kimi-for-coding/models/k3-256k.toml — inherits from moonshotai/kimi-k3

Each file now carries a comment clarifying that Kimi For Coding is a fixed-fee subscription plan and the inherited cost is the indicative pay-per-token equivalent, for usage tracking only, not the actual billing rate.

Rationale

The kimi-for-coding model IDs are rolling aliases that point at the current flagship coding model (e.g. kimi-for-codingmoonshotai/kimi-k2.7-code today). Because the models use base_model, dropping the zeroed [cost] tables yields:

  • Realistic cost estimates in usage dashboards instead of $0.00
  • Automatic price updates when the underlying model or alias changes
  • No maintenance of hardcoded numbers per alias

This follows the existing convention for other subscription-billed endpoints already listed in this repo — e.g. providers/opencode-go/models/kimi-k2.7-code.toml ships full per-token costs (input $0.95 / output $4.00 / cache read $0.19) without zeroing.

Notes

  • No schema changes; this is purely data.
  • If maintainers prefer keeping subscription endpoints at $0, an alternative would be a dedicated indicative flag in the schema — happy to discuss.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/kimi-for-coding/models/kimi-for-coding.toml:1 - Check: Provider models must author cost themselves; base_model only merges lab metadata under models/, and cost is provider-only. Why: Removing [cost] does not inherit Moonshot pay-per-token prices. Lab files models/moonshotai/kimi-k2.7-code.toml, kimi-k2.7-code-highspeed.toml, and kimi-k3.toml have no cost, so these four models resolve with no cost (not $0.95/$4.00 etc.). The PR body is incorrect on that point, and the cited providers/opencode-go/models/kimi-k2.7-code.toml authors [cost] explicitly rather than inheriting it. Action: Restore provider-authored [cost] on all four files. Either keep zeros (subscription convention used by other coding-plan providers) or copy the intended indicative USD/MTok numbers from providers/moonshotai/ into each file; do not rely on base_model for pricing.

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