continue-custom/core/config
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
..
json fix: move rc loading to separate file, fix core imports issue 2025-07-21 17:31:35 +02:00
markdown support relative path for workspace dirs 2026-01-15 19:00:09 +05:30
profile fix: use config.yaml name for default Local Config profile (#11110) 2026-03-24 13:37:52 -07:00
workspace Remove Gemini 2.0 Flash from defaults and update Claude defaults to 4.6 (#11782) 2026-03-24 17:03:52 -07:00
yaml fix: respect contextLength from YAML model config (#11807) 2026-03-25 12:26:52 -07:00
ConfigHandler.ts fix: "No chat model selected" error on startup (#11672) 2026-03-24 13:05:10 -07:00
ConfigHandler.vitest.ts feat: Respect Org Policies (#7087) 2025-08-11 19:20:07 -07:00
createNewAssistantFile.ts Rename "agent" terminology to "config" throughout the codebase (#8229) 2025-10-13 22:25:42 -07:00
default.ts Rename "agent" terminology to "config" throughout the codebase (#8229) 2025-10-13 22:25:42 -07:00
getWorkspaceContinueRuleDotFiles.ts ruleFile -> sourceFile 2025-09-29 16:05:05 -07:00
load.ts fix: harden system message tools and wire toolOverrides to system message path (#10485) 2026-03-13 12:52:05 -07:00
loadContextProviders.ts fix: unknown context provider file 2025-08-21 18:04:18 -07:00
loadContextProviders.vitest.ts fix: exclude problems and terminal on jetbrains 2025-08-18 18:22:13 -07:00
loadLocalAssistants.ts feat: better settings page and open settings fixes 2025-09-29 15:59:46 -07:00
loadLocalAssistants.vitest.ts fix: HOTFIX local assistant loading (#7354) 2025-08-25 11:52:07 -07:00
migrateSharedConfig.ts feat: remove auto-accept edits setting (#8310) 2025-10-27 16:21:34 -07:00
onboarding.ts fix(gemini): update model catalog for retired/new Gemini models (#11793) 2026-03-24 20:22:47 -07:00
ProfileLifecycleManager.ts feat: implement Sentry error tracking with privacy-first anonymization (#6881) 2025-08-14 16:54:21 -07:00
selectedModels.ts feat: remove models property 2025-04-08 19:28:48 -07:00
sharedConfig.ts feat: remove auto-accept edits setting (#8310) 2025-10-27 16:21:34 -07:00
types.ts fix: filter out markdown delimiters from next edit responses (#8056) 2025-10-01 22:52:18 -07:00
usesFreeTrialApiKey.ts fix: only show free trial dialog for freetrial secrettype 2025-10-14 19:29:07 +05:30
usesFreeTrialApiKey.vitest.ts fix more lints 2026-01-07 20:40:03 +05:30
util.ts fix: remove add model system message 2025-08-08 11:42:06 +05:30
util.vitest.ts rename to vitest 2025-06-23 18:46:59 +05:30
validation.ts feat: insert prompt into input on click 2025-03-20 14:45:57 -07:00