litellm/tests/unit/llms/dashscope
Yujong Lee 524ef7cf37
Some checks failed
Cost map pins recheck / rerun-cost-map-guard (push) Has been cancelled
fix(cost): keep main's billing for tiered and malformed rows
The first cut of the native pricing path changed the bill for a few row shapes no catalog row has. Each one now has a test that failed first and passes on main

billed_prices returns BilledPrices, Flat or Tiered. A row whose token tiers price input bills an empty prompt from its flat prices, since main picks no tier for it, so a tier-only row bills it nothing. A tier's missing cache and reasoning rates are that tier's input and output rate, filled before any off-peak swap, which also stops a Fireworks row with tiers from reading its cache at half price. A token tier starts where the one before it ends, so a ladder written with a one token gap bills the next tier from its first token. Result tiers are left to the search calculator. A modality input token price that does not parse is 0 again

The off-peak reader reports a malformed window or weekday and keeps the well-formed ones, where it used to drop the whole block

A batch or decisions call, or one with custom pricing, gets a quote with no rates instead of online rates, and the speed and geo uplifts apply when the row carries them

NativeTokenUsage names its quantities input_*, cached_*, cache_write_* and output_*, and billed_cache_read_rate is the one place that picks the explicit or implicit cache-read rate
2026-11-19 06:05:22 +00:00
..
__init__.py
test_dashscope_chat_transformation.py
test_dashscope_common_utils.py
test_dashscope_cost_calculator.py fix(cost): keep main's billing for tiered and malformed rows 2026-11-19 06:05:22 +00:00
test_dashscope_embedding_transformation.py refactor(typing): clear about 1,100 basedpyright Any errors across 303 files (#49986) 2026-11-06 13:31:15 -08:00
test_dashscope_image_edit_transformation.py
test_dashscope_messages_transformation.py
test_dashscope_rerank_transformation.py
test_dashscope_text_to_speech_transformation.py
test_dashscope_video_transformation.py feat(videos): add first-class OpenRouter video request fields (#50319) 2026-11-06 16:50:48 -08:00
test_qwen_brand_aliases.py