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

[Feature]: Avoid actual chat request in model provider availability check. #598

Open
oasisfeng opened this issue Dec 31, 2024 · 3 comments
Assignees

Comments

@oasisfeng
Copy link

Is your feature request related to a problem?

Please don't use an actual chat completion request as the implementation method of model provider availability check. It's costly for advanced models (e.g. OpenAI o1).

The current implementation also sends chat completion request for all the models in the specified provider. This is very slow and costly if many models are enabled for that provider.

Describe the solution you'd like

Consider using just "/v1/models" to the check the availability (of base URL and API key), as it is free of charge.

Describe alternatives you've considered

No response

Additional Context

No response

@kangfenmao
Copy link
Collaborator

Not all service providers offer the /v1/models interface

@kangfenmao
Copy link
Collaborator

What are some other good suggestions?

@oasisfeng
Copy link
Author

Probably try "/models" first, if absent, fallback to "/completion"?

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

No branches or pull requests

2 participants