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

[Bug]: regex for list of models in api/server/services/ModelService does not include OPENAI o1 models #4339

Closed
1 task done
juwalter opened this issue Oct 4, 2024 · 1 comment · Fixed by #4340
Closed
1 task done
Labels
bug Something isn't working

Comments

@juwalter
Copy link
Contributor

juwalter commented Oct 4, 2024

What happened?

After noticing PR #4019 I found it is currently necessary to specify o1-... models manually in .env (OPENAI_MODELS=gpt-4o,o1-preview-2024-09-12,o1-preview,...), even though those are recognized and registered in https://github.com/danny-avila/LibreChat/blob/main/api/models/tx.js#L42 and https://github.com/danny-avila/LibreChat/blob/main/packages/data-provider/src/config.ts#L12

The issue appears to be that in https://github.com/danny-avila/LibreChat/blob/main/api/server/services/ModelService.js#L159 the regex filters out models with name starting o1... and hence they are not by default included in the browser UI drop-down.

After changing the regex from const regex = /(text-davinci-003|gpt-)/; to const regex = /(text-davinci-003|gpt-|o1-)/; retrieval from API works and o1... models are shown in the drop-down for OpenAI.

Steps to Reproduce

see above in "what happened"

What browsers are you seeing the problem on?

No response

Relevant log output

No response

Screenshots

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@juwalter
Copy link
Contributor Author

juwalter commented Oct 8, 2024

thank you @danny-avila

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant