[GH-ISSUE #8222] Change ToolFunction->Parameters to json.RawMessage like in the Format property #51761

Closed
opened 2026-04-28 20:54:59 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @jerbob92 on GitHub (Dec 23, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/8222

Originally assigned to: @ParthSareen on GitHub.

What is the issue?

I'm trying to use Tools in the ChatRequest, but the Parameters property in ToolFunction does not allow me to put my full JSON schema in there, while the Format property does.

I would suggest changing the type of Parameters into json.RawMessage just like Format.

I'm currently using Format property as a workaround.

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.5.4

Originally created by @jerbob92 on GitHub (Dec 23, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/8222 Originally assigned to: @ParthSareen on GitHub. ### What is the issue? I'm trying to use Tools in the `ChatRequest`, but the `Parameters` property in `ToolFunction` does not allow me to put my full JSON schema in there, while the `Format` property does. I would suggest changing the type of `Parameters` into `json.RawMessage` just like `Format`. I'm currently using `Format` property as a workaround. ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.5.4
GiteaMirror added the bug label 2026-04-28 20:54:59 -05:00
Author
Owner

@ParthSareen commented on GitHub (Apr 16, 2025):

We should support a more rich schema now although I do plan to make it even looser

<!-- gh-comment-id:2810951711 --> @ParthSareen commented on GitHub (Apr 16, 2025): We should support a more rich schema now although I do plan to make it even looser
Author
Owner

@jonigl commented on GitHub (Jul 16, 2025):

Hi there! I ran into the same issue and wanted to share my findings. I opened this issue, where I describe what I discovered and propose a possible solution.

To address the problem, I’ve also submitted two PRs to refactor the related behavior:

Would love any feedback or thoughts on it thanks!

<!-- gh-comment-id:3081607481 --> @jonigl commented on GitHub (Jul 16, 2025): Hi there! I ran into the same issue and wanted to share my findings. I opened [this issue](https://github.com/ollama/ollama/issues/11444), where I describe what I discovered and propose a possible solution. To address the problem, I’ve also submitted two PRs to refactor the related behavior: * [PR #11448 (ollama/ollama)](https://github.com/ollama/ollama/pull/11448) * [PR #542 (ollama/ollama-python)](https://github.com/ollama/ollama-python/pull/542)python/pull/542) Would love any feedback or thoughts on it thanks!
Author
Owner

@ParthSareen commented on GitHub (Jul 16, 2025):

Thank you @jonigl and appreciate the PRs to both repos – will review shortly!

<!-- gh-comment-id:3081615892 --> @ParthSareen commented on GitHub (Jul 16, 2025): Thank you @jonigl and appreciate the PRs to both repos – will review shortly!
Author
Owner

@jonigl commented on GitHub (Jul 17, 2025):

Thank you @jonigl and appreciate the PRs to both repos – will review shortly!

Sure, no rush. You are welcome @ParthSareen and thank you for maintaining this awesome project!

<!-- gh-comment-id:3083083401 --> @jonigl commented on GitHub (Jul 17, 2025): > Thank you @jonigl and appreciate the PRs to both repos – will review shortly! Sure, no rush. You are welcome @ParthSareen and thank you for maintaining this awesome project!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#51761