Skip to content

[codex] fix(config): apply config.ts to YAML configs#12020

Open
yzlu0917 wants to merge 1 commit intocontinuedev:mainfrom
yzlu0917:codex/issue-9617-config-ts-yaml
Open

[codex] fix(config): apply config.ts to YAML configs#12020
yzlu0917 wants to merge 1 commit intocontinuedev:mainfrom
yzlu0917:codex/issue-9617-config-ts-yaml

Conversation

@yzlu0917
Copy link
Copy Markdown

@yzlu0917 yzlu0917 commented Apr 3, 2026

Summary

  • extract config.ts / remote config.js application into a shared helper in core/config/load.ts
  • apply that helper to the YAML config loader so modifyConfig runs for config.yaml users too
  • add a regression test covering the YAML path and asserting config.ts modifiers are applied

Why

config.ts support was only wired into the legacy JSON config loader. When users had a config.yaml present, Continue skipped the JSON loader entirely, so modifyConfig never ran even though the file was discovered and watched. That made programmatic config extensions effectively unavailable for YAML-based setups.

Validation

  • ran ./node_modules/.bin/vitest run config/yaml/loadContinueConfigFromYaml.vitest.ts in core
  • ran git diff --check
  • ran ./node_modules/.bin/tsc -p ./ --noEmit in core; the only remaining failure is an existing unrelated repo issue in llm/llms/OpenRouter.ts (OPENROUTER_HEADERS export mismatch)

Closes #9617


Summary by cubic

Applies config.ts modifiers to YAML configs so modifyConfig runs for config.yaml users. Extracts a shared helper to run local config.ts and remote config.js, and wires it into the YAML loader.

  • Bug Fixes
    • Added applyConfigTsAndRemoteConfig in core/config/load.ts to run modifyConfig from local config.ts and remote config.js.
    • Used the helper in core/config/yaml/loadYaml.ts so YAML configs match JSON behavior.
    • Added core/config/yaml/loadContinueConfigFromYaml.vitest.ts to assert modifiers are applied.

Written for commit d59b031. Summary will update on new commits.

@yzlu0917 yzlu0917 requested a review from a team as a code owner April 3, 2026 07:25
@yzlu0917 yzlu0917 requested review from sestinj and removed request for a team April 3, 2026 07:25
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 3, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +496 to +498
const withConfigTs = await applyConfigTsAndRemoteConfig({
config: withShared,
ide,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

modifyConfig in config.ts / config.js is not being executed on Windows

1 participant