litellm/tests/documentation_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
..
test_api_docs.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_circular_imports.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_env_keys.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_exception_types.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_general_setting_keys.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_optional_params.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_readme_providers.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_requests_lib_usage.py fix(cohere): handle multimodal inputs in token counting and guardrails 2026-08-13 09:01:47 +05:30
test_router_settings.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