Skip to content
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(AzureOpenAI): o1 model, stream parameter check #4381

Merged

Conversation

ABHIJITH-EA
Copy link
Contributor

Summary

This PR fixes an issue where the modelOptions.model param for o1 models using Azure OpenAI client was being deleted before the stream compatibility check. As a result, the stream parameter was not properly validated for these models, leading to errors. The fix ensures that the model check for o1 models of azure clients is checked before deletion to resolve the unsupported parameter issue.

Closes #4379

Change Type

Please delete any irrelevant options.

  • Bug fix (non-breaking change which fixes an issue)

Testing

Performed docker build with this change and tested it manually to ensure the o1 models using Azure OpenAI clients now pass validation properly.

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code

@ABHIJITH-EA ABHIJITH-EA marked this pull request as draft October 10, 2024 13:13
@ABHIJITH-EA ABHIJITH-EA marked this pull request as ready for review October 10, 2024 13:13
@danny-avila danny-avila changed the title 🔨 fix(AzureOpenAIClient): Ensure o1 model check works for Azure model… 🔨 fix(AzureOpenAI): o1 model, stream parameter check Oct 10, 2024
@danny-avila danny-avila merged commit 2846779 into danny-avila:main Oct 10, 2024
1 check passed
@danny-avila
Copy link
Owner

lgtm, ty

owengo pushed a commit to openwengo/LibreChat that referenced this pull request Oct 14, 2024
BertKiv pushed a commit to BertKiv/LibreChat that referenced this pull request Dec 10, 2024
@weipienlee
Copy link

it seems not to be fixed for me, i'm on 0.7.6. I did "docker compose up --build", though:

LibreChat         | 2025-01-15 16:10:36 warn: [OpenAIClient.chatCompletion][stream] API error 
LibreChat         | 2025-01-15 16:10:36 error: [handleAbortError] AI response error; aborting request: 400 Unsupported value: 'stream' does not support true with this model. Supported values are: false.

other models than o1xxx do work. what can i check to be sure it is not something else?

@danny-avila
Copy link
Owner

@weipienlee please see the update guide:

https://www.librechat.ai/docs/local/docker#update-librechat

Besides this, I would need more info, what exactly is the model value for you? Using official API?

No issues with o1-preview or o1-mini

chrome_SG8Jhb4RLs

@weipienlee
Copy link

This was my problem. The "api" in docker-compose uses a "latest" image from the repo, that explains why local (clone) front-end edits do not take effect. The label "latest" has no awareness of "versions" so a "docker compose pull" is required for image updates after git pull. The latter might also explain other issues i had with librechat in the past😅
Thanks for you responses anyway @danny-avila!

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.

[Bug]: Unsupported Parameter stream with o1 Models in Azure OpenAI Integration
3 participants