cai/tests/util
quevedoSteven 4546033b8e feat: round-robin NVIDIA NIM API key rotation
Adds cai.util.nim_rotation which cycles NVIDIA_NIM_API_KEY_1..N per
request, keeping under NIM per-key rate limits (~40 req/min). Rotation
applies in the OpenAI-compatible LLM path and the direct httpx
completion path when the API base is a NIM endpoint (api.nvidia.com).

Also defaults cache_write_tokens to 0 in the streamed usage object:
litellm CustomResponseUsage now requires the field while NIM usage
payloads omit it, which previously aborted streaming at end of response.
2026-07-31 15:51:30 +00:00
..
test_cyber_prompt_layering.py CAI 1.1.5 release (#455) 2026-06-05 13:43:19 +02:00
test_gateway_rate_limiter.py CAI 1.1.5 release (#455) 2026-06-05 13:43:19 +02:00
test_nim_rotation.py feat: round-robin NVIDIA NIM API key rotation 2026-07-31 15:51:30 +00:00
test_session_compact.py CAI 1.1.5 release (#455) 2026-06-05 13:43:19 +02:00
test_wait_hints_compact.py CAI 1.1.5 release (#455) 2026-06-05 13:43:19 +02:00
test_worker_silence.py CAI 1.1.5 release (#455) 2026-06-05 13:43:19 +02:00