Problem
Desktop context-window inputs require a raw integer token count. In the Add Model dialog, entering common values such as 1000k or 1M is not accepted, and the field reports “Enter a context window” rather than explaining the unsupported format.
To reproduce, open Settings → Models, select a connection that allows adding a model, enter a model ID, enter 1000k or 1M as its context window, and click Add.
Model documentation commonly uses these abbreviations, so expanding them manually is inconvenient. Checked against main commit 10269d3c2c5935618ade5834005b24a99e5b04b9.
Desired outcome
Accept decimal K/M suffixes in both the Add Model dialog and the existing model's context-window editor, while preserving plain integer input:
128000 → 128000
128k / 128K → 128000
1000k / 1m / 1M → 1000000
1.5M → 1500000
Use K = 1,000 and M = 1,000,000, accept surrounding whitespace, and continue storing a positive integer token count. Invalid input should show a format-specific error rather than a required-field error.
Existing saved integer values and runtime context-budget behavior should remain unchanged. Saving while the field is still focused must persist the current value on the first click, and both Desktop inputs should follow the same parsing rules.
Alternatives or workarounds
Enter the expanded integer, for example 1000000 instead of 1M.
Related: #4870 / #4871 add configurable context targets. The open PR includes K/M parsing for CLI input, but does not add this support to the Desktop model settings inputs.
AI assistance: OpenAI Codex inspected the implementation and prepared and submitted this issue at the contributor's request.
Problem
Desktop context-window inputs require a raw integer token count. In the Add Model dialog, entering common values such as
1000kor1Mis not accepted, and the field reports “Enter a context window” rather than explaining the unsupported format.To reproduce, open Settings → Models, select a connection that allows adding a model, enter a model ID, enter
1000kor1Mas its context window, and click Add.Model documentation commonly uses these abbreviations, so expanding them manually is inconvenient. Checked against main commit
10269d3c2c5935618ade5834005b24a99e5b04b9.Desired outcome
Accept decimal K/M suffixes in both the Add Model dialog and the existing model's context-window editor, while preserving plain integer input:
128000→ 128000128k/128K→ 1280001000k/1m/1M→ 10000001.5M→ 1500000Use K = 1,000 and M = 1,000,000, accept surrounding whitespace, and continue storing a positive integer token count. Invalid input should show a format-specific error rather than a required-field error.
Existing saved integer values and runtime context-budget behavior should remain unchanged. Saving while the field is still focused must persist the current value on the first click, and both Desktop inputs should follow the same parsing rules.
Alternatives or workarounds
Enter the expanded integer, for example
1000000instead of1M.Related: #4870 / #4871 add configurable context targets. The open PR includes K/M parsing for CLI input, but does not add this support to the Desktop model settings inputs.
AI assistance: OpenAI Codex inspected the implementation and prepared and submitted this issue at the contributor's request.