feat: add Ollama API endpoints /api/version, /api/tags, /api/show for Copilot integration#446
feat: add Ollama API endpoints /api/version, /api/tags, /api/show for Copilot integration#446CJackHwang merged 4 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: d0d61a5d77
ℹ️ 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".
| ModifiedAt string `json:"modified_at"` | ||
| } | ||
| type OllamaCapabilitiesModelInfo struct { | ||
| ID string |
There was a problem hiding this comment.
Add a JSON tag for the Ollama model ID field
/api/show marshals OllamaCapabilitiesModelInfo directly, but ID has no JSON tag, so the response key is emitted as "ID" instead of a lowercase/snake_case API key. Clients that deserialize the show payload using Ollama-style field names (or strict schemas) will not see this identifier field, which can break model metadata parsing even though the endpoint returns 200.
Useful? React with 👍 / 👎.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Thank you for your pull request! If it gets past Lint and Refactor Gate, I'll merge it first. |
|
Fine, Iet me handle it. |
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