10 views
-/https://github.com/berriai/litellm/issues/34729
GitHub Ā· issue

#34729 [Bug]: DashScope tiered pricing uses graduated slices instead of the request-size tier

  • State: open
  • Author: @emerzon

### Check for existing issues

- [x] I searched open and closed issues before filing - [x] #30738 concerns string coercion inside DashScope tier data and #21249 concerns missing flat prices during budget enforcement, so neither covers this pricing-model mismatch

### What happened?

The DashScope cost calculator applies graduated, income-tax-style slicing to `tiered_pricing`, while Alibaba Model Studio selects one tier from the total input-token count and bills all input and output tokens at that tier's unit prices

The proxy budget reservation code already implements the request-size model through `select_tier_for_input`, so reservation estimates and post-response spend accounting also disagree with each other

This can materially understate logged spend and weaken budget enforcement for large Qwen requests. Cached input is especially inconsistent because the current calculator tiers the cached-token count independently from zero instead of selecting a rate from the request's total input size

Alibaba's current pricing rule is documented here:

https://www.alibabacloud.com/help/en/model-studio/model-pricing

The relevant rule says the unit price is selected by total input tokens i…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 Ā· 31d18h59m37s ago — entered Ā· #import:https:::github.com:berriai:litellm post #1887
Implementing the left issue requires coordinated billing-model changes across cost calculation, reservation consistency, cached-token handling, and regression coverage; the right issue is comparatively localized request-path correction.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search