openclaw/src
Kai fd29a9cbde fix: normalizeProviders flip-flop bug when using env var apiKey references
Removes reverse-lookup logic that converts resolved apiKey values back to
env var names, causing models.json to flip-flop on successive normalizations.

Bug: When openclaw.json configures apiKey using { source: 'env' }, the
resolved value is written to models.json. On next normalization, the code
detects the resolved value matches an env var and converts it back to the
env var name, causing instability.

Fix: Delete lines 504-519 in models-config.providers.ts that perform the
reverse-lookup conversion. models.json should contain resolved values, not
env var names.

Test: Add models-config.providers.flipflop.test.ts demonstrating the bug
and verifying the fix preserves resolved values and manual edits.

Related: #14808 (security: plaintext in cache), #11202 (keys in prompt)
2026-03-15 23:39:21 +11:00
..
acp test: dedupe acp translator cancel scoping tests 2026-03-13 21:40:53 +00:00
agents fix: normalizeProviders flip-flop bug when using env var apiKey references 2026-03-15 23:39:21 +11:00
auto-reply fix: persist context-engine auto-compaction counts (#42629) 2026-03-14 16:22:10 -07:00
browser browser: drop headless/remote MCP attach modes, simplify existing-session to autoConnect-only (#46628) 2026-03-14 15:54:22 -07:00
canvas-host Fix full local gate on main 2026-03-14 15:52:11 -05:00
channels Fix configure startup stalls from outbound send-deps imports (#46301) 2026-03-14 09:58:03 -07:00
cli fix(gateway/cli): relax local backend self-pairing and harden launchd restarts (#46290) 2026-03-14 14:27:52 -04:00
commands feat(provider): support new model zai glm-5-turbo, performs better for openclaw (openclaw#46670) 2026-03-14 20:19:41 -05:00
compat
config feat: make compaction timeout configurable via agents.defaults.compaction.timeoutSeconds (#46889) 2026-03-15 12:04:48 +05:30
context-engine
cron refactor: remove channel shim directories, point all imports to extensions (#45967) 2026-03-14 03:43:07 -07:00
daemon fix(gateway/cli): relax local backend self-pairing and harden launchd restarts (#46290) 2026-03-14 14:27:52 -04:00
docs
gateway fix(gateway): skip Control UI pairing when auth.mode=none (closes #42931) (#47148) 2026-03-15 13:03:39 +01:00
hooks
i18n
infra fix: forward forceDocument through sendPayload path (follow-up to #45111) (#47119) 2026-03-15 17:23:53 +08:00
line fix: resolve current ci regressions 2026-03-14 00:51:12 +00:00
link-understanding
logging
markdown
media feat: add --force-document to message.send for Telegram (bypass sendPhoto + image optimizer) (#45111) 2026-03-14 19:43:49 +08:00
media-understanding
memory Fix test environment regressions on main 2026-03-14 14:26:22 -05:00
node-host fix(node): remove debug console.log on node host startup 2026-03-14 21:17:48 +01:00
pairing test: share pairing setup resolution assertions 2026-03-13 23:35:28 +00:00
plugin-sdk feat(feishu): structured cards with identity header, note footer, and streaming enhancements (openclaw#29938) 2026-03-14 20:31:46 -05:00
plugins fix(plugins): prefer explicit installs over bundled duplicates (#46722) 2026-03-14 21:08:32 -05:00
process fix(windows): add windowsHide to detached spawn calls to suppress console windows (#44693) 2026-03-13 21:06:33 +00:00
providers
routing
scripts
secrets refactor: share secrets audit model fixtures 2026-03-13 20:37:53 +00:00
security External content: sanitize wrapped metadata (#46816) 2026-03-14 23:06:30 -07:00
sessions
shared Gateway: treat scope-limited probe RPC as degraded reachability (#45622) 2026-03-13 23:13:33 -05:00
terminal refactor: share terminal note wrapping 2026-03-14 01:41:16 +00:00
test-helpers test: share whatsapp outbound poll fixtures 2026-03-14 01:41:17 +00:00
test-utils refactor: remove channel shim directories, point all imports to extensions (#45967) 2026-03-14 03:43:07 -07:00
tts fix: forward forceDocument through sendPayload path (follow-up to #45111) (#47119) 2026-03-15 17:23:53 +08:00
tui Add /btw side questions (#45444) 2026-03-14 17:27:54 +02:00
types
utils
whatsapp
wizard
channel-web.ts refactor: remove channel shim directories, point all imports to extensions (#45967) 2026-03-14 03:43:07 -07:00
docker-build-cache.test.ts
docker-image-digests.test.ts
docker-setup.e2e.test.ts test: reduce docker setup e2e duplication 2026-03-13 21:40:53 +00:00
dockerfile.test.ts
entry.ts
entry.version-fast-path.test.ts
extensionAPI.ts
globals.ts
index.ts
install-sh-version.test.ts
logger.test.ts
logger.ts
logging.ts
param-key.ts refactor: share snake case param lookup 2026-03-13 21:40:53 +00:00
poll-params.test.ts
poll-params.ts refactor: share snake case param lookup 2026-03-13 21:40:53 +00:00
polls.test.ts
polls.ts
runtime.ts
utils.test.ts Fix full local gate on main 2026-03-14 15:52:11 -05:00
utils.ts refactor: dedupe home relative path resolution 2026-03-13 21:40:53 +00:00
version.test.ts
version.ts