[PR #12989] [MERGED] api: add omitempty to required tool function parameter type #76324

Closed
opened 2026-05-05 08:51:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12989
Author: @jmorganca
Created: 11/6/2025
Status: Merged
Merged: 11/6/2025
Merged by: @jmorganca

Base: mainHead: jmorganca/required-omitempty


📝 Commits (3)

  • 0a84939 api: add omitempty to required tool function parameter type
  • fed3665 fix tests
  • 1ab7631 fix lint error

📊 Changes

6 files changed (+45 additions, -37 deletions)

View changed files

📝 api/types.go (+1 -1)
📝 api/types_test.go (+38 -0)
📝 middleware/openai_test.go (+1 -7)
📝 server/routes_debug_test.go (+1 -1)
📝 server/routes_generate_test.go (+2 -14)
📝 server/routes_harmony_streaming_test.go (+2 -14)

📄 Description

Instead of serializing a tool function parameters struct required field to null, omit it.


🔄 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/12989 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 11/6/2025 **Status:** ✅ Merged **Merged:** 11/6/2025 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `jmorganca/required-omitempty` --- ### 📝 Commits (3) - [`0a84939`](https://github.com/ollama/ollama/commit/0a84939c1195850a4354675ddd229c15dc846ab3) api: add omitempty to required tool function parameter type - [`fed3665`](https://github.com/ollama/ollama/commit/fed3665c708b99bd283658ef8436fa28ff79b095) fix tests - [`1ab7631`](https://github.com/ollama/ollama/commit/1ab7631377fbb7a142e96c7e18c72829b7fa727c) fix lint error ### 📊 Changes **6 files changed** (+45 additions, -37 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+1 -1) 📝 `api/types_test.go` (+38 -0) 📝 `middleware/openai_test.go` (+1 -7) 📝 `server/routes_debug_test.go` (+1 -1) 📝 `server/routes_generate_test.go` (+2 -14) 📝 `server/routes_harmony_streaming_test.go` (+2 -14) </details> ### 📄 Description Instead of serializing a tool function parameters struct `required` field to `null`, omit it. --- <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-05-05 08:51:06 -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#76324