open-webui/backend/open_webui/routers
Classic298 9d2c3965ff
fix: send max_completion_tokens for Bedrock-prefixed OpenAI models (#30976)
On an Amazon Bedrock OpenAI-compatible connection, GPT-5.6 and GPT-6 models have ids like `us.openai.gpt-6-sol` or `openai.gpt-6-luna`. These were not recognised as new OpenAI models, so `max_tokens` went upstream unchanged and Bedrock rejected it with a 400. Title and emoji generation failed on every chat, and any request with a token limit failed too. Setting `max_completion_tokens` by hand did not help, because non-OpenAI URLs convert it back to `max_tokens`.

`is_openai_new_model()` now drops a leading `openai.` or `<region>.openai.` (`us.`, `eu.`, `global.`, `us-gov.`) before matching, so these ids get the same handling as bare `gpt-5` ids. Ids that are not new models, such as `openai.gpt-oss-120b-1:0` and `gpt-4o`, are unchanged, and so is the LiteLLM `openai/` prefix.

Fixes #30510
2026-09-30 20:09:06 +04:00
..
analytics.py fix: apply the group filter to the Analytics hourly chart (#30978) 2026-09-24 12:11:13 -04:00
audio.py fix: keep the speech-to-text extension allowlist when the Audio settings are saved (#30208) 2026-09-19 17:36:38 -04:00
auths.py refac 2026-09-24 12:10:30 -04:00
automations.py fix: automation still shows "Last run Never" after "Run now" (#31583) 2026-09-30 19:01:42 +04:00
calendar.py fix: Scheduled Tasks calendar shows extra runs for automations with a run count (#31604) 2026-09-30 19:43:41 +04:00
channels.py fix: members can be added to or removed from a direct message through the API (#31575) 2026-09-30 19:03:32 +04:00
chats.py fix: admins can still read and change other users' chats with ENABLE_ADMIN_CHAT_ACCESS off (#31416) 2026-09-28 01:51:59 +04:00
configs.py fix: keep requested MCP OAuth scope when DCR response omits it (#30384) 2026-09-23 23:52:29 -04:00
evaluations.py fix: load the leaderboard activity chart for model ids that contain a slash (#30456) 2026-09-23 23:32:42 -04:00
files.py refac 2026-09-21 10:19:59 -04:00
folders.py refac: folder file checks (#30442) 2026-09-23 23:36:15 -04:00
functions.py fix: drop a deleted plugin's source from the content cache (#29983) 2026-09-13 20:21:40 -04:00
groups.py refac 2026-06-29 05:47:21 -05:00
images.py refac(hardening): apply the same safety checks to generated image downloads (#31623) 2026-09-30 19:08:48 +04:00
knowledge.py refac 2026-09-21 10:19:59 -04:00
memories.py refac 2026-09-16 00:34:24 -04:00
models.py refac 2026-09-21 10:25:20 -04:00
notes.py refac 2026-09-22 13:13:22 -04:00
notifications.py refac 2026-07-27 19:39:36 -04:00
ollama.py fix: model upload, download and unload ignore a connection's custom headers and auth type (#31490) 2026-09-28 01:48:26 +04:00
openai.py fix: send max_completion_tokens for Bedrock-prefixed OpenAI models (#30976) 2026-09-30 20:09:06 +04:00
pipelines.py perf: skip pipeline filter session setup when no filters exist (#29146) 2026-08-28 12:22:23 -04:00
prompts.py refac 2026-08-31 00:39:16 -04:00
retrieval.py feat: add a Tavily search depth setting (#31308) 2026-09-27 23:15:09 +04:00
scim.py fix: SCIM group members are returned with "$ref": null (#31529) 2026-09-30 19:47:11 +04:00
skills.py perf: stop scanning every skill on each listing and chat turn (#28798) 2026-08-19 11:07:33 -07:00
tasks.py refac 2026-08-11 01:15:05 -06:00
terminals.py refac 2026-09-21 10:30:53 -04:00
tools.py refac 2026-09-21 08:31:27 -04:00
users.py refac 2026-09-07 14:46:52 -04:00
utils.py refac 2026-09-06 17:27:30 -04:00