refactor: centralize config — auth.toml for secrets, config.yaml for settings#210
Merged
Conversation
… for settings - auth.toml now stores ONLY api_key (secret) - Provider info (provider/model/base_url) moved to ~/.cora/config.yaml - Auto-migration: auth.toml provider info → config.yaml on first run - CORA_API_KEY env var restored for CI usage - config show: reads from merged config (config.yaml + .cora.yaml) - config show --global: shows ~/.cora/config.yaml only - config show --project: shows .cora.yaml only - config set --global: writes to config.yaml (provider info) - build_llm_config: reads provider from config.yaml via load_config Closes #209
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
Separate concerns: secrets in auth.toml, settings in config.yaml. Fixes #209.
Changes
Config separation
auth.tomlnow stores ONLYapi_key(secret)~/.cora/config.yamlCORA_API_KEY for CI
CORA_API_KEYenv var support (read by clap--api-keyflag)cora auth login→ auth.tomlconfig show improvements
cora config show— shows fully merged effective configcora config show --global— shows~/.cora/config.yamlonlycora config show --project— shows.cora.yamlonlyconfig set writes to correct location
cora config set --global provider zai→ writes to~/.cora/config.yamlcora config set provider zai→ writes to.cora.yaml(project)File Roles
~/.cora/auth.tomlapi_keyONLY~/.cora/config.yaml.cora.yamlCORA_API_KEYenv varTest Plan
cora config showshows zai (from config.yaml)cora config show --globalshows config.yaml contentscora config show --projectshows .cora.yaml or "not found"cora review --streamsends to zai (glm-5.1) correctlyCloses #209