[GH-ISSUE #12892] issue: #103740

Closed
opened 2026-05-18 01:16:27 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @perelin on GitHub (Apr 15, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12892

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

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

Using the highest ranked Mistral function https://openwebui.com/f/peuportier/Mistral should let me use the models provided by mistral without any errors.

Actual Behavior

Chat completion for any Mistral models provided by https://openwebui.com/f/peuportier/Mistral fails.

Steps to Reproduce

  • Install the function (incl. mistral API key, its free) https://openwebui.com/f/peuportier/Mistral
  • Use the suggested default name 'Mistral API' for the function (which produces a model namespace of 'mistral_api.' for the models)
  • Try a chat completion in the UI with one of the mistral models
    completion will fail

Logs & Screenshots

Chat completion for any Mistral model will fail with this error in the Chat:

Error: 400 Client Error: Bad Request for url: https://api.mistral.ai/v1/chat/completionsError : 400 Client Error: Bad Request for url: https://api.mistral.ai/v1/chat/completionsError : 400 Client Error: Bad Request for url: https://api.mistral.ai/v1/chat/completions

Docker logs:

2025-04-14T20:59:10Z HTTPError: {"object":"error","message":"Invalid model: mistral_api.open-mistral-nemo","type":"invalid_model","param":null,"code":"1500"}

Additional Information

Docker error logs indicate that the model id was not sanitised from the OpenWebUI model prefix (the initial name of the function I guess). And indeed in the function the model id is derived from the namespace-prefixed function name like this:

model = body["model"].removeprefix("mistral.")

The supposed function namespace is hardcoded to mistral

Looking at other functions the right way to derive the model name would be

model = body["model"].split(".", 1)[-1]

Changing that in the function fixes all errors.

Originally created by @perelin on GitHub (Apr 15, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/12892 ### 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.5 ### 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 Using the highest ranked Mistral function https://openwebui.com/f/peuportier/Mistral should let me use the models provided by mistral without any errors. ### Actual Behavior Chat completion for any Mistral models provided by https://openwebui.com/f/peuportier/Mistral fails. ### Steps to Reproduce - Install the function (incl. mistral API key, its free) https://openwebui.com/f/peuportier/Mistral - Use the suggested default name 'Mistral API' for the function (which produces a model namespace of 'mistral_api.' for the models) - Try a chat completion in the UI with one of the mistral models completion will fail ### Logs & Screenshots Chat completion for any Mistral model will fail with this error in the Chat: > Error: 400 Client Error: Bad Request for url: [https://api.mistral.ai/v1/chat/completionsError ](https://api.mistral.ai/v1/chat/completionsError): 400 Client Error: Bad Request for url: [https://api.mistral.ai/v1/chat/completionsError ](https://api.mistral.ai/v1/chat/completionsError): 400 Client Error: Bad Request for url: https://api.mistral.ai/v1/chat/completions Docker logs: > 2025-04-14T20:59:10Z HTTPError: {"object":"error","message":"Invalid model: mistral_api.open-mistral-nemo","type":"invalid_model","param":null,"code":"1500"} ### Additional Information Docker error logs indicate that the model id was not sanitised from the OpenWebUI model prefix (the initial name of the function I guess). And indeed in the function the model id is derived from the namespace-prefixed function name like this: `model = body["model"].removeprefix("mistral.")` The supposed function namespace is hardcoded to `mistral` Looking at other functions the right way to derive the model name would be `model = body["model"].split(".", 1)[-1]` Changing that in the function fixes all errors.
GiteaMirror added the bug label 2026-05-18 01:16:27 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#103740