litellm/tests/unit/llms/dashscope
Kerry Lu 00dcb76835
refactor(cost): consolidate pricing modules (#56131)
* refactor(cost): split chat, image, and video calculators

* refactor(cost): preserve helper exports without redundant aliases

* refactor(cost): consolidate pricing by operation

* fix(cost): keep normalized usage as a mapping

* style(cost): sort image pricing imports

* refactor(cost): restore the original token pricing flow

* docs(cost): point contributors to token pricing dispatch

* fix(cost): clear the recursion flag and the banned import count

The refusal helper imported the provider check under its own name, which the recursion detector read as a self call. The realtime split helper now lives next to the realtime processor, and the decisions rate merge goes through one shared helper, so the cost package adds no new typing.cast imports.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(bedrock): call cost_per_token through the litellm package

litellm.cost.calculator is not loaded by importing litellm, so the two cache billing tests failed with an AttributeError before reaching the cost check.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-12-04 23:14:04 +00:00
..
__init__.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_dashscope_chat_transformation.py feat(dashscope)!: derive protocol bases from one domain (#47812) 2026-10-29 09:08:18 -07:00
test_dashscope_common_utils.py feat(dashscope)!: derive protocol bases from one domain (#47812) 2026-10-29 09:08:18 -07: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 refactor(cost): consolidate pricing modules (#56131) 2026-12-04 23:14:04 +00:00
test_dashscope_messages_transformation.py feat(dashscope)!: derive protocol bases from one domain (#47812) 2026-10-29 09:08:18 -07:00
test_dashscope_rerank_transformation.py fix(dashscope): bill rerank by reported token usage (#54801) 2026-11-28 13:56:50 -08:00
test_dashscope_text_to_speech_transformation.py feat(dashscope): add image edits and text-to-speech (#48998) 2026-10-29 17:48:38 -07:00
test_dashscope_video_transformation.py refactor(cost): consolidate pricing modules (#56131) 2026-12-04 23:14:04 +00:00
test_qwen_brand_aliases.py refactor(cost): consolidate pricing modules (#56131) 2026-12-04 23:14:04 +00:00