-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: support azure o3 model family for fake streaming workaround #8162
fix: support azure o3 model family for fake streaming workaround #8162
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
litellm/utils.py
Outdated
@@ -5997,7 +5997,7 @@ def get_provider_chat_config( # noqa: PLR0915 | |||
): | |||
return litellm.AI21ChatConfig() | |||
elif litellm.LlmProviders.AZURE == provider: | |||
if litellm.AzureOpenAIO1Config().is_o1_model(model=model): | |||
if litellm.AzureOpenAIO1Config().is_reasoning_model(model=model): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given the refactor will probably be to the o-series
can we rename the helper util something like - is_o_series_model
?
it would just be clearer what it's really trying to do
testing here @byrongrogan
the basellmchattest goes through a series of common scenarios for the model it's fine - i can take care of this part, since this will probably require us to have an o3 deployment on azure |
b553028
into
BerriAI:litellm_dev_02_01_2025_p1
* fix: support azure o3 model family for fake streaming workaround (#8162) * fix: support azure o3 model family for fake streaming workaround * refactor: rename helper to is_o_series_model for clarity * update function calling parameters for o3 models (#8178) * refactor(o1_transformation.py): refactor o1 config to be o series config, expand o series model check to o3 ensures max_tokens is correctly translated for o3 * feat(openai/): refactor o1 files to be 'o_series' files expands naming to cover o3 * fix(azure/chat/o1_handler.py): azure openai is an instance of openai - was causing resets * test(test_azure_o_series.py): assert stream faked for azure o3 mini Resolves #8162 * fix(o1_transformation.py): fix o1 transformation logic to handle explicit o1_series routing * docs(azure.md): update doc with `o_series/` model name --------- Co-authored-by: byrongrogan <47910641+byrongrogan@users.noreply.github.com> Co-authored-by: Low Jian Sheng <15527690+lowjiansheng@users.noreply.github.com>
Support o3 model family for fake streaming workaround from Azure
o3-mini
is already available on Azure, but sadly it looks like it doesn't support streaming, just like theo1
models.So this PR updates the logic for the fake streaming workaround to also support the
o3
family. Note that there's a wider refactor to generalize the name ofAzureOpenAIO1Config
that I'm not making here.Relevant issues
Fixes #8158
Type
🐛 Bug Fix
Changes
o3*
to the list of models for the Azure fake streaming workaround[REQUIRED] Testing - Attach a screenshot of any new tests passing locally
I didn't see any obvious tests in this area, so manually tested the fake streaming is now working with
o3-mini
,o1-mini
, as well as non-streaming ono3-mini
. Also validated that real streaming is still working withgpt-4o
.