[GH-ISSUE #5768] Enable Functions on /openai/... and /ollama/... API endpoints #84858

Closed
opened 2026-05-15 09:39:14 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @dartcrossett on GitHub (Sep 27, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5768

Is your feature request related to a problem? Please describe.
When users use the Open WebUI chat interface to interact with Ollama-provided and OpenAI-provided models, Functions are triggered as part of their requests. If a user uses their API key from Open WebUI and proxies a request to the models, those Functions are not called. This is an issue if you are using a Function to perform basic accounting of how models are used, and how many tokens are consumed. Here is an example when Functions are bypassed:

curl https://example.org/openai/chat/completions \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer sk-REMOVED" \
    -d '{
        "model": "gpt-4o-mini",
        "messages": [
            {
                "role": "system",
                "content": "You are a helpful assistant."
            },
            {
                "role": "user",
                "content": "Hello!"
            }
        ]
    }' 

Describe the solution you'd like
When Open WebUI is used to proxy requests to the models via API, they should call the same functions that would be called using the Chat UI.

Originally created by @dartcrossett on GitHub (Sep 27, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/5768 **Is your feature request related to a problem? Please describe.** When users use the Open WebUI chat interface to interact with Ollama-provided and OpenAI-provided models, Functions are triggered as part of their requests. If a user uses their API key from Open WebUI and proxies a request to the models, those Functions are not called. This is an issue if you are using a Function to perform basic accounting of how models are used, and how many tokens are consumed. Here is an example when Functions are bypassed: ```shell curl https://example.org/openai/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-REMOVED" \ -d '{ "model": "gpt-4o-mini", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Hello!" } ] }' ``` **Describe the solution you'd like** When Open WebUI is used to proxy requests to the models via API, they should call the same functions that would be called using the Chat UI.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#84858