continue-custom/docs/guides
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
..
cloud-agents docs: restructure checks section and update docs content 2026-02-16 23:16:52 -08:00
atlassian-mcp-continue-cookbook.mdx feat(cli): curl/irl installation scripts and docs (#9835) 2026-02-05 19:07:57 -08:00
chrome-devtools-mcp-performance.mdx feat(cli): curl/irl installation scripts and docs (#9835) 2026-02-05 19:07:57 -08:00
cli.mdx feat(cli): curl/irl installation scripts and docs (#9835) 2026-02-05 19:07:57 -08:00
codebase-documentation-awareness.mdx chore: hub.continue.dev -> continue.dev 2026-01-30 15:47:00 -08:00
configuring-models-rules-tools.mdx chore: hub.continue.dev -> continue.dev 2026-01-30 15:47:00 -08:00
continue-docs-mcp-cookbook.mdx docs: fix 28 broken internal links across documentation 2026-02-17 17:43:43 -08:00
continuous-ai-readiness-assessment.mdx Fix sidebar title 2025-09-04 10:38:13 -04:00
continuous-ai.mdx feat(cli): curl/irl installation scripts and docs (#9835) 2026-02-05 19:07:57 -08:00
custom-code-rag.mdx docs: updates to reflect product simplifications (#7357) 2025-08-28 15:33:07 -07:00
dlt-mcp-continue-cookbook.mdx docs updates 2026-02-16 13:19:21 -08:00
doc-writing-agent-cli.mdx feat(cli): curl/irl installation scripts and docs (#9835) 2026-02-05 19:07:57 -08:00
github-mcp-continue-cookbook.mdx feat(cli): curl/irl installation scripts and docs (#9835) 2026-02-05 19:07:57 -08:00
github-pr-review-bot.mdx chore: hub.continue.dev -> continue.dev 2026-01-30 15:47:00 -08:00
how-to-self-host-a-model.mdx docs: improve SSL certificate troubleshooting guidance (#11354) 2026-03-19 15:50:18 -07:00
instinct.mdx chore: hub.continue.dev -> continue.dev 2026-01-30 15:47:00 -08:00
klavis-mcp-continue-cookbook.mdx feat(cli): curl/irl installation scripts and docs (#9835) 2026-02-05 19:07:57 -08:00
netlify-mcp-continuous-deployment.mdx feat(cli): curl/irl installation scripts and docs (#9835) 2026-02-05 19:07:57 -08:00
notion-continue-guide.mdx docs updates 2026-02-16 13:19:21 -08:00
ollama-guide.mdx fix: respect contextLength from YAML model config (#11807) 2026-03-25 12:26:52 -07:00
overview.mdx docs: cloud agent guides (#9495) 2026-01-13 16:10:43 -08:00
plan-mode-guide.mdx some initial changes 2025-10-13 21:02:25 -07:00
posthog-github-continuous-ai.mdx docs: fix 28 broken internal links across documentation 2026-02-17 17:43:43 -08:00
run-agents-locally.mdx docs: restructure checks section and update docs content 2026-02-16 23:16:52 -08:00
running-continue-without-internet.mdx docs: update offline guide with correct links and config.yaml references (#7715) 2025-09-11 16:50:54 -07:00
sanity-mcp-continue-cookbook.mdx docs updates 2026-02-16 13:19:21 -08:00
sentry-mcp-error-monitoring.mdx feat(cli): curl/irl installation scripts and docs (#9835) 2026-02-05 19:07:57 -08:00
snyk-mcp-continue-cookbook.mdx feat(cli): curl/irl installation scripts and docs (#9835) 2026-02-05 19:07:57 -08:00
supabase-mcp-database-workflow.mdx feat(cli): curl/irl installation scripts and docs (#9835) 2026-02-05 19:07:57 -08:00
understanding-configs.mdx chore: hub.continue.dev -> continue.dev 2026-01-30 15:47:00 -08:00