Files
magpie/internal/provider/testdata/models_dev_opendesign.json
T
yetone 1ca2c62c49 catalog: a relay's deepseek-v4.1-flash is priced at DeepSeek's, whose entry names it by a dated canonical id (Winnie7572 on X, #4811, #5622)
models.dev lists DeepSeek's V4.1 Flash only as deepseek-flash with
canonical_model_id deepseek/deepseek-v4.1-flash-1017. The canonical
fallback (#1520) matched the undated id alone, so every relay serving
deepseek-v4.1-flash (Open Design, WorkBuddy, Tencent Cloud) had no price
and no estimated cost. priceIndex now also keys a maker's own canonical
entries with a trailing snapshot date (-MMDD, -YYYYMMDD, -YYYY-MM-DD)
taken off, tried after the exact and dashed keys, so a price a vendor
lists by the id as given still wins. Only the provider that is the
canonical's maker counts, as before, so no other vendor's model is priced.

Open Design's other models were checked with the plugin's real ids
(packages/opendesign models.mjs) against models.dev: every one but
deepseek-v4.1-flash and deepseek-v4.1-flash-eco was already priced.
-eco is the plugin's own id, not a snapshot, and stays unpriced (filed).

Run (mote, at this tree): go test -count=1 for internal/provider,
catalog, usage, gui all ok; go vet darwin, windows, linux nogui ok.
New TestRelayDeepSeekSnapshotCanonicalPriced (models.dev entries in
testdata/models_dev_opendesign.json) is red with the snapshot key
disabled by hand. TestCommandCodePlanPrice's relay case asserted the gap
("a relay took Command Code's list price" for an unpriced model); it now
asserts DeepSeek's price, which Command Code's plan still beats with its
own catalog. Not tried: a live Open Design account.
2026-11-13 01:01:23 +08:00

1 line
11 KiB
JSON

{"deepseek": {"id": "deepseek", "models": {"deepseek-v4-pro": {"id": "deepseek-v4-pro", "cost": {"input": 0.66, "output": 1.98, "reasoning": 1.98, "cache_read": 0.022}, "canonical_model_id": "deepseek/deepseek-v4-pro-0813"}, "deepseek-flash": {"id": "deepseek-flash", "cost": {"input": 0.15, "output": 0.6, "reasoning": 0.6, "cache_read": 0.003}, "canonical_model_id": "deepseek/deepseek-v4.1-flash-1017"}, "deepseek-v4-flash-vision-exp": {"id": "deepseek-v4-flash-vision-exp", "cost": {"input": 0.15, "output": 0.6, "reasoning": 0.6, "cache_read": 0.003}, "canonical_model_id": "deepseek/deepseek-v4.1-flash-1017"}, "deepseek-v4-flash": {"id": "deepseek-v4-flash", "cost": {"input": 0.15, "output": 0.6, "reasoning": 0.6, "cache_read": 0.003}, "canonical_model_id": "deepseek/deepseek-v4.1-flash-1017"}}}, "anthropic": {"id": "anthropic", "models": {"claude-sonnet-5": {"id": "claude-sonnet-5", "cost": {"input": 2, "output": 10, "cache_read": 0.2, "cache_write": 2.5}, "canonical_model_id": null}, "claude-haiku-4-5": {"id": "claude-haiku-4-5", "cost": {"input": 1, "output": 5, "cache_read": 0.1, "cache_write": 1.25}, "canonical_model_id": "anthropic/claude-haiku-4-5"}, "claude-sonnet-5-5": {"id": "claude-sonnet-5-5", "cost": {"input": 2, "output": 10, "cache_read": 0.1, "cache_write": 2.5}, "canonical_model_id": "anthropic/claude-sonnet-5-5"}, "claude-opus-5-5": {"id": "claude-opus-5-5", "cost": {"input": 4, "output": 20, "cache_read": 0.2, "cache_write": 5}, "canonical_model_id": "anthropic/claude-opus-5-5"}, "claude-haiku-5-5": {"id": "claude-haiku-5-5", "cost": {"input": 0.1, "output": 0.5, "cache_read": 0.01, "cache_write": 0.125, "tiers": [{"input": 0.5, "output": 2.5, "cache_read": 0.05, "cache_write": 0.625, "tier": {"type": "context", "size": 100000}}]}, "canonical_model_id": "anthropic/claude-haiku-5-5"}, "claude-fable-5": {"id": "claude-fable-5", "cost": {"input": 10, "output": 50, "cache_read": 1, "cache_write": 12.5}, "canonical_model_id": null}, "claude-opus-4-8": {"id": "claude-opus-4-8", "cost": {"input": 5, "output": 25, "cache_read": 0.5, "cache_write": 6.25}, "canonical_model_id": null}, "claude-fable-5-2": {"id": "claude-fable-5-2", "cost": {"input": 8, "output": 40, "cache_read": 0.2, "cache_write": 10}, "canonical_model_id": "anthropic/claude-fable-5-2"}, "claude-sonnet-4-5": {"id": "claude-sonnet-4-5", "cost": {"input": 3, "output": 15, "cache_read": 0.3, "cache_write": 3.75}, "canonical_model_id": "anthropic/claude-sonnet-4-5"}, "claude-opus-4-7": {"id": "claude-opus-4-7", "cost": {"input": 5, "output": 25, "cache_read": 0.5, "cache_write": 6.25}, "canonical_model_id": null}, "claude-opus-4-6": {"id": "claude-opus-4-6", "cost": {"input": 5, "output": 25, "cache_read": 0.5, "cache_write": 6.25}, "canonical_model_id": null}, "claude-sonnet-4-5-20250929": {"id": "claude-sonnet-4-5-20250929", "cost": {"input": 3, "output": 15, "cache_read": 0.3, "cache_write": 3.75}, "canonical_model_id": null}, "claude-haiku-4-5-20251001": {"id": "claude-haiku-4-5-20251001", "cost": {"input": 1, "output": 5, "cache_read": 0.1, "cache_write": 1.25}, "canonical_model_id": null}, "claude-opus-4-5-20251101": {"id": "claude-opus-4-5-20251101", "cost": {"input": 5, "output": 25, "cache_read": 0.5, "cache_write": 6.25}, "canonical_model_id": null}, "claude-opus-4-5": {"id": "claude-opus-4-5", "cost": {"input": 5, "output": 25, "cache_read": 0.5, "cache_write": 6.25}, "canonical_model_id": "anthropic/claude-opus-4-5"}, "claude-sonnet-4-6": {"id": "claude-sonnet-4-6", "cost": {"input": 3, "output": 15, "cache_read": 0.3, "cache_write": 3.75}, "canonical_model_id": null}, "claude-fable-5-1": {"id": "claude-fable-5-1", "cost": {"input": 10, "output": 50, "cache_read": 0.25, "cache_write": 12.5}, "canonical_model_id": "anthropic/claude-fable-5-1"}, "claude-opus-5": {"id": "claude-opus-5", "cost": {"input": 5, "output": 25, "cache_read": 0.5, "cache_write": 6.25}, "canonical_model_id": "anthropic/claude-opus-5"}}}, "zhipuai": {"id": "zhipuai", "models": {"glm-4.6v-flash": {"id": "glm-4.6v-flash", "cost": {"input": 0, "output": 0, "cache_read": 0, "cache_write": 0}, "canonical_model_id": "zhipuai/glm-4.6v-flash"}, "glm-4.7": {"id": "glm-4.7", "cost": {"input": 0.44819, "output": 2.09153, "cache_read": 0.08964, "cache_write": 0, "tiers": [{"input": 0.59758, "output": 2.39032, "cache_read": 0.11952, "cache_write": 0, "tier": {"type": "context", "size": 32000}}]}, "canonical_model_id": "zhipuai/glm-4.7"}, "glm-5.2": {"id": "glm-5.2", "cost": {"input": 1.19516, "output": 4.18306, "cache_read": 0.29879, "cache_write": 0}, "canonical_model_id": "zhipuai/glm-5.2"}, "glm-4.7-flashx": {"id": "glm-4.7-flashx", "cost": {"input": 0.0747, "output": 0.44819, "cache_read": 0.01494, "cache_write": 0}, "canonical_model_id": "zhipuai/glm-4.7-flashx"}, "glm-5.3-flashx": {"id": "glm-5.3-flashx", "cost": {"input": 0.29879, "output": 1.04577, "cache_read": 0.08516, "cache_write": 0}, "canonical_model_id": "zhipuai/glm-5.3-flash"}, "glm-5.3": {"id": "glm-5.3", "cost": {"input": 1.19516, "output": 4.18306, "cache_read": 0.29879, "cache_write": 0}, "canonical_model_id": "zhipuai/glm-5.3"}, "glm-4.5-flash": {"id": "glm-4.5-flash", "cost": {"input": 0, "output": 0, "cache_read": 0, "cache_write": 0}, "canonical_model_id": "zhipuai/glm-4.5-flash"}, "glm-5v-turbo": {"id": "glm-5v-turbo", "cost": {"input": 0.74698, "output": 3.28669, "cache_read": 0.17927, "cache_write": 0, "tiers": [{"input": 1.04577, "output": 3.88427, "cache_read": 0.26891, "cache_write": 0, "tier": {"type": "context", "size": 32000}}]}, "canonical_model_id": "zhipuai/glm-5v-turbo"}, "glm-4.5": {"id": "glm-4.5", "cost": {"input": 0.6, "output": 2.2, "cache_read": 0.11, "cache_write": 0}, "canonical_model_id": "zhipuai/glm-4.5"}, "glm-4.6v": {"id": "glm-4.6v", "cost": {"input": 0.1494, "output": 0.44819, "cache_read": 0.02988, "cache_write": 0, "tiers": [{"input": 0.29879, "output": 0.89637, "cache_read": 0.05976, "cache_write": 0, "tier": {"type": "context", "size": 32000}}]}, "canonical_model_id": "zhipuai/glm-4.6v"}, "glm-4.5-air": {"id": "glm-4.5-air", "cost": {"input": 0.11952, "output": 0.89637, "cache_read": 0.0239, "cache_write": 0, "tiers": [{"input": 0.17927, "output": 1.19516, "cache_read": 0.03585, "cache_write": 0, "tier": {"type": "context", "size": 32000}}]}, "canonical_model_id": "zhipuai/glm-4.5-air"}, "glm-4.5v": {"id": "glm-4.5v", "cost": {"input": 0.29879, "output": 0.89637, "cache_read": 0.05976, "cache_write": 0, "tiers": [{"input": 0.59758, "output": 1.79274, "cache_read": 0.11952, "cache_write": 0, "tier": {"type": "context", "size": 32000}}]}, "canonical_model_id": "zhipuai/glm-4.5v"}, "glm-4.6": {"id": "glm-4.6", "cost": {"input": 0.6, "output": 2.2, "cache_read": 0.11, "cache_write": 0}, "canonical_model_id": "zhipuai/glm-4.6"}, "glm-5.1": {"id": "glm-5.1", "cost": {"input": 0.89637, "output": 3.58548, "cache_read": 0.19421, "cache_write": 0, "tiers": [{"input": 1.19516, "output": 4.18306, "cache_read": 0.29879, "cache_write": 0, "tier": {"type": "context", "size": 32000}}]}, "canonical_model_id": "zhipuai/glm-5.1"}, "glm-5.3-flash": {"id": "glm-5.3-flash", "cost": {"input": 0.11952, "output": 0.41831, "cache_read": 0.03436, "cache_write": 0}, "canonical_model_id": "zhipuai/glm-5.3-flash"}, "glm-4.7-flash": {"id": "glm-4.7-flash", "cost": {"input": 0, "output": 0, "cache_read": 0, "cache_write": 0}, "canonical_model_id": "zhipuai/glm-4.7-flash"}, "glm-5": {"id": "glm-5", "cost": {"input": 0.59758, "output": 2.68911, "cache_read": 0.1494, "cache_write": 0, "tiers": [{"input": 0.89637, "output": 3.28669, "cache_read": 0.22409, "cache_write": 0, "tier": {"type": "context", "size": 32000}}]}, "canonical_model_id": "zhipuai/glm-5"}}}, "moonshotai": {"id": "moonshotai", "models": {"kimi-k2.7-code": {"id": "kimi-k2.7-code", "cost": {"input": 0.95, "output": 4, "cache_read": 0.19}, "canonical_model_id": "moonshotai/kimi-k2.7-code"}, "kimi-k2.6": {"id": "kimi-k2.6", "cost": {"input": 0.95, "output": 4, "cache_read": 0.16}, "canonical_model_id": "moonshotai/kimi-k2.6"}, "kimi-k2.7-code-highspeed": {"id": "kimi-k2.7-code-highspeed", "cost": {"input": 1.9, "output": 8, "cache_read": 0.38}, "canonical_model_id": "moonshotai/kimi-k2.7-code"}, "kimi-k3.1-pro-highspeed": {"id": "kimi-k3.1-pro-highspeed", "cost": {"input": 4, "output": 20, "cache_read": 0.2, "cache_write": 4}, "canonical_model_id": "moonshotai/kimi-k3.1-pro"}, "kimi-k3": {"id": "kimi-k3", "cost": {"input": 3, "output": 15, "cache_read": 0.3, "cache_write": 3}, "canonical_model_id": "moonshotai/kimi-k3"}, "kimi-k3.1-pro": {"id": "kimi-k3.1-pro", "cost": {"input": 2, "output": 10, "cache_read": 0.2, "cache_write": 2}, "canonical_model_id": "moonshotai/kimi-k3.1-pro"}}}, "xiaomi": {"id": "xiaomi", "models": {"mimo-v2.5-pro": {"id": "mimo-v2.5-pro", "cost": {"input": 0.435, "output": 0.87, "cache_read": 0.0036}, "canonical_model_id": "xiaomi/mimo-v2.5-pro"}, "mimo-v2.5-pro-ultraspeed": {"id": "mimo-v2.5-pro-ultraspeed", "cost": {"input": 1.305, "output": 2.61, "cache_read": 0.0108}, "canonical_model_id": "xiaomi/mimo-v2.5-pro-ultraspeed"}, "mimo-v2.6-pro": {"id": "mimo-v2.6-pro", "cost": {"input": 0.435, "output": 0.87, "cache_read": 0.0036}, "canonical_model_id": "xiaomi/mimo-v2.6-pro"}, "mimo-v2.5": {"id": "mimo-v2.5", "cost": {"input": 0.14, "output": 0.28, "cache_read": 0.0028}, "canonical_model_id": "xiaomi/mimo-v2.5"}, "mimo-v2.6-flash": {"id": "mimo-v2.6-flash", "cost": {"input": 0.14, "output": 0.28, "cache_read": 0.0028}, "canonical_model_id": "xiaomi/mimo-v2.6-flash"}, "mimo-v2.6-pro-ultraspeed": {"id": "mimo-v2.6-pro-ultraspeed", "cost": {"input": 4.35, "output": 8.7, "cache_read": 0.036}, "canonical_model_id": "xiaomi/mimo-v2.6-pro-ultraspeed"}}}, "minimax": {"id": "minimax", "models": {"MiniMax-M3": {"id": "MiniMax-M3", "cost": {"input": 0.3, "output": 1.2, "cache_read": 0.06, "tiers": [{"input": 0.6, "output": 2.4, "cache_read": 0.12, "tier": {"type": "context", "size": 512000}}], "context_over_200k": {"input": 0.6, "output": 2.4, "cache_read": 0.12}}, "canonical_model_id": null}, "MiniMax-M2.7": {"id": "MiniMax-M2.7", "cost": {"input": 0.3, "output": 1.2, "cache_read": 0.06, "cache_write": 0.375}, "canonical_model_id": null}, "MiniMax-M2": {"id": "MiniMax-M2", "cost": {"input": 0.3, "output": 1.2}, "canonical_model_id": null}, "MiniMax-M2.1": {"id": "MiniMax-M2.1", "cost": {"input": 0.3, "output": 1.2, "cache_read": 0.03, "cache_write": 0.375}, "canonical_model_id": null}, "MiniMax-M2.7-highspeed": {"id": "MiniMax-M2.7-highspeed", "cost": {"input": 0.6, "output": 2.4, "cache_read": 0.06, "cache_write": 0.375}, "canonical_model_id": null}, "MiniMax-M2.5-highspeed": {"id": "MiniMax-M2.5-highspeed", "cost": {"input": 0.6, "output": 2.4, "cache_read": 0.03, "cache_write": 0.375}, "canonical_model_id": null}, "MiniMax-M2.5": {"id": "MiniMax-M2.5", "cost": {"input": 0.3, "output": 1.2, "cache_read": 0.03, "cache_write": 0.375}, "canonical_model_id": null}, "MiniMax-M3.1-Flash": {"id": "MiniMax-M3.1-Flash", "cost": {"input": 0.15, "output": 0.6, "cache_read": 0.015}, "canonical_model_id": "minimax/MiniMax-M3.1-Flash"}}}}