feat: add Ollama API endpoints /api/version, /api/tags, /api/show for Copilot integration#442
feat: add Ollama API endpoints /api/version, /api/tags, /api/show for Copilot integration#442dinhnn wants to merge 2 commits intoCJackHwang:devfrom
Conversation
Merge pull request CJackHwang#433 from CJackHwang/codex/flash-searchpro-search Remove heuristic model name resolution and require explicit aliases or canonical IDs
|
Someone is attempting to deploy a commit to the cjack's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a68a79e087
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| canonical, ok := ResolveModel(store, id) | ||
| if !ok { |
There was a problem hiding this comment.
Normalize
models/-prefixed IDs before resolving
/api/show forwards payload.model directly into ResolveModel, which only accepts canonical model names or configured aliases. Inputs like "models/deepseek-v4-pro" therefore resolve to not found and return 404, even though they refer to supported models (this exact form is exercised in the added route tests). Any Copilot/Ollama client that sends prefixed model IDs will fail model capability discovery.
Useful? React with 👍 / 👎.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary
This MR adds support for three essential Ollama API endpoints to enable seamless integration with Copilot:
/api/version/api/tags/api/showChanges
GET /api/versionto retrieve Ollama version infoGET /api/tagsto list available modelsPOST /api/showto display model capabilitiesWhy
These endpoints are required for Copilot to:
Testing
API Examples