[PR #5028] [MERGED] OpenAI: /v1/models/{model} compatibility #11646

Closed
opened 2026-04-12 23:34:33 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/5028
Author: @royjhan
Created: 6/13/2024
Status: Merged
Merged: 7/2/2024
Merged by: @royjhan

Base: royh-openaiHead: royh-retrieve


📝 Commits (10+)

📊 Changes

5 files changed (+121 additions, -6 deletions)

View changed files

📝 api/types.go (+7 -0)
📝 openai/openai.go (+65 -3)
📝 openai/openai_test.go (+28 -1)
📝 server/routes.go (+2 -1)
📝 server/routes_test.go (+19 -1)

📄 Description

Adds compatibility for /v1/models/{model}

E.g
curl http://localhost:11434/v1/models/llama3

{
    "id": "llama3",
    "object": "model",
    "created": 1718141294,
    "owned_by": "library"
}

🔄 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/5028 **Author:** [@royjhan](https://github.com/royjhan) **Created:** 6/13/2024 **Status:** ✅ Merged **Merged:** 7/2/2024 **Merged by:** [@royjhan](https://github.com/royjhan) **Base:** `royh-openai` ← **Head:** `royh-retrieve` --- ### 📝 Commits (10+) - [`eccd191`](https://github.com/ollama/ollama/commit/eccd1918d3968e94c4957b69189a5745b1348f02) Retrieve Model - [`c7ec861`](https://github.com/ollama/ollama/commit/c7ec8614930819bbe535397187d9932df2414470) OpenAI Delete Model - [`81791a0`](https://github.com/ollama/ollama/commit/81791a0efdfd6c6ecb8a9eec7e14170fb86ece99) Retrieve Middleware - [`8fd3e47`](https://github.com/ollama/ollama/commit/8fd3e47ac2179019fce489668b2c27de73aaeb57) Remove Delete from Branch - [`7ccbfa4`](https://github.com/ollama/ollama/commit/7ccbfa4703cfc240d6bbdaad7c2dfeebba5402c4) Merge branch 'royh-openai' into royh-retrieve - [`48135e7`](https://github.com/ollama/ollama/commit/48135e7b188b30e3987fdaed30f4b810da20fa46) Update Test - [`ab8db6e`](https://github.com/ollama/ollama/commit/ab8db6ec5653e5b4ccfe930a52870859ce8c9fb5) Middleware Test File - [`1c6813d`](https://github.com/ollama/ollama/commit/1c6813d2e10dc84c63b8fc188b4e6bfe5d153aaf) Function name - [`1ef5455`](https://github.com/ollama/ollama/commit/1ef54553333592376cf14a5b2ec87a630a718b02) Merge branch 'royh-openai' into royh-retrieve - [`9f28756`](https://github.com/ollama/ollama/commit/9f287562698de847b9a80a21139d8bb63ef7fd27) Merge branch 'royh-openai' into royh-retrieve ### 📊 Changes **5 files changed** (+121 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+7 -0) 📝 `openai/openai.go` (+65 -3) 📝 `openai/openai_test.go` (+28 -1) 📝 `server/routes.go` (+2 -1) 📝 `server/routes_test.go` (+19 -1) </details> ### 📄 Description Adds compatibility for `/v1/models/{model}` E.g `curl http://localhost:11434/v1/models/llama3` ``` { "id": "llama3", "object": "model", "created": 1718141294, "owned_by": "library" } ``` --- <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-12 23:34:33 -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#11646