[PR #11074] Allow to refer local type definitions on a root level of ToolFunction schema #44678

Open
opened 2026-04-25 00:17:45 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11074
Author: @kudla
Created: 6/15/2025
Status: 🔄 Open

Base: mainHead: main


📝 Commits (2)

  • 967e621 allow tool function schema to refer local type definitions
  • 9628764 make ToolFunction.Properties.required as well optional in favor of declaration option

📊 Changes

1 file changed (+5 additions, -3 deletions)

View changed files

📝 api/types.go (+5 -3)

📄 Description

As it is allowed to define json schema definitions for a ToolFunction structure still it is not possible to refer this declarations from the Properties declarations their selfs.

So this trying to fix this.

  • Verified the tests scoped for api/types*.go only. Not affected.

🔄 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/11074 **Author:** [@kudla](https://github.com/kudla) **Created:** 6/15/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`967e621`](https://github.com/ollama/ollama/commit/967e62162d608b866795ce0429123121353527b3) allow tool function schema to refer local type definitions - [`9628764`](https://github.com/ollama/ollama/commit/9628764bff53386c565d51e3e4e497869d454415) make ToolFunction.Properties.required as well optional in favor of declaration option ### 📊 Changes **1 file changed** (+5 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+5 -3) </details> ### 📄 Description As it is allowed to define json schema definitions for a `ToolFunction` structure still it is not possible to refer this declarations from the `Properties` declarations their selfs. So this trying to fix this. * [x] Verified the tests scoped for `api/types*.go` only. Not affected. --- <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-25 00:17:45 -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#44678