Finish the default_/bare-noun config naming scheme#720
Merged
Conversation
Completes the convention started by the AGENT_BACKEND -> DEFAULT_BACKEND rename: a `default_` prefix marks an installation default (global) and a bare noun marks the per-user override. Four key groups move, each with a one-release back-compat read window and a one-shot deprecation warning: - per-user backend: UserConfig.default_backend -> backend, users.yaml key default_backend -> backend (read chain backend, default_backend, agent_backend; the key was renamed twice). - per-user provider: UserConfig.llm_provider -> provider, users.yaml key llm_provider -> provider. - global provider: Config.llm_provider -> default_provider, env LLM_PROVIDER -> DEFAULT_PROVIDER, with apply-time install.conf migration. - global timeout: Config.agent_timeout_seconds -> default_timeout, env AGENT_TIMEOUT_SECONDS -> DEFAULT_TIMEOUT, with apply-time migration. The older CLAUDE_TIMEOUT_SECONDS step is removed entirely (read fallback, wizard prefill, apply migration, deprecated-env map entry). _resolve_default_backend is generalized into _resolve_renamed_key, which takes an ordered legacy-key list and is the single back-compat implementation for every reader (env, install.conf dict, users.yaml entry). A new _entry_provider mirrors _entry_backend so both per-user provider read sites (the runtime loader and the wizard goose-provider scanner) resolve through the same chain. The two eval-time provider readers (behavioral eval, memory backend gate) share a new _resolve_eval_provider helper so neither bypasses the rename window. Effective-param names that hold a post-cascade runtime value are left unchanged; only config fields, env vars, and users.yaml keys move. Templates, README, and tests are updated; back-compat tests cover each legacy read, the apply-time migrations, and the inheritance cascade.
Two review fixes for the config-naming PR: - Memory backend gate: stamp the resolved eval-time provider into the per-backend config (`make_backend_config` now sets default_provider), so the extraction path resolves the same (backend, provider) pair the run summary reports. Without it, a goose/opencode arm run from an install whose global backend is single-provider (claude/codex) left default_provider="" and extracted with an empty provider while the report showed the resolved one. Completes the gate's provider routing. - Docs: DEFAULT_PROVIDER is required for the multi-provider backends (goose, opencode), not "non-Claude" (which wrongly implies codex), and opencode does use the provider (it selects the model registry), so the users.yaml note no longer says it is ignored for opencode. Reworded README, templates/.env, and templates/users.yaml accordingly.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Finishes the config naming scheme so it is uniform: a
default_prefix marks an installation default (global), a bare noun marks the per-user override. Follow-up to theAGENT_BACKEND->DEFAULT_BACKENDrename in #719.DEFAULT_BACKEND(unchanged)default_backend(unchanged)backendbackendDEFAULT_PROVIDERdefault_providerproviderproviderDEFAULT_MODEL(unchanged)default_model(unchanged)model(unchanged)model(unchanged)DEFAULT_TIMEOUTdefault_timeouttimeout(unchanged)timeout(unchanged)Changes
Four key groups move, each with a one-release back-compat read window and a one-shot deprecation warning:
UserConfig.default_backend->backend; users.yamldefault_backend->backend. Read chainbackend->default_backend->agent_backend(the per-user key was renamed twice, so the oldest name still resolves this release).UserConfig.llm_provider->provider; users.yamlllm_provider->provider.Config.llm_provider->default_provider; envLLM_PROVIDER->DEFAULT_PROVIDER; install.conf key migrated at apply time.Config.agent_timeout_seconds->default_timeout; envAGENT_TIMEOUT_SECONDS->DEFAULT_TIMEOUT; install.conf key migrated at apply time. The olderCLAUDE_TIMEOUT_SECONDSstep is removed entirely (read fallback, wizard prefill, apply migration, and deprecated-env map entry).Mechanism
_resolve_default_backendis generalized into_resolve_renamed_key(get, *, new_key, legacy_keys, context, default), taking an ordered legacy-key list. It is the single back-compat implementation for every reader (process env, install.conf dict, users.yaml entry) and warns once per (context, matched legacy key)._entry_providermirrors_entry_backendso both per-user provider read sites resolve through the same chain: the runtime loader and the installer goose-provider scanner (the scanner previously readllm_providerdirectly, which would have left a migrated install's goose API-key collection blind to the new key)._resolve_eval_providerhelper so neither eval-time reader bypasses the rename window.Effective-param names that hold a post-cascade runtime value are left unchanged; only config fields, env vars, and users.yaml keys move.
Tests
make checkandmake testpass (4598 passed, 1 skipped). New back-compat coverage: legacy env/yaml resolution with warnings for each group, the apply-timeLLM_PROVIDERandAGENT_TIMEOUT_SECONDSmigrations,CLAUDE_TIMEOUT_SECONDSno longer honored, the installer scanners reading all backend keys and the new provider key, and the per-user provider inheritance cascade.Docs
Templates (
.env,users.yaml, goose-config comment) andREADMEupdated to the new names with one-release deprecation notes on the global env table. The wiki update is staged separately and will be pushed after this merges.