DeepSeek cards store only the off-peak rate; hold both behind pricing_period #449
Send to my agentClosed
tombeckenham opened this issue ·0 comments
src/server/providers/deepseek-pricing.ts reads six prices per model from https://api-docs.deepseek.com/quick_start/pricing/ (off-peak and peak for cache read, input and output). It keeps only the off-peak three and drops peak. Every native DeepSeek card therefore presents the off-peak rate as the price, and a peak-hours call is billed more than our estimate. That's a fallback under the no-pricing-fallbacks rule: one period's rate is shown as the actual price.
Do#
- The card holds both rates behind a required usage lever
pricing_period: off_peak | peakwith no default. That is the same lever BytePlus already uses for DeepSeek V4.1 Flash (#423):compilePeriodCardinsrc/server/providers/byteplus-pricing.ts. Reuse it. If it has to move to a shared module, move it rather than copy it. /v1/estimatewithoutpricing_periodrefuses and names the lever, and an unknown value refuses. Add a test for each.- The parser stays fail-closed: if the page doesn't yield exactly an off-peak and a peak set per model, throw. Never fall back to either rate alone.
- Check that the gap-report scorer (
src/lib/completeness.ts:125, which already handles BytePlus period cards) counts these rows as priced. - Bump the docs cache version if the parsed output changes.
- Breaking change for estimate callers on DeepSeek: add a README note (no back-compat needed per project policy).
Not this#
- No
pricingRange(#406). That is for one id served by several routes; this is one route whose rate depends on the call's time. - Don't infer the period from the request clock.
tombeckenham closed this
Sign in to join this conversation.