[codex] fix(config): apply config.ts to YAML configs#12020
[codex] fix(config): apply config.ts to YAML configs#12020yzlu0917 wants to merge 1 commit intocontinuedev:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d59b0313c7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const withConfigTs = await applyConfigTsAndRemoteConfig({ | ||
| config: withShared, | ||
| ide, |
There was a problem hiding this comment.
Apply config.ts before converting YAML to ContinueConfig
applyConfigTsAndRemoteConfig is being called with withShared here, but withShared is a ContinueConfig (with modelsByRole), while user config.ts files are authored against Config (with models, tabAutocompleteModel, embeddingsProvider, etc.). For YAML-based profiles, common modifyConfig logic like config.models.push(...) will throw or no-op at runtime, and the error is swallowed in applyConfigTsAndRemoteConfig, so user config mutations are silently skipped. This means the new YAML support only works for overlapping fields and breaks the primary model-editing use case.
Useful? React with 👍 / 👎.
Summary
core/config/load.tsmodifyConfigruns forconfig.yamlusers tooWhy
config.tssupport was only wired into the legacy JSON config loader. When users had aconfig.yamlpresent, Continue skipped the JSON loader entirely, somodifyConfignever ran even though the file was discovered and watched. That made programmatic config extensions effectively unavailable for YAML-based setups.Validation
./node_modules/.bin/vitest run config/yaml/loadContinueConfigFromYaml.vitest.tsincoregit diff --check./node_modules/.bin/tsc -p ./ --noEmitincore; the only remaining failure is an existing unrelated repo issue inllm/llms/OpenRouter.ts(OPENROUTER_HEADERSexport mismatch)Closes #9617
Summary by cubic
Applies config.ts modifiers to YAML configs so
modifyConfigruns forconfig.yamlusers. Extracts a shared helper to run localconfig.tsand remoteconfig.js, and wires it into the YAML loader.applyConfigTsAndRemoteConfigincore/config/load.tsto runmodifyConfigfrom localconfig.tsand remoteconfig.js.core/config/yaml/loadYaml.tsso YAML configs match JSON behavior.core/config/yaml/loadContinueConfigFromYaml.vitest.tsto assert modifiers are applied.Written for commit d59b031. Summary will update on new commits.