Files
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
..
2026-09-24 12:10:30 -04:00
2026-09-21 10:19:59 -04:00
2026-09-23 23:36:15 -04:00
2026-06-29 05:47:21 -05:00
2026-09-21 10:19:59 -04:00
2026-09-16 00:34:24 -04:00
2026-09-21 10:25:20 -04:00
2026-09-22 13:13:22 -04:00
2026-07-27 19:39:36 -04:00
2026-08-31 00:39:16 -04:00
2026-08-11 01:15:05 -06:00
2026-09-21 10:30:53 -04:00
2026-09-21 08:31:27 -04:00
2026-09-07 14:46:52 -04:00
2026-09-06 17:27:30 -04:00