[PR #13361] [MERGED] server: add REQUIRES command to modelfile #19449

Closed
opened 2026-04-16 07:07:47 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13361
Author: @jmorganca
Created: 12/6/2025
Status: Merged
Merged: 12/18/2025
Merged by: @jmorganca

Base: mainHead: jmorganca/min-version


📝 Commits (1)

  • 6bcd368 add REQUIRES command to Modelfile

📊 Changes

10 files changed (+88 additions, -25 deletions)

View changed files

📝 api/types.go (+4 -0)
📝 cmd/cmd.go (+3 -0)
📝 cmd/cmd_test.go (+25 -0)
📝 docs/modelfile.mdx (+11 -0)
📝 go.mod (+8 -7)
📝 go.sum (+16 -14)
📝 parser/parser.go (+14 -3)
📝 server/create.go (+5 -1)
📝 server/routes.go (+1 -0)
📝 types/model/config.go (+1 -0)

📄 Description

Adds REQUIRES command to the Modelfile, storing a "requires" field in a model's JSON config. This will allow for doing a pre-flight check as to whether a user needs to upgrade Ollama in order to run a model.


🔄 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/13361 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 12/6/2025 **Status:** ✅ Merged **Merged:** 12/18/2025 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `jmorganca/min-version` --- ### 📝 Commits (1) - [`6bcd368`](https://github.com/ollama/ollama/commit/6bcd368fff79c283a8d38afd7549e070ae09755d) add REQUIRES command to Modelfile ### 📊 Changes **10 files changed** (+88 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+4 -0) 📝 `cmd/cmd.go` (+3 -0) 📝 `cmd/cmd_test.go` (+25 -0) 📝 `docs/modelfile.mdx` (+11 -0) 📝 `go.mod` (+8 -7) 📝 `go.sum` (+16 -14) 📝 `parser/parser.go` (+14 -3) 📝 `server/create.go` (+5 -1) 📝 `server/routes.go` (+1 -0) 📝 `types/model/config.go` (+1 -0) </details> ### 📄 Description Adds `REQUIRES` command to the Modelfile, storing a `"requires"` field in a model's JSON config. This will allow for doing a pre-flight check as to whether a user needs to upgrade Ollama in order to run a model. --- <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-16 07:07:47 -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#19449