continue-custom/docs/customize
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
..
deep-dives Remove Gemini 2.0 Flash from defaults and update Claude defaults to 4.6 (#11782) 2026-03-24 17:03:52 -07:00
model-providers fix: respect contextLength from YAML model config (#11807) 2026-03-25 12:26:52 -07:00
model-roles fix(gemini): update model catalog for retired/new Gemini models (#11793) 2026-03-24 20:22:47 -07:00
custom-providers.mdx docs: fix 28 broken internal links across documentation 2026-02-17 17:43:43 -08:00
mcp-tools.mdx Consolidate duplicate documentation paths from /customization/ to /customize/ 2025-11-11 15:49:18 -05:00
model-roles.mdx docs: assistant --> agent 2025-09-08 14:40:33 -07:00
models.mdx fix(gemini): update model catalog for retired/new Gemini models (#11793) 2026-03-24 20:22:47 -07:00
overview.mdx Revert "Revert "docs: create IDE Extensions tab with Customize and Reference sections"" 2026-01-19 13:23:53 -08:00
prompts.mdx chore: hub.continue.dev -> continue.dev 2026-01-30 15:47:00 -08:00
rules.mdx chore: hub.continue.dev -> continue.dev 2026-01-30 15:47:00 -08:00
telemetry.mdx update icons 2026-01-30 17:34:52 -08:00