fix(openai): remove misleading default model for Azure LLM#6459
Open
Utkarshsteve wants to merge 1 commit into
Open
fix(openai): remove misleading default model for Azure LLM#6459Utkarshsteve wants to merge 1 commit into
Utkarshsteve wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Removes the confusing
model="gpt-4o"default fromLLM.with_azure(). Azure OpenAI usesazure_deploymentto select models — themodelparameter is ignored by the Azure API. The old default caused.modelto return"gpt-4o"regardless of the actual deployment in use.Changes
with_azure(model=...)now defaults toNoneinstead of"gpt-4o"modelis not provided,.modelfalls back toazure_deployment, giving callers an accurate identifiermodel=still works as an overrideMigration
.modelreturning"gpt-4o"should passmodel="gpt-4o"explicitly (though this was already misleading)model=now get theirazure_deploymentname from.model, which is the correct behaviorCloses #6209