[GH-ISSUE #1003] Request: Support Modelfile management API #486

Closed
opened 2026-04-12 10:09:56 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @LushVoid on GitHub (Nov 4, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1003

Description

As a developer integrating with the Ollama server, I find the current workflow for creating and managing models requires handling Modelfiles locally before uploading. This process can be cumbersome.

Feature Request

I would like to request an enhancement to the API that would allow for direct editing of Modelfiles through API requests. This would enable more dynamic and automated workflows, particularly for applications that are deployed as browsers.

Suggested Solution

Implement a new API endpoint (e.g., PUT /api/model/:name) that allows users to send a Modelfile's content or updates to an existing model's Modelfile directly in the request body. The server could then apply these changes to the model without requiring the webapp user to manage and upload files manually and/or copy a new file entirely.

Dynamic Model Management: This feature would simplify the process of programmatically adjusting models based on application needs or user feedback without the overhead of file management.

Somthing like:

curl -X PUT http://localhost:11434/api/models/rMario -d '{ "modelfile": "<updated_modelfile_content_here>" }'

Conclusion

Providing a means to edit Modelfiles directly via the API would greatly enhance the developer experience and broaden the use cases for the Ollama server. It would also bring the tool in line with contemporary cloud-native practices.

Thank you for considering this request.

Originally created by @LushVoid on GitHub (Nov 4, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1003 ### Description As a developer integrating with the Ollama server, I find the current workflow for creating and managing models requires handling Modelfiles locally before uploading. This process can be cumbersome. ### Feature Request I would like to request an enhancement to the API that would allow for direct editing of Modelfiles through API requests. This would enable more dynamic and automated workflows, particularly for applications that are deployed as browsers. ### Suggested Solution Implement a new API endpoint (e.g., `PUT /api/model/:name`) that allows users to send a Modelfile's content or updates to an existing model's Modelfile directly in the request body. The server could then apply these changes to the model without requiring the webapp user to manage and upload files manually and/or copy a new file entirely. **Dynamic Model Management:** This feature would simplify the process of programmatically adjusting models based on application needs or user feedback without the overhead of file management. Somthing like: `curl -X PUT http://localhost:11434/api/models/rMario -d '{ "modelfile": "<updated_modelfile_content_here>" }'` ### Conclusion Providing a means to edit Modelfiles directly via the API would greatly enhance the developer experience and broaden the use cases for the Ollama server. It would also bring the tool in line with contemporary cloud-native practices. Thank you for considering this request.
Author
Owner

@LushVoid commented on GitHub (Nov 5, 2023):

My current workaround is to set up an additional node server for my React app, then have it act as the intermediate for the Ollam.

<!-- gh-comment-id:1793886037 --> @LushVoid commented on GitHub (Nov 5, 2023): My current workaround is to set up an additional node server for my React app, then have it act as the intermediate for the Ollam.
Author
Owner

@mxyng commented on GitHub (Nov 5, 2023):

If I understand this issue correctly, this will be resolved by #898

<!-- gh-comment-id:1793887534 --> @mxyng commented on GitHub (Nov 5, 2023): If I understand this issue correctly, this will be resolved by #898
Author
Owner

@jmorganca commented on GitHub (Dec 22, 2023):

Closing with #898 (would love feedback!)

<!-- gh-comment-id:1867203061 --> @jmorganca commented on GitHub (Dec 22, 2023): Closing with #898 (would love feedback!)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#486