litellm/tests/test_litellm/proxy/anthropic_endpoints
mateo-berri 803113c63a fix(proxy): estimate failed-request input tokens on /v1/messages and count system prompts
The Anthropic messages endpoint's exception handler passed the raw
request body dict to the failure hook, but request setup had already
replaced the processor's dict with one carrying the logging object, so
failure rows for /v1/messages never lifted recovered or estimated usage.
Pass the processor's dict instead.

The input-side estimate only counted the messages list, missing the
Anthropic top-level system prompt (string or text-block list) and the
Responses API instructions field, which live in optional_params. Count
them too.
2026-08-18 14:21:47 -07:00
..
__init__.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
test_claude_code_marketplace.py fix(types): correct annotations that were false about their runtime values 2026-08-06 04:37:48 +00:00
test_endpoints.py fix(proxy): estimate failed-request input tokens on /v1/messages and count system prompts 2026-08-18 14:21:47 -07:00