-
Notifications
You must be signed in to change notification settings - Fork 190
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
Determine which models exist with API calls rather than hard coding them. #567
Comments
;; Add model to backend:
(push 'gemini-2.0-flash-thinking-exp (gptel-backend-models gptel-backend))
;; Add model metadata (OPTIONAL)
(put 'gemini-2.0-flash-thinking-exp :description "Gemini model that produces...")
(put 'gemini-2.0-flash-thinking-exp :context-window 32) where (Finding available models automatically is more of a requirement for Ollama, where there is no standard list of models that gptel can track.) |
Fine, then when the user requests. It seems unreasonable to be writing these things by hand; it means that as new models are deployed you can't automatically keep up. |
How about a compromise: enumerate the list of available models from the API, and then add the hard-coded extra information for known ones, and list the rest with just the name? The API is quite disappointing in not providing almost any information other than the model name. Let's hope they improve it. It is useful to see the pricing information listed, but it could be very much out-of-date if the user has not updated in a while, and OpenAI jacks up the price? It is not clear from end user perspective that this information is hard-coded. |
How about a compromise: enumerate the list of available models from the API, and then add the hard-coded extra information for known ones, and list the rest with just the name? The API is quite disappointing in not providing almost any information other than the model name. Let's hope they improve it.
"from the API" is misleading. gptel supports at least fifteen different APIs. Many of these are variants of the OpenAI API, but the OpenAI API is itself not a standard. So they each have twists of their own that make it harder to cover fully. The endpoint for fetching the list of models and the corresponding response format is one such difference.
That said, this is indeed the plan, at least for the major four APIs. That's why this issue remains open. There is currently a working implementation of this feature for the Ollama API in the feature-ollama-auto-update branch.
It is useful to see the pricing information listed, but it could be very much out-of-date if the user has not updated in a while, and OpenAI jacks up the price? It is not clear from end user perspective that this information is hard-coded.
Well, none of the APIs provide pricing information via an API call. So gptel can either hard-code it or not show it at all.
|
OpenAI at least seems to have an API call to determine what models are available. Rather than hard-coding the available models, the code should learn what they are at start time.
The text was updated successfully, but these errors were encountered: