Use CI_CD_DEFAULT_AZURE_MODEL env var in live azure CI tests

Replace the hardcoded azure/gpt-4.1-mini deployment name at the two live
azure call sites in test_custom_logger.py with the CI_CD_DEFAULT_AZURE_MODEL
env var, so the deployment can be updated from CircleCI project settings
instead of editing code. The mocked call and all router config fixtures are
left unchanged.
This commit is contained in:
ryan-crabbe-berri 2026-06-02 17:14:08 -07:00
parent f047b1571e
commit 33f80f3f77

View file

@ -213,7 +213,9 @@ def test_async_custom_handler_stream():
async def test_1():
nonlocal complete_streaming_response
response = await litellm.acompletion(
model="azure/gpt-4.1-mini", messages=messages, stream=True
model=f"azure/{os.environ.get('CI_CD_DEFAULT_AZURE_MODEL', 'gpt-4.1-mini')}",
messages=messages,
stream=True,
)
async for chunk in response:
complete_streaming_response += (
@ -257,7 +259,9 @@ def test_azure_completion_stream():
complete_streaming_response = ""
response = litellm.completion(
model="azure/gpt-4.1-mini", messages=messages, stream=True
model=f"azure/{os.environ.get('CI_CD_DEFAULT_AZURE_MODEL', 'gpt-4.1-mini')}",
messages=messages,
stream=True,
)
for chunk in response:
complete_streaming_response += chunk["choices"][0]["delta"]["content"] or ""