litellm/tests/logging_callback_tests
jaideeppyne ab78459097 fix(cohere): handle multimodal inputs in token counting and guardrails
Response transformation crashed with TypeError when counting tokens for
multimodal (dict-shaped) embedding inputs, since encoding.encode() was
called directly on the dict instead of its text parts. Also removed a
dead, equally-buggy duplicate of the same loop in _transform_response.

Separately, the embeddings guardrail handler silently skipped multimodal
dict inputs instead of scanning them, letting prohibited text/image
content bypass the configured guardrail. It now extracts and scans the
text parts while leaving image parts untouched.
2026-08-13 09:01:47 +05:30
..
gcs_pub_sub_body fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
langfuse_expected_request_body fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
base_test.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
conftest.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
create_mock_standard_logging_payload.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
gettysburg.wav fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
log.txt fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_alerting.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_amazing_s3_logs.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_assemble_streaming_responses.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_bedrock_knowledgebase_hook.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_built_in_tools_cost_tracking.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_custom_callback_router.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_datadog.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_datadog_llm_obs.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_dynamic_otel_keys.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_gcs_pub_sub.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_generic_api_callback.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_humanloop_unit_tests.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_langfuse_dynamic_credentials.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_langfuse_e2e_test.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_langfuse_unit_tests.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_langsmith_dynamic_credentials.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_langsmith_unit_test.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_log_db_redis_services.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_logging_redaction_e2e_test.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_moderations_api_logging.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_opentelemetry_unit_tests.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_otel_logging.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_pagerduty_alerting.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_posthog.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_spend_logs.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_sqs_logger.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_standard_logging_payload.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_standard_logging_payload_excluded_fields.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_token_counting.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_unit_test_litellm_logging.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_unit_tests_init_callbacks.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_view_request_resp_logs.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30