Repository navigation
fix(ai): price the DeepSeek group and its cached input - #4454
Conversation
Verification
Price sourceOpenRouter API Live cluster
Alerts
Other hosted modelsgenai-prices 0.1.13 prices Follow-up
|
The group deepseek-v4.1-flash-1017 runs every chat slot of the Service, but genai-prices 0.1.13 does not know it, so each call recorded 0 USD with the source unknown. The spend counter, `devops ai cost` and the alert HostedSpendDailyHigh could not see the spend of the Service. - `_HOSTED_GROUP_PRICES` in the pricing registry holds the price of the group under its route name and its deployment model: 0.0784 USD input, 0.002352 USD cached input and 0.2352 USD output per million tokens (OpenRouter endpoint deepinfra/fp8/flex, 2026-11-11). The file of set-price and `ai.price_overrides` win over it. - A price has an optional cached input rate. The registry prices the prompt tokens that the provider read from its cache at that rate, and passes them to genai-prices. An agent run gives the cached tokens of its replies. 94% of the prompt tokens of the group come from the cache. - The gateway config sets the same three rates, and a test fails when a hosted group has no price, when a model of the Service template is not priced or local, or when the client and gateway prices differ.
5a6e622 to
bd7ea6d
Compare
|
Review follow-up. This pull request merged before the fix, so I did not push to it. Finding 1 (major,
|
🤖 I have created a release *beep* *boop* --- ## [0.111.0](v0.110.0...v0.111.0) (2026-11-11) ### Features * **roadmap:** a decision-point registry with a resolver chain ([#4453](#4453)) ([b73e97a](b73e97a)) * **roadmap:** eval verify stores each case and resumes ([#4451](#4451)) ([7c59565](7c59565)) * **roadmap:** extend a step budget when the run makes progress ([#4464](#4464)) ([c8ed108](c8ed108)) ### Bug Fixes * **ai:** a failed model transport names its phase and its error ([#4460](#4460)) ([54743c4](54743c4)) * **ai:** price the DeepSeek group and its cached input ([#4454](#4454)) ([3b1f6bd](3b1f6bd)) * **roadmap:** stage and refine send no answer count or row ([#4484](#4484)) ([d9c8ee8](d9c8ee8)) * **roadmap:** tool docstrings garble the answer format ([#4486](#4486)) ([2f6114f](2f6114f)) ### Performance Improvements * **roadmap:** parse only the bodies that hold a job record ([#4455](#4455)) ([c653bde](c653bde)) * **tests:** evaluate hour-scale promtool tests every hour ([#4462](#4462)) ([0ac2f76](0ac2f76)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
The group
deepseek-v4.1-flash-1017runs every chat slot of the Service. genai-prices does not know it, so each call recorded 0 USD with the sourceunknown, anddevops ai costand the alertHostedSpendDailyHighcould not see it._HOSTED_GROUP_PRICESin the pricing registry prices the group under its route name and its deployment model: 0.0784 USD input, 0.002352 USD cached input and 0.2352 USD output per million tokens (OpenRouter endpointdeepinfra/fp8/flex, 2026-11-11).ai.price_overridesand the file ofset-pricewin over it.Closes #4403
Change:
openspec/changes/archive/2026-11-11-4403-price-the-deepseek-models-in-the/