Why it was 0: magpie already counts a subscription's calls at the API list
price (a Claude or Codex account at its maker's, cf6b82f7). A Kimi Code
provider is looked up in its own models.dev catalog first, and models.dev
lists every model of kimi-code-plan-global / kimi-code-plan-cn at $0 (what
the membership charges per token), so k3, k3-256k, kimi-for-coding and
kimi-for-coding-highspeed were all "priced" at $0. The same $0 catalogs
were also among the maker catalogs, so MakerPrice("k3") was $0 too.
What changed (internal/provider/models.go):
- membershipCatalogs (the two Kimi Code plan catalogs) are never read for a
price: ListPrice, MakerPrice and PricedName skip them.
- A provider served at a Kimi Code catalog prices its model as the Kimi API
model it is (kimiCodeAPI), per Kimi Code's docs
(https://www.kimi.com/code/docs/en/, read 2026-10-09): k3 and k3-256k are
K3 -> kimi-k3; kimi-for-coding-highspeed is K2.7 Code HighSpeed ->
kimi-k2.7-code-highspeed. models.dev's canonical_model_id agrees. The
prices come from moonshotai's catalog, which matches Kimi's pricing page
(https://platform.kimi.ai/docs/pricing/chat: kimi-k3 $3 in, $15 out,
$0.30 cached, $3 cache write; kimi-k2.7-code-highspeed $1.90/$8/$0.38).
- kimi-for-coding is K2.8 Preview, which the Kimi API doesn't sell: it has
no API price, so it is now unpriced (the "—" / "no known price" the GUI
already shows) instead of ¥0.000. The user can give it a price with
`magpie model price kimi-code/kimi-for-coding …` or in Names & levels.
- The alias is scoped to Kimi Code providers: a relay's own "k3" keeps its
own catalog price; Moonshot pay-as-you-go's kimi-k3, an OpenCode free
model ($0) and Codex's maker price are unchanged.
- PricedNameFor(provider, model): the Requests list's "API price
reference" names kimi-k3 for a Kimi Code k3 (internal/gui/usage.go).
Docs: reference.md (What a model costs) and providers-accounts.md.
Tests: TestKimiCodeListPrice (internal/provider; fixture
testdata/kimi_code_catalog.json is models.dev's own moonshotai and Kimi Code
plan entries) and TestKimiCodeCost (internal/usage; the reporter's k3 row,
240K in / 78.4K out / 10.0M cached, counted at $4.896 in the ledger and the
summary, kimi-for-coding unpriced, moonshot/kimi-k3 unchanged). Both fail on
the old models.go (every Kimi Code model priced at $0, MakerPrice(k3) $0,
k3 cost=0, unpriced 0); PricedNameFor's check fails with the alias turned
off ("k3-256k").
Run: gofmt -l (empty); go vet -tags nogui, GOOS=linux go vet -tags nogui,
GOOS=windows go vet -tags nogui on internal/provider, internal/usage,
internal/gui; go build, GOOS=linux go build -tags nogui, GOOS=windows go
build; go test -tags nogui -count=1 ./... under a temp HOME with pinned
caches: all ok; -race -count=3 on the new tests ok. No GUI asset changed,
so the Playwright suite wasn't run. Not tried with a real Kimi Code
account or the reporter's usage log.
192 lines
3.7 KiB
JSON
192 lines
3.7 KiB
JSON
{
|
|
"moonshotai": {
|
|
"id": "moonshotai",
|
|
"models": {
|
|
"kimi-k3": {
|
|
"id": "kimi-k3",
|
|
"name": "Kimi K3",
|
|
"cost": {
|
|
"input": 3,
|
|
"output": 15,
|
|
"cache_read": 0.3,
|
|
"cache_write": 3
|
|
},
|
|
"canonical_model_id": "moonshotai/kimi-k3"
|
|
},
|
|
"kimi-k2.7-code-highspeed": {
|
|
"id": "kimi-k2.7-code-highspeed",
|
|
"name": "Kimi K2.7 Code HighSpeed",
|
|
"cost": {
|
|
"input": 1.9,
|
|
"output": 8,
|
|
"cache_read": 0.38
|
|
},
|
|
"canonical_model_id": "moonshotai/kimi-k2.7-code"
|
|
},
|
|
"kimi-k2.6": {
|
|
"id": "kimi-k2.6",
|
|
"name": "Kimi K2.6",
|
|
"cost": {
|
|
"input": 0.95,
|
|
"output": 4,
|
|
"cache_read": 0.16
|
|
}
|
|
},
|
|
"kimi-k2.7-code": {
|
|
"id": "kimi-k2.7-code",
|
|
"name": "Kimi K2.7 Code",
|
|
"cost": {
|
|
"input": 0.95,
|
|
"output": 4,
|
|
"cache_read": 0.19
|
|
},
|
|
"canonical_model_id": "moonshotai/kimi-k2.7-code"
|
|
}
|
|
}
|
|
},
|
|
"kimi-code-plan-global": {
|
|
"id": "kimi-code-plan-global",
|
|
"models": {
|
|
"kimi-for-coding-highspeed": {
|
|
"id": "kimi-for-coding-highspeed",
|
|
"name": "Kimi For Coding HighSpeed",
|
|
"cost": {
|
|
"input": 0,
|
|
"output": 0,
|
|
"cache_read": 0,
|
|
"cache_write": 0
|
|
},
|
|
"canonical_model_id": "moonshotai/kimi-k2.7-code-highspeed"
|
|
},
|
|
"kimi-for-coding": {
|
|
"id": "kimi-for-coding",
|
|
"name": "kimi-for-coding",
|
|
"cost": {
|
|
"input": 0,
|
|
"output": 0,
|
|
"cache_read": 0,
|
|
"cache_write": 0
|
|
},
|
|
"canonical_model_id": "moonshotai/kimi-k2.8-preview"
|
|
},
|
|
"k3-256k": {
|
|
"id": "k3-256k",
|
|
"name": "Kimi K3-256K",
|
|
"cost": {
|
|
"input": 0,
|
|
"output": 0,
|
|
"cache_read": 0,
|
|
"cache_write": 0
|
|
},
|
|
"canonical_model_id": "moonshotai/kimi-k3"
|
|
},
|
|
"k3": {
|
|
"id": "k3",
|
|
"name": "Kimi K3",
|
|
"cost": {
|
|
"input": 0,
|
|
"output": 0,
|
|
"cache_read": 0,
|
|
"cache_write": 0
|
|
},
|
|
"canonical_model_id": "moonshotai/kimi-k3"
|
|
}
|
|
}
|
|
},
|
|
"kimi-code-plan-cn": {
|
|
"id": "kimi-code-plan-cn",
|
|
"models": {
|
|
"kimi-for-coding-highspeed": {
|
|
"id": "kimi-for-coding-highspeed",
|
|
"name": "Kimi For Coding HighSpeed",
|
|
"cost": {
|
|
"input": 0,
|
|
"output": 0,
|
|
"cache_read": 0,
|
|
"cache_write": 0
|
|
},
|
|
"canonical_model_id": "moonshotai/kimi-k2.7-code-highspeed"
|
|
},
|
|
"kimi-for-coding": {
|
|
"id": "kimi-for-coding",
|
|
"name": "kimi-for-coding",
|
|
"cost": {
|
|
"input": 0,
|
|
"output": 0,
|
|
"cache_read": 0,
|
|
"cache_write": 0
|
|
},
|
|
"canonical_model_id": "moonshotai/kimi-k2.8-preview"
|
|
},
|
|
"k3-256k": {
|
|
"id": "k3-256k",
|
|
"name": "Kimi K3-256K",
|
|
"cost": {
|
|
"input": 0,
|
|
"output": 0,
|
|
"cache_read": 0,
|
|
"cache_write": 0
|
|
},
|
|
"canonical_model_id": "moonshotai/kimi-k3"
|
|
},
|
|
"k3": {
|
|
"id": "k3",
|
|
"name": "Kimi K3",
|
|
"cost": {
|
|
"input": 0,
|
|
"output": 0,
|
|
"cache_read": 0,
|
|
"cache_write": 0
|
|
},
|
|
"canonical_model_id": "moonshotai/kimi-k3"
|
|
}
|
|
}
|
|
},
|
|
"openai": {
|
|
"id": "openai",
|
|
"models": {
|
|
"gpt-6-luna": {
|
|
"id": "gpt-6-luna",
|
|
"name": "GPT-6 Luna",
|
|
"cost": {
|
|
"input": 0.1,
|
|
"output": 0.5,
|
|
"cache_read": 0.01,
|
|
"cache_write": 0.125,
|
|
"tiers": [
|
|
{
|
|
"input": 0.2,
|
|
"output": 0.75,
|
|
"cache_read": 0.02,
|
|
"cache_write": 0.25,
|
|
"tier": {
|
|
"type": "context",
|
|
"size": 272000
|
|
}
|
|
}
|
|
],
|
|
"context_over_200k": {
|
|
"input": 0.2,
|
|
"output": 0.75,
|
|
"cache_read": 0.02,
|
|
"cache_write": 0.25
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"opencode": {
|
|
"id": "opencode",
|
|
"models": {
|
|
"qwen3.6-plus-free": {
|
|
"id": "qwen3.6-plus-free",
|
|
"name": "Qwen3.6 Plus Free",
|
|
"cost": {
|
|
"input": 0,
|
|
"output": 0,
|
|
"cache_read": 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |