litellm/tests/unit/llms/hosted_vllm
Mateo Wang 0d91e86061
fix(hosted_vllm): calculate rerank query and token costs (#55433)
* fix(hosted_vllm): calculate rerank query and token costs

* refactor(cost): read rerank prices through the cached lookup with unset rates kept for every provider

* fix(hosted_vllm): fall back to the rerank query price when the token price is 0

Every per-query rerank row in the cost map sets input_cost_per_token to 0.0, so a
deployment copying that shape billed $0 instead of its query price

* test(hosted_vllm): pin a zero cost when a token-priced rerank response has no token count

* fix(hosted_vllm): bill the rerank query price when the server sends no token count

* test(hosted_vllm): type the usage parameter in the no-token-count rerank test

---------

Co-authored-by: TrungSherlock <trungnguyenquochn2202@gmail.com>
Co-authored-by: Trungsherlock <51025542+Trungsherlock@users.noreply.github.com>
2026-12-01 19:07:33 +00:00
..
chat fix(hosted_vllm): keep vLLM's prompt_token_ids on the first streamed chat chunk (#51087) 2026-11-25 19:54:45 -08:00
embedding test: migrate tests/llm_translation into unit, integration and e2e tiers (#45759) 2026-10-11 07:58:53 +00:00
image_edit fix(images): send image_edit markup as a multipart file part (#53815) 2026-11-25 04:14:57 +00:00
responses fix(llms): send later system messages as user turns for models declared system-first (#54347) 2026-11-25 11:48:27 +00:00
videos
__init__.py
test_hosted_vllm_rerank_transformation.py fix(hosted_vllm): calculate rerank query and token costs (#55433) 2026-12-01 19:07:33 +00:00