[PR #14966] api: add capabilities field to /api/tags response #40816

Open
opened 2026-04-23 01:37:40 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14966
Author: @serbangeorge-m
Created: 3/19/2026
Status: 🔄 Open

Base: mainHead: GH-14964


📝 Commits (2)

  • 09a8fde api: add capabilities field to /api/tags response
  • ee8eef4 api: refactoring

📊 Changes

5 files changed (+110 additions, -12 deletions)

View changed files

📝 api/types.go (+9 -8)
📝 docs/api.md (+4 -2)
📝 docs/openapi.yaml (+10 -0)
📝 server/routes.go (+26 -2)
📝 server/routes_list_test.go (+61 -0)

📄 Description

  • Adds capabilities field to each model in the /api/tags response, matching what /api/show already returns

  • Clients no longer need N+1 /api/show calls to filter models by capability (e.g. chat vs embedding)

  • Adds test coverage for capabilities in list responses

  • Existing TestList passes and now also asserts capabilities

  • New TestListCapabilities verifies completion vs embedding models return correct capabilities

  • Middleware TestListMiddleware passes (backwards compatible via omitempty)

Fixes #14964


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/14966 **Author:** [@serbangeorge-m](https://github.com/serbangeorge-m) **Created:** 3/19/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `GH-14964` --- ### 📝 Commits (2) - [`09a8fde`](https://github.com/ollama/ollama/commit/09a8fde65632a56f7c02c56a566f7640ca16c04d) api: add capabilities field to /api/tags response - [`ee8eef4`](https://github.com/ollama/ollama/commit/ee8eef471f7c80c5eb3cc7e16713cb58d078584e) api: refactoring ### 📊 Changes **5 files changed** (+110 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+9 -8) 📝 `docs/api.md` (+4 -2) 📝 `docs/openapi.yaml` (+10 -0) 📝 `server/routes.go` (+26 -2) 📝 `server/routes_list_test.go` (+61 -0) </details> ### 📄 Description - Adds `capabilities` field to each model in the `/api/tags` response, matching what `/api/show` already returns - Clients no longer need N+1 `/api/show` calls to filter models by capability (e.g. chat vs embedding) - Adds test coverage for capabilities in list responses - [x] Existing `TestList` passes and now also asserts capabilities - [x] New `TestListCapabilities` verifies completion vs embedding models return correct capabilities - [x] Middleware `TestListMiddleware` passes (backwards compatible via `omitempty`) Fixes #14964 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 01:37:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#40816