[GH-ISSUE #14514] issue: OpenAI models with max context length set now throw 400: Unrecognized request argument supplied: num_ctx #55949

Closed
opened 2026-05-05 18:21:11 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @taylorwilsdon on GitHub (May 29, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14514

Check Existing Issues

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

Installation Method

Git Clone

Open WebUI Version

0.6.13

Ollama Version (if applicable)

No response

Operating System

Ubuntu

Browser (if applicable)

Chrome

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

Upgraded from 0.6.11 and expected that existing models should continue working as they previously had.

Actual Behavior

All OpenAI models with a max context length declared in the model settings (which I've used historically both to communicate upstream to ollama and also as a source of truth for max context length for token usage display via filter function). Does not appear to affect Anthropic models, although those I'm connecting to via pipeline.

Image

Steps to Reproduce

Set a num_ctx value and try to chat

Image

Logs & Screenshots

Image

Additional Information

No response

Originally created by @taylorwilsdon on GitHub (May 29, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/14514 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone ### Open WebUI Version 0.6.13 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu ### Browser (if applicable) Chrome ### 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 Upgraded from 0.6.11 and expected that existing models should continue working as they previously had. ### Actual Behavior All OpenAI models with a max context length declared in the model settings (which I've used historically both to communicate upstream to ollama and also as a source of truth for max context length for token usage display via filter function). Does not appear to affect Anthropic models, although those I'm connecting to via pipeline. <img width="1011" alt="Image" src="https://github.com/user-attachments/assets/dec842bc-bca4-4aaf-887a-4b9990c0a7e6" /> ### Steps to Reproduce Set a num_ctx value and try to chat <img width="1080" alt="Image" src="https://github.com/user-attachments/assets/971eaf30-a781-44f8-a88d-1d240babdef2" /> ### Logs & Screenshots <img width="1011" alt="Image" src="https://github.com/user-attachments/assets/dec842bc-bca4-4aaf-887a-4b9990c0a7e6" /> ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-05 18:21:12 -05:00
Author
Owner

@casuffitsharp commented on GitHub (May 29, 2025):

Same issue here with top_k on 4.1-mini and 0.6.13. It works correctly on version 0.6.11.

<!-- gh-comment-id:2920699424 --> @casuffitsharp commented on GitHub (May 29, 2025): Same issue here with top_k on 4.1-mini and 0.6.13. It works correctly on version 0.6.11.
Author
Owner

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

Intended behaviour now, some OpenAI compatible LLM providers actual do use these custom params and our stance here is that we should allow adding these.

<!-- gh-comment-id:2920703248 --> @tjbck commented on GitHub (May 29, 2025): Intended behaviour now, some OpenAI compatible LLM providers actual do use these custom params and our stance here is that we should allow adding these.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#55949