[PR #14568] api: preserve thought_signature in ToolCall for Gemini 3 tool calling #45975

Open
opened 2026-04-25 01:33:34 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14568
Author: @ssam18
Created: 3/3/2026
Status: 🔄 Open

Base: mainHead: fix/gemini3-thought-signature-tool-calls


📝 Commits (2)

  • b6bc810 api: preserve thought_signature in ToolCall for Gemini 3 tool calling Gemini 3 attaches an opaque thought_signature to every function call that
  • dde4dc4 fix: gofmt alignment in openai_test.go struct literal

📊 Changes

4 files changed (+105 additions, -0 deletions)

View changed files

📝 api/types.go (+4 -0)
📝 api/types_test.go (+40 -0)
📝 openai/openai.go (+5 -0)
📝 openai/openai_test.go (+56 -0)

📄 Description

Gemini 3 includes a thought_signature on every function call that has to be sent back with the tool result, otherwise the API throws a 400. This adds the field to api.ToolCall and the OpenAI compat layer so it survives the round-trip without getting silently dropped. Fixes the issue #14567.


🔄 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/14568 **Author:** [@ssam18](https://github.com/ssam18) **Created:** 3/3/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/gemini3-thought-signature-tool-calls` --- ### 📝 Commits (2) - [`b6bc810`](https://github.com/ollama/ollama/commit/b6bc810895bbbbde5cd91e90c27e42600e129a64) api: preserve thought_signature in ToolCall for Gemini 3 tool calling Gemini 3 attaches an opaque thought_signature to every function call that - [`dde4dc4`](https://github.com/ollama/ollama/commit/dde4dc4830a11fe59a6fd8fe7624ad9964cebab2) fix: gofmt alignment in openai_test.go struct literal ### 📊 Changes **4 files changed** (+105 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+4 -0) 📝 `api/types_test.go` (+40 -0) 📝 `openai/openai.go` (+5 -0) 📝 `openai/openai_test.go` (+56 -0) </details> ### 📄 Description Gemini 3 includes a thought_signature on every function call that has to be sent back with the tool result, otherwise the API throws a 400. This adds the field to api.ToolCall and the OpenAI compat layer so it survives the round-trip without getting silently dropped. Fixes the issue #14567. --- <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 01:33:34 -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#45975