[GH-ISSUE #14360] issue: unable to query large OpenAPI endpoints using native function calling #71825

Closed
opened 2026-05-13 03:47:37 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @ciejer on GitHub (May 26, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14360

Check Existing Issues

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

Installation Method

Other

Open WebUI Version

v0.6.10

Ollama Version (if applicable)

No response

Operating System

Debian 12, Docker Compose

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 listed steps to reproduce the bug in detail.

Expected Behavior

Querying an LLM using native functions with a large OpenAPI tool equipped should provide some way of filtering or disabling available endpoints down to a subset of functionality, to remain within LLM limits.
I have observed this issue on two separate OpenWebUI instances, both with external OpenAPI endpoints and also via MCPO.

Actual Behavior

Adding the OpenWebUI openapi.json as a system-wide tool, and querying GPT-4.1 with that tool equipped, produces an error 400: Invalid 'tools': array too long. Expected an array with maximum length 128, but got an array with length 315 instead.

Steps to Reproduce

  1. In Admin Panel -> Tools, add a tool server for https:///openapi.json. Use 'Verify Connection' to ensure it's connecting correctly.
  2. Refresh the browser, then open a new chat with OpenAI's gpt-4.1 or o4-mini.
  3. In Chat Controls, set Function Calling to 'native'.
  4. In the message bar, click the + and enable the 'Open WebUI' endpoint.
  5. Send any message to the LLM.
  6. Error message as received: "400: Invalid 'tools': array too long. Expected an array with maximum length 128, but got an array with length 315 instead."

Logs & Screenshots

Browser Console Logs:
openwebui.dataops.nz-1748294240937.log

Docker Logs:

docker_logs.txt

Additional Information

No response

Originally created by @ciejer on GitHub (May 26, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/14360 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Other ### Open WebUI Version v0.6.10 ### Ollama Version (if applicable) _No response_ ### Operating System Debian 12, Docker Compose ### 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 listed steps to reproduce the bug in detail. ### Expected Behavior Querying an LLM using native functions with a large OpenAPI tool equipped should provide some way of filtering or disabling available endpoints down to a subset of functionality, to remain within LLM limits. I have observed this issue on two separate OpenWebUI instances, both with external OpenAPI endpoints and also via MCPO. ### Actual Behavior Adding the OpenWebUI openapi.json as a system-wide tool, and querying GPT-4.1 with that tool equipped, produces an error 400: Invalid 'tools': array too long. Expected an array with maximum length 128, but got an array with length 315 instead. ### Steps to Reproduce 1. In Admin Panel -> Tools, add a tool server for https://<your openwebui url>/openapi.json. Use 'Verify Connection' to ensure it's connecting correctly. 2. Refresh the browser, then open a new chat with OpenAI's gpt-4.1 or o4-mini. 3. In Chat Controls, set Function Calling to 'native'. 4. In the message bar, click the + and enable the 'Open WebUI' endpoint. 5. Send any message to the LLM. 6. Error message as received: "400: Invalid 'tools': array too long. Expected an array with maximum length 128, but got an array with length 315 instead." ### Logs & Screenshots Browser Console Logs: [openwebui.dataops.nz-1748294240937.log](https://github.com/user-attachments/files/20445996/openwebui.dataops.nz-1748294240937.log) Docker Logs: [docker_logs.txt](https://github.com/user-attachments/files/20445997/docker_logs.txt) ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-13 03:47:37 -05:00
Author
Owner

@tjbck commented on GitHub (May 26, 2025):

OpenAI needs to support more tools to be included in the chat request.

<!-- gh-comment-id:2910653755 --> @tjbck commented on GitHub (May 26, 2025): OpenAI needs to support more tools to be included in the chat request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#71825