Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #12633
The CLI does not expand
AUTODETECTmodel entries into actual model names before sending API requests. When a user configures Ollama (or any provider) withmodel: AUTODETECTin their config, the VS Code and JetBrains extensions calllistModels()to discover available models and replace the placeholder. The CLI skips this step entirely, sending literal"AUTODETECT"as the model name in chat completion requests, which causes 400 errors from the provider.Root cause
The CLI has its own config loading pipeline (
configLoader.ts->ModelService.ts) that is separate from the extension path (core/config/load.ts,core/config/yaml/models.ts). The extension path checks formodel === "AUTODETECT"and callslistModels()to expand it into real model entries. The CLI'sModelService.doInitialize()passes the rawModelConfig[]from the unrolled assistant config directly tocreateLlmApi()without checking for or expanding AUTODETECT entries.Changes
expandAutodetectModels()toModelService.tsthat iterates model configs, detects entries withmodel: "AUTODETECT", creates a temporary LLM API client, callslist()to discover available models, and replaces each AUTODETECT entry with concrete model configsdoInitialize()before model filtering and selectionWhat this doesn't change
core/config/load.tsandcore/config/yaml/models.tsis untouchedChecklist
Tests
extensions/cli/src/services/ModelService.test.ts- new test cases for AUTODETECT expansionmodel: AUTODETECTin~/.continue/config.yaml, runcontinue chat, verify models are listed and requests succeedSummary by cubic
The CLI now expands
AUTODETECTmodel entries into real model names before calling providers, matching extension behavior and preventing 400 errors when using sources like Ollama.expandAutodetectModels()inModelService.tsto resolveAUTODETECTvialist()and replace with concrete model configs.doInitialize()before model filtering/selection; skips work if noAUTODETECTentries.AUTODETECTfrom provider responses.Written for commit 3051179. Summary will update on new commits.