mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-30 01:08:33 +00:00
* fix(bedrock): log a provider 4xx on the count-tokens pass-through as a warning * fix(bedrock): keep count-tokens 401/403/404 at ERROR and send caller-error warnings to stdout Only a Bedrock 400 or 429 on the count-tokens pass-through is a caller error. A 401, 403 or 404 points at the deployment's own credentials, permissions or model id, so it stays at ERROR with 5xx and proxy-side failures. Caller-error warnings log through the stdout child logger, so collectors that take severity from the stream no longer flag them as errors. * fix(bedrock): keep count-tokens 400s for an invalid model id at ERROR Bedrock answers a wrong deployment model id with a 400, "The provided model identifier is invalid.", which is an operator fault. Keep that 400 at ERROR on stderr while other 400s and 429s stay stdout warnings, and drop the logger comment that repeated the handler docstring. * fix(bedrock): log only caller refusals as stdout warnings on every Bedrock count route * fix(bedrock): keep count refusal logger names and mark caller errors for stdout Caller-refused Bedrock counts kept their stdout routing but moved to the "LiteLLM Proxy.stdout" logger, which changed the JSON component field and let SDK users' "LiteLLM" logger level stop filtering the counter warning. Both call sites now log through their original loggers and set a record marker that LevelRoutingStreamHandler reads to pick stdout. --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| llm_provider_handlers | ||
| __init__.py | ||
| test_carry_guardrail_logging_info.py | ||
| test_codex_passthrough_endpoints.py | ||
| test_cursor_cli_passthrough_endpoints.py | ||
| test_deepgram_ws_passthrough_routes.py | ||
| test_injected_stream_usage.py | ||
| test_llm_pass_through_endpoints.py | ||
| test_llm_passthrough_endpoints.py | ||
| test_managed_id_rewriter.py | ||
| test_method_specific_routing.py | ||
| test_pass_through_endpoints.py | ||
| test_passthrough_auth_default.py | ||
| test_passthrough_endpoint_router.py | ||
| test_passthrough_endpoints_common_utils.py | ||
| test_passthrough_guardrail_block_otel_span.py | ||
| test_passthrough_guardrails.py | ||
| test_passthrough_guardrails_field_targeting.py | ||
| test_passthrough_post_call_guardrails.py | ||
| test_streaming_handler.py | ||
| test_streaming_handler_interrupt.py | ||
| test_success_handler.py | ||
| test_upstream_usage_headers.py | ||
| test_vector_store_fallbacks.py | ||
| test_vertex_ai_batch_passthrough.py | ||
| test_vertex_ai_live_passthrough.py | ||
| test_vertex_passthrough_load_balancing.py | ||
| test_watsonx_proxy_route.py | ||