mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-05 08:07:05 +00:00
Bedrock multimodal embedding models (Titan and Nova) were being costed using the per-token text rate instead of the correct flat per-image rate ($0.00006/image). The pricing data was correct but never applied because image_count was never populated in prompt_tokens_details. Pass batch_data to Titan/Nova response transformers so they can count image inputs and set PromptTokensDetailsWrapper(image_count=N) on Usage, mirroring the existing Vertex AI pattern from PR #9623. Also fix the text_tokens fallback in generic_cost_per_token to not override text_tokens=0 when image_count > 0 (image-only requests). |
||
|---|---|---|
| .. | ||
| chat | ||
| count_tokens | ||
| embed | ||
| files | ||
| image | ||
| invoke_agent | ||
| messages/invoke_transformations | ||
| passthrough | ||
| realtime | ||
| rerank | ||
| vector_stores | ||
| test_anthropic_beta_support.py | ||
| test_base_aws_llm.py | ||
| test_bedrock_common_utils.py | ||
| test_bedrock_ssl_verify.py | ||
| test_cross_region_inference_profile_mapping.py | ||