Files
codewhale/crates/tui
hongchen1993 c84292235f feat(config): prefer dispatcher-provided API key over saved DeepSeek key when source is cli
When the CLI dispatcher launches the interactive TUI with an explicit
`--api-key` argument (e.g. for a DeepSeek-compatible subscription
endpoint), the environment variable `DEEPSEEK_API_KEY` carries the
intended key with `DEEPSEEK_API_KEY_SOURCE=cli`. Previously the
saved root `api_key` in config.toml always won over this env override
for the DeepSeek provider, blocking users from running:

    codewhale --provider deepseek \
      --api-key ark-... --base-url https://... --model auto

This change gives the dispatcher-supplied env key priority when the
source marker is `cli`, keeping full backward compatibility for
normal config-file or keyring paths, and also cleaning up a `***`
literal in an unrelated test.
2026-06-09 11:48:59 +08:00
..
2026-06-06 19:39:02 -07:00