mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-29 01:03:17 +00:00
The pricing core gains a handler per kind: rerank (search units at the query rate, total tokens for the Jina AI, Scaleway and Voyage configs), vector store search (one query on the row the store's config names) and OCR (credits, pages and annotation pages, online and batch, with the deployment's tables read ahead of the catalog row). calculate now bills the output and feature meters the core declared but ignored: returned images by size, generated seconds by resolution, video seconds, videos, billable units, input seconds and input pixels. Python keeps rerank_cost, vector_store_search_cost, ocr_cost and ocr_batch_cost as thin adapters over NativeModelCostMap.price_units and maps an unpriced call to the legacy 0.0 or ValueError. The rerank and vector store configs' calculate_*_cost methods are deleted. Parity fixtures were captured once from main's Python. |
||
|---|---|---|
| .. | ||
| embedding | ||
| rerank | ||
| __init__.py | ||
| test_common_utils.py | ||
| test_voyage_contextual_embedding.py | ||
| test_voyage_multimodal_embedding.py | ||