-
Notifications
You must be signed in to change notification settings - Fork 12.7k
server : implement /api/version endpoint for ollama compatibility (#15167 ) #15177
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
base: master
Are you sure you want to change the base?
server : implement /api/version endpoint for ollama compatibility (#15167 ) #15177
Conversation
Drive-by comment, not an approver. Maybe we should return the actual llama.cpp version on this endpoint, and have a generic LLAMA_API_VERSION_OVERRIDE env var for cases where it's necessary to return specific values? |
I think so too. |
In the example, I'd return |
If it's purely for compatibility, why don't we hard-code the version number to something like Tbh I don't feel confident spending a lot of code just to match a short-lived integration. VSCode will eventually has OAI-compat support, the ollama-compat is currently a short-term solution. |
What's the use case? Does nay downstream app check for this version? And even if it checks, does an incorrect version number blocks you from doing certain things? |
That's exactly right, if the endpoint isn't there the vs code copilot chat extension can't get the model list due to a certain commit (linked in the issue #15167 ). It's connected to this PR #12896. But just returning llama cpp build version works as I commented above. It treats it as 6121.0.0 which won't ever be surpassed I think |
ggml presents it's version as |
Llama build version as in |
This PR implements a minimal /api/version endpoint to make llama.cpp compatible with tools expecting the Ollama API, such as the copilot chat VS Code extension.
Fixes #15167