Skip to content

fix(openai): remove misleading default model for Azure LLM#6459

Open
Utkarshsteve wants to merge 1 commit into
livekit:mainfrom
Utkarshsteve:fix/azure-remove-default-model
Open

fix(openai): remove misleading default model for Azure LLM#6459
Utkarshsteve wants to merge 1 commit into
livekit:mainfrom
Utkarshsteve:fix/azure-remove-default-model

Conversation

@Utkarshsteve

Copy link
Copy Markdown

What

Removes the confusing model="gpt-4o" default from LLM.with_azure(). Azure OpenAI uses azure_deployment to select models — the model parameter is ignored by the Azure API. The old default caused .model to return "gpt-4o" regardless of the actual deployment in use.

Changes

  • with_azure(model=...) now defaults to None instead of "gpt-4o"
  • When model is not provided, .model falls back to azure_deployment, giving callers an accurate identifier
  • Explicit model= still works as an override

Migration

  • Users who relied on .model returning "gpt-4o" should pass model="gpt-4o" explicitly (though this was already misleading)
  • Users who didn't pass model= now get their azure_deployment name from .model, which is the correct behavior

Closes #6209

The `with_azure` factory set `model="gpt-4o"` by default, but Azure
OpenAI uses `azure_deployment` to select models — the `model` parameter
is not used by the API. This caused the `.model` property to return
"gpt-4o" regardless of the actual deployment.

Change `model` to default to `None` and fall back to `azure_deployment`
so that `.model` reflects the real deployment name.

Closes livekit#6209
@Utkarshsteve
Utkarshsteve requested a review from a team as a code owner July 17, 2026 04:07
@CLAassistant

CLAassistant commented Jul 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove default for "model" parameter of Azure OpenAI LLM

2 participants