openclaw/src
Gustavo Madeira Santana 22927b0834
fix: infer --auth-choice from API key flags during non-interactive onboarding (#9241)
* fix: infer --auth-choice from API key flags during non-interactive onboarding

When --anthropic-api-key (or other provider key flags) is passed without
an explicit --auth-choice, the auth choice defaults to "skip", silently
discarding the API key. This means the gateway starts without credentials
and fails on every inbound message with "No API key found for provider".

Add inferAuthChoiceFromFlags() to derive the correct auth choice from
whichever provider API key flag was supplied, so credentials are persisted
to auth-profiles.json as expected.

Fixes #8481

* fix: infer auth choice from API key flags (#8484) (thanks @f-trycua)

* refactor: centralize auth choice inference flags (#8484) (thanks @f-trycua)

---------

Co-authored-by: f-trycua <f@trycua.com>
2026-02-04 20:38:46 -05:00
..
acp chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
agents Message: clarify media schema + fix MEDIA newline 2026-02-04 19:59:15 -05:00
auto-reply fix: enforce owner allowlist for commands 2026-02-04 20:05:08 -05:00
browser Make openclaw consistent in this file (#8533) 2026-02-04 00:02:25 -05:00
canvas-host chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
channels feat: per-channel responsePrefix override (#9001) 2026-02-04 16:16:34 -05:00
cli update: use shared completion helpers for shell completion setup 2026-02-04 19:51:06 +00:00
commands fix: infer --auth-choice from API key flags during non-interactive onboarding (#9241) 2026-02-04 20:38:46 -05:00
compat refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
config Security: owner-only tools + command auth hardening (#9202) 2026-02-04 19:49:36 -05:00
cron fix: force reload cron store 2026-02-04 04:24:04 -08:00
daemon chore: Enable `no-unnecessary-template-expression` lint rule. 2026-02-02 15:37:05 +09:00
discord Discord: allow disabling thread starter context 2026-02-04 13:25:56 -08:00
docs Docs: landing page revamp (#8885) 2026-02-04 10:37:14 -05:00
feishu feat: per-channel responsePrefix override (#9001) 2026-02-04 16:16:34 -05:00
gateway Security: Prevent gateway credential exfiltration via URL override (#9179) 2026-02-04 18:59:44 -05:00
hooks fix: harden plugin and hook install paths 2026-02-02 02:07:47 -08:00
imessage feat: per-channel responsePrefix override (#9001) 2026-02-04 16:16:34 -05:00
infra Message: clarify media schema + fix MEDIA newline 2026-02-04 19:59:15 -05:00
line feat: per-channel responsePrefix override (#9001) 2026-02-04 16:16:34 -05:00
link-understanding chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
logging chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
macos chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
markdown chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
media fix: expand SSRF guard coverage 2026-02-02 04:58:32 -08:00
media-understanding fix: Remove `tsconfig.oxlint.json` AGAIN. 2026-02-03 21:53:48 +09:00
memory chore: fix lint warnings 2026-02-02 23:45:05 -08:00
node-host fix: harden Windows exec allowlist 2026-02-03 09:34:25 -08:00
pairing chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
plugin-sdk feat: per-channel responsePrefix override (#9001) 2026-02-04 16:16:34 -05:00
plugins chore: Migrate to tsdown, speed up JS bundling by ~10x (thanks @hyf0). 2026-02-03 20:18:16 +09:00
process fix: skip extension append if command already has one 2026-01-31 20:39:33 -06:00
providers chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
routing chore: fix lint, and format after lint to catch reformats triggered by autofixes. 2026-02-01 13:19:06 +09:00
scripts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
security fix(security): separate untrusted channel metadata from system prompt (thanks @KonstantinMirin) 2026-02-03 23:02:45 -08:00
sessions chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
shared/text chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
signal feat: per-channel responsePrefix override (#9001) 2026-02-04 16:16:34 -05:00
slack feat: per-channel responsePrefix override (#9001) 2026-02-04 16:16:34 -05:00
telegram Telegram: remove last @ts-nocheck from bot-handlers.ts (#9206) 2026-02-05 00:58:49 +00:00
terminal fix: error handling in restore failure reporting 2026-02-03 06:22:51 +00:00
test-helpers refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
test-utils chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
tts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
tui Tests: restore TUI gateway env 2026-02-04 19:09:52 -05:00
types fix: update pi packages to 0.51.0, remove bogus type augmentation 2026-02-02 01:52:33 +01:00
utils Memory: parse quoted qmd command 2026-02-02 23:45:05 -08:00
web feat: per-channel responsePrefix override (#9001) 2026-02-04 16:16:34 -05:00
whatsapp chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
wizard onboard: use shared completion helpers for shell completion setup 2026-02-04 19:51:06 +00:00
channel-web.barrel.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
channel-web.ts refactor!: rename chat providers to channels 2026-01-13 08:40:39 +00:00
docker-setup.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
entry.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
extensionAPI.ts chore: Migrate to tsdown, speed up JS bundling by ~10x (thanks @hyf0). 2026-02-03 20:18:16 +09:00
globals.test.ts chore: format to 2-space and bump changelog 2025-11-26 00:53:53 +01:00
globals.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
index.test.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
index.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
logger.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
logger.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
logging.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
polls.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
polls.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
runtime.ts CLI: restore terminal state on exit 2026-02-03 06:10:19 +00:00
utils.test.ts chore: Enable `typescript/no-explicit-any` rule. 2026-02-02 16:18:09 +09:00
utils.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
version.ts fix: improve build-info resolution for commit/version 2026-02-03 17:31:51 -08:00