Files
litellm/tests/test_litellm/llms/bedrock/embed
michelligabrieleandGitHub a395a25705 fix(cost-calc): use per-image pricing for Bedrock multimodal embeddings (#21646)
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).
2026-02-20 08:51:21 -08:00
..