continue-custom/gui/src/redux
Dallin Romney d6259a7304
fix: respect contextLength from YAML model config (#11807)
* fix: respect contextLength from YAML model config

Three fixes for contextLength not being respected:

1. Add contextLength to YAML model schema at the model level (not just
   inside defaultCompletionOptions), matching JSON config behavior
2. Read contextLength from both model-level and defaultCompletionOptions,
   with model-level taking precedence
3. Fix GUI selector fallback using DEFAULT_MAX_TOKENS (4096) instead of
   DEFAULT_CONTEXT_LENGTH (32768)

Closes #4638
Closes #4304

* fix: reduce complexity in modelConfigToBaseLLM

Replace find callbacks with includes() to offset complexity from
contextLength nullish coalescing.

* docs: document contextLength at model level in config.yaml reference

* docs: consistently show contextLength in defaultCompletionOptions for YAML

YAML examples use defaultCompletionOptions.contextLength, JSON examples
use model-level contextLength. Also fixes ollama guide using the wrong
key name (completionOptions -> defaultCompletionOptions).

* refactor: extract env options into helper to reduce complexity

Extract the repetitive env-to-options mapping from modelConfigToBaseLLM
into a separate applyEnvOptions function, bringing complexity well under
the limit of 36.
2026-03-25 12:26:52 -07:00
..
selectors fix: Enable prompt-based slash commands in Edit mode while filtering out built-in legacy commands (#7907) 2025-09-26 11:31:09 -07:00
slices fix: respect contextLength from YAML model config (#11807) 2026-03-25 12:26:52 -07:00
thunks Improve error handling UX and move stream retry to BaseLLM (#11773) 2026-03-24 12:40:19 -07:00
util feat: remove applied rules from chat history and dev data 2025-11-04 12:42:01 -08:00
hooks.ts feat: update redux store schemas 2024-11-27 16:45:20 -06:00
store.ts fix: retrieve reasoning toggle from local storage (#9688) 2026-02-02 21:58:06 -08:00