[GH-ISSUE #13861] issue: Functions (eg: filter) is not applied when sending on API (when try on browser, it works, details below) #32585

Closed
opened 2026-04-25 06:30:49 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @devanenWl on GitHub (May 13, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/13861

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.9

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

Expected Behavior

Request through API should go through filter

Actual Behavior

It doesn't

Steps to Reproduce

curl --location 'https://example.com/api/chat/completions' \
--header 'content-type: application/json' \
--data '{"model":"chatgpt-4o-latest","messages":[{"role":"user","content":"Hi"}],"stream":false}'

When I try this, I have a Function Filter to log input/output token. But when checked in Docker logs, It never shows anything about this requests

But when I try on the frontend, it works normally, and when I try to POST by using that body, it appear in log

Logs & Screenshots

This is the log when I try by using on FE
2025-05-13 19:52:03.528 | INFO | function_context_manager:log_chat_turn:116 - {"log_type": "chat_turn", "model_base": "gpt-4o-2024-11-20", "model_name": "gpt-4o-2024-11-20", "original_input_tokens": 1, "output_tokens": 10, "elapsed_seconds": 1.0, "original_message_count": 1} - {}

Additional Information

No response

Originally created by @devanenWl on GitHub (May 13, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/13861 ### 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.9 ### 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 listed steps to reproduce the bug in detail. ### Expected Behavior Request through API should go through filter ### Actual Behavior It doesn't ### Steps to Reproduce ```curl curl --location 'https://example.com/api/chat/completions' \ --header 'content-type: application/json' \ --data '{"model":"chatgpt-4o-latest","messages":[{"role":"user","content":"Hi"}],"stream":false}' ``` When I try this, I have a Function Filter to log input/output token. But when checked in Docker logs, It never shows anything about this requests But when I try on the frontend, it works normally, and when I try to POST by using that body, it appear in log ### Logs & Screenshots This is the log when I try by using on FE 2025-05-13 19:52:03.528 | INFO | function_context_manager:log_chat_turn:116 - {"log_type": "chat_turn", "model_base": "gpt-4o-2024-11-20", "model_name": "gpt-4o-2024-11-20", "original_input_tokens": 1, "output_tokens": 10, "elapsed_seconds": 1.0, "original_message_count": 1} - {} ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-25 06:30:49 -05:00
Author
Owner

@Classic298 commented on GitHub (May 14, 2025):

Please check existing issues and discussions. This is a duplicate

<!-- gh-comment-id:2879182609 --> @Classic298 commented on GitHub (May 14, 2025): Please check existing issues and discussions. This is a duplicate
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#32585