The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test(proxy): give the x-litellm-model fallback test deterministic openai env creds
mateo-berri73ae9c65dda8
diff --git a/tests/test_litellm/proxy/test_batch_x_litellm_model_encoding.py b/tests/test_litellm/proxy/test_batch_x_litellm_model_encoding.pyindex 101dc48603a..3d1831bb4cd 100644--- a/tests/test_litellm/proxy/test_batch_x_litellm_model_encoding.py+++ b/tests/test_litellm/proxy/test_batch_x_litellm_model_encoding.py@@ -287,13 +287,15 @@ async def test_create_batch_with_x_litellm_model_encodes_output_and_error_file_i@pytest.mark.asyncio-async def test_create_batch_without_x_litellm_model_returns_raw_ids():+async def test_create_batch_without_x_litellm_model_returns_raw_ids(monkeypatch):"""Without x-litellm-model header, create_batch should NOT encode batch IDs(falls through to Scenario 3 / custom_llm_provider fallback)."""from litellm.proxy.batches_endpoints.endpoints import create_batch+ monkeypatch.setenv("OPENAI_API_KEY", "sk-env-openai")+raw_batch_id = "batch_abc123"mock_response = _make_batch_response(batch_id=raw_batch_id)mock_request = _make_mock_request(headers={})