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 `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
- Removed the `bailian-cli-commands` dependency from `pnpm-lock.yaml` and `package.json` as it was no longer needed.
- Expanded the E2E tests in `auth.e2e.test.ts` to cover additional scenarios for the `auth login` command, ensuring proper error handling for conflicting flags and missing parameters.
- Improved test assertions for better clarity and coverage of authentication flows.
- Deleted the `token-plan.e2e.test.ts` file as it contained outdated test cases.
- Introduced `TOKEN_PLAN_ROUTES` in `topic-routes.ts` to define new command routes for token-plan operations.
- This update streamlines the E2E testing structure and prepares for future enhancements.
- Replaced hardcoded command paths with dynamic route mappings in E2E tests.
- Enhanced documentation for command testing, specifying minimum route requirements.
- Consolidated command path management into `topic-routes.ts` for better maintainability.
- Updated various E2E test cases to utilize the new routing structure, ensuring consistency across tests.
- Removed redundant helper functions and improved test clarity by directly referencing route exports.
- Added e2e package as a workspace dependency in pnpm-lock.yaml.
- Updated globalSetup path in vite.config.ts to point to the new e2e package location.
- Enhanced documentation for CLI E2E testing, including architecture layers and triggering conditions.
- Refactored test paths and commands in the documentation to align with the new structure.
- Removed outdated dataset and auth E2E tests to streamline the test suite.
- Updated command references and validation checks in the documentation to reflect recent changes.