mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
Set cached tokenizer config directly and mock both sync and async tokenizer functions to avoid race conditions when running with parallel test execution (-n 16). The issue was that parallel tests could populate the litellm.known_tokenizer_config cache between clearing it and when the code checked it. This caused the sync code path to be used instead of the async path, bypassing the mocked async functions. Fix: 1. Set cache directly instead of clearing it 2. Also mock sync versions _get_tokenizer_config and _get_chat_template_file This ensures the test is deterministic regardless of test execution order. |
||
|---|---|---|
| .. | ||
| audio_transcription | ||
| __init__.py | ||
| test_watsonx.py | ||
| test_watsonx_common_utils.py | ||