Decision: One CLI name per credential
Status: implemented Implemented: 2026-09-30 Related: 2026-09-30-credential-resolution-priority.md, 2026-09-29-config-init-wizard.md, 2026-09-29-pluggable-coding-agent-backend.md
Problem
abx config list showed two LLM profiles (qwen_code_* and llm_*) and a sandbox key named api_key. The two API keys are the same kind of OpenAI-compatible credential, and api_key does not say which service it authenticates. Users had to guess which key to set.
Decision
The CLI config surface keeps one name per credential:
sandbox_api_keyis the sandbox control-plane key. It is still stored asE2B_API_KEYin~/.abx/.env. Process environment order staysE2B_API_KEYthenSANDBOX_API_KEY.config get/config set api_keyis an alias and is not listed.llm_api_key,llm_base_url, andllm_modelare the only LLM profile, used by NL inference and the coding agent (including Qwen Code).qwen_code_api_key,qwen_code_base_url, andqwen_code_modelare rejected with a pointer at thellm_*replacement.- When an
llm_*value is unset, an olderABX_QWEN_CODE_API_KEYor storedqwen_code_base_url/qwen_code_modelis still read and displayed under thellm_*name. Setting thellm_*key drops that older copy. - Which of those values wins at use time is 2026-09-30-credential-resolution-priority.md.
The Python SDK parameter stays api_key= so E2B-compatible call sites do not change.
API Design
CLI keys (abx config get / abx config set / abx config list):
sandbox_api_key: str→ envE2B_API_KEY. Alias:api_key.llm_api_key: str→ envABX_LLM_API_KEY.llm_base_url: str, default DashScope compatible-mode.llm_model: str, defaultqwen3-coder-plus.
SDK: Sandbox.create(api_key=...) is unchanged.
Alternatives considered
- Rename
TransportConfig.api_keyand every SDK parameter tosandbox_api_key. Rejected: that breaks the E2B-compatible public API for a CLI labeling problem. - Keep listing both
api_keyandsandbox_api_key. Rejected: the list would still show two names for one secret. - Drop
llm_base_urlandllm_modelas well. Rejected: the endpoint and model are not a second API key; users with a custom OpenAI-compatible endpoint still need one place to set them. - Delete older
qwen_code_*files onconfig list. Rejected: listing must not rewrite secrets. Read-time fallback preserves a working install.
Dependencies
agent_sandbox.cli.commands.config_cmd, agent_sandbox.cli.commands._coding_agent, agent_sandbox.agent.qwen_code (default base URL and model).
Test Strategy
CLI tests cover the alias, the removed-key error, legacy ABX_QWEN_CODE_API_KEY / qwen_code_base_url / qwen_code_model read as llm_*, and llm_api_key winning when both secrets exist. Golden files for config list, config get, config set, and config init are regenerated.
Acceptance criteria
abx config listdoes not printapi_keyor anyqwen_code_*key.abx config listprintssandbox_api_key,llm_api_key,llm_base_url, andllm_model.abx config set api_keystill writesE2B_API_KEY.abx config set qwen_code_api_keyexits 2 and namesllm_api_key.- A machine that only has
ABX_QWEN_CODE_API_KEYstill resolves that value asllm_api_key.