[PR #1932] [MERGED] api: add model for all requests #57425

Closed
opened 2026-04-29 12:01:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/1932
Author: @mxyng
Created: 1/11/2024
Status: Merged
Merged: 1/18/2024
Merged by: @mxyng

Base: mainHead: mxyng/api-fields


📝 Commits (2)

  • a38d88d api: add model for all requests
  • 745b593 add model to ModelResponse

📊 Changes

2 files changed (+61 additions, -26 deletions)

View changed files

📝 api/types.go (+19 -4)
📝 server/routes.go (+42 -22)

📄 Description

Prefer using req.Model and fallback to req.Name. req.Model is already the field name for generate and chat which are by far the most popular endpoints. This change aligns the other requests.

Also update CopyRequest.Destination to CopyRequest.Target which better describe field


🔄 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/1932 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 1/11/2024 **Status:** ✅ Merged **Merged:** 1/18/2024 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/api-fields` --- ### 📝 Commits (2) - [`a38d88d`](https://github.com/ollama/ollama/commit/a38d88d82851bc659f90b214cca56b06c6704dbb) api: add model for all requests - [`745b593`](https://github.com/ollama/ollama/commit/745b5934fa04af1987c70d18f51a92cb57f876dd) add model to ModelResponse ### 📊 Changes **2 files changed** (+61 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+19 -4) 📝 `server/routes.go` (+42 -22) </details> ### 📄 Description Prefer using `req.Model` and fallback to `req.Name`. `req.Model` is already the field name for generate and chat which are by far the most popular endpoints. This change aligns the other requests. Also update `CopyRequest.Destination` to `CopyRequest.Target` which better describe field --- <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-29 12:01:49 -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#57425