fix(webui): allow custom context window token budgets (#5901)

* fix(webui): allow custom context window token budgets

* fix(i18n): translate context window hints in all locales

* fix(webui): accept context window K and M shorthand

* fix(webui): shorten context window hints

* refactor(webui): simplify context window validation
This commit is contained in:
chengyongru authored and GitHub committed 2026-09-24 18:26:03 +08:00
1 parent fdee134afb
commit eb3fc07087
17 files changed
+135 -49

No files matched your search

@@ -159,7 +159,9 @@ export function useModelSettingsActions({
!settings ||
saving ||
modelCallOrderSaving ||
modelConfigurationSaving
modelConfigurationSaving ||
!Number.isSafeInteger(form.contextWindowTokens) ||
form.contextWindowTokens <= 0
) {
return;
}
@@ -173,7 +175,6 @@ export function useModelSettingsActions({
!provider ||
!model ||
form.maxTokens <= 0 ||
form.contextWindowTokens <= 0 ||
form.temperature < 0 ||
form.temperature > 2
) {