mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
test(proxy): give the x-litellm-model fallback test deterministic openai env creds
This commit is contained in:
parent
4a7dfd75fc
commit
73ae9c65dd
1 changed files with 3 additions and 1 deletions
|
|
@ -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={})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue