Adopt the code-review findings and reconcile every writer with the official
Model Studio docs (with cc-switch / each agent's own docs as secondary refs).
- qwen-code: drop deprecated security.auth.apiKey/baseUrl (keep only
selectedType), restore $version:3, model:{name}; env BAILIAN_API_KEY.
- codex: official env_key="OPENAI_API_KEY" structure (drop requires_openai_auth
/ model_reasoning_effort / disable_response_storage); respect $CODEX_HOME.
- hermes: revert to official flat model.* block; api_mode only for anthropic
endpoints (omitted for OpenAI-compatible).
- opencode: drop setCacheKey; target existing opencode.jsonc when present.
- openclaw: stop hardcoding 1M contextWindow; add optional --context-window;
add agents.defaults.models.
- claude-code: respect $CLAUDE_CONFIG_DIR.
- utils: on parse failure, throw and keep the original file (no silent wipe).
- tests: rewrite writer unit tests + add missing-flag e2e for every required
flag; regenerate skill reference; document `bl config agent` in READMEs.
- add Token Plan subscription and login entry to CLI, README, INSTALL, and skill
- document built-in Base URL and automatic key validation
- remove the completed Token Plan integration design document
Add `bl config agent` to configure a coding agent (Claude Code, Qwen Code,
OpenCode, OpenClaw, Hermes, Codex) to use a DashScope/ModelStudio endpoint
with a single command. Writers non-destructively merge into each agent's
local config with a timestamped backup and atomic writes.
- Field structures aligned to farion1231/cc-switch; qwen-code aligned to
QwenLM/qwen-code source (modelProviders/security.auth keyed by protocol).
- provider id unified as `bailian-cli` (qwen-code brands via model entry
name + BAILIAN_CLI_API_KEY, since it keys by protocol).
- Codex config.toml merged via smol-toml to preserve unrelated settings.
- Add writer unit tests + config e2e cases; regenerate skill reference.
- persist the active profile in config.json
- resolve config with --config > active_config > default
- add config list and config use commands
- make auth and config writes target the selected profile
- reset activation to default when deleting the active profile
- update config UI with profile activation controls
- keep token refresh and pipeline execution profile-aware
- add loader, UI, auth, and CLI interaction coverage
- add the built-in Token Plan profile preset
- validate and persist model API keys atomically
- materialize the default Base URL and models on login
- preserve flag > env > config precedence
- scope bl preference to matched Bailian and multimodal tasks
- ask once before provider-neutral remote or billable calls
- avoid routing ordinary text, generic search, and ambiguous usage requests to bl