[GH-ISSUE #16232] issue: Function calling parameter has 1 extra parameter, not exactly following openai's function calling standard #17834

Closed
opened 2026-04-19 23:43:26 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @tan-yong-sheng on GitHub (Aug 2, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16232

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.18

Ollama Version (if applicable)

No response

Operating System

Ubuntu 22.04

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

With reference to openai's documentation: https://platform.openai.com/docs/guides/function-calling?api-mode=chat&lang=curl, I found OpenWebUI client did send an extra parameter as follows:

I am using LiteLLM to orchestrate all my LLM api, and here are my LiteLLM's logs:

(i) mistral/magistral-medium-latest requests sent from OpenWebUI client (X)
Image

Image

(ii) openai/gpt-4.1 requests sent from OpenWebUI client (/)

Although it's still successful for openai request, but may not for other models which strictly follow the openai-compatible API format for function calling
Image

Actual Behavior

The correct parameter should be:

(i) mistral/magistral-medium-latest requests after removing the extra parameter (/)
Image

(ii) Tested again to openai model to ensure no impact after removing this extra parameter (/)

Image

Thanks.

Steps to Reproduce

Mentioned as above. Or can look back into this: https://platform.openai.com/docs/guides/function-calling?api-mode=chat

Logs & Screenshots

As shown as above

Additional Information

No response

Originally created by @tan-yong-sheng on GitHub (Aug 2, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/16232 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.18 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 22.04 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior With reference to openai's documentation: https://platform.openai.com/docs/guides/function-calling?api-mode=chat&lang=curl, I found OpenWebUI client did send an extra parameter as follows: I am using LiteLLM to orchestrate all my LLM api, and here are my LiteLLM's logs: (i) mistral/magistral-medium-latest requests sent from OpenWebUI client (X) <img width="934" height="433" alt="Image" src="https://github.com/user-attachments/assets/516173dd-3854-4486-a11c-decf832894a6" /> <img width="933" height="328" alt="Image" src="https://github.com/user-attachments/assets/9f7760eb-f5de-4343-954c-9c480bb8d31a" /> (ii) openai/gpt-4.1 requests sent from OpenWebUI client (/) Although it's still successful for openai request, but may not for other models which strictly follow the openai-compatible API format for function calling <img width="1863" height="873" alt="Image" src="https://github.com/user-attachments/assets/b356bab8-71a2-4fd3-9fbb-b8ab9a5d9f48" /> ### Actual Behavior The correct parameter should be: (i) mistral/magistral-medium-latest requests after removing the extra parameter (/) <img width="1892" height="870" alt="Image" src="https://github.com/user-attachments/assets/ba3b977d-ba33-4f81-a6c3-f2d3911c6274" /> (ii) Tested again to openai model to ensure no impact after removing this extra parameter (/) <img width="1870" height="873" alt="Image" src="https://github.com/user-attachments/assets/c6154bca-7ac1-4ef3-9b82-825cccbf8a01" /> Thanks. ### Steps to Reproduce Mentioned as above. Or can look back into this: https://platform.openai.com/docs/guides/function-calling?api-mode=chat ### Logs & Screenshots As shown as above ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-19 23:43:26 -05:00
Author
Owner

@tjbck commented on GitHub (Aug 2, 2025):

This definitely does not provide all the necessary details, are you using external tool servers? built-in tools?

<!-- gh-comment-id:3146570570 --> @tjbck commented on GitHub (Aug 2, 2025): This definitely does not provide all the necessary details, are you using external tool servers? built-in tools?
Author
Owner

@tan-yong-sheng commented on GitHub (Aug 2, 2025):

Thanks for follow up, I am using external tool server.

And I set function calling parameter to 'native' when running these models

<!-- gh-comment-id:3146571829 --> @tan-yong-sheng commented on GitHub (Aug 2, 2025): Thanks for follow up, I am using external tool server. And I set function calling parameter to 'native' when running these models
Author
Owner

@tjbck commented on GitHub (Aug 2, 2025):

Might be addressed with 00084c6ca6, testing wanted here!

<!-- gh-comment-id:3146572505 --> @tjbck commented on GitHub (Aug 2, 2025): Might be addressed with 00084c6ca6ee8e379a502799e4c32c708987f190, testing wanted here!
Author
Owner

@tan-yong-sheng commented on GitHub (Aug 3, 2025):

Hi @tjbck, the error still persist. Noting that I am using docker image: ghcr.io/open-webui/open-webui:dev.

Image

Also, I just tested with built-in tools, it also output the extra parameter just like tool server. Thanks.

<!-- gh-comment-id:3146959816 --> @tan-yong-sheng commented on GitHub (Aug 3, 2025): Hi @tjbck, the error still persist. Noting that I am using docker image: `ghcr.io/open-webui/open-webui:dev`. <img width="1860" height="843" alt="Image" src="https://github.com/user-attachments/assets/85b59e1e-3792-4fc2-a880-2aac20af6a5c" /> Also, I just tested with built-in tools, it also output the extra parameter just like tool server. Thanks.
Author
Owner

@tjbck commented on GitHub (Aug 4, 2025):

@tan-yong-sheng are you sure you're using the latest image?

Also I'm unable to reproduce the issue with built-in tools.

<!-- gh-comment-id:3150302167 --> @tjbck commented on GitHub (Aug 4, 2025): @tan-yong-sheng are you sure you're using the latest image? Also I'm unable to reproduce the issue with built-in tools.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#17834