fix: The one-line picker change hides unauthenticated catalog rows in #74530
Conversation
|
Codex review: needs maintainer review before merge. What this changes: The PR adds a synchronous runtime auth availability helper, routes model-provider visibility through it, and adds regression coverage for implicit Bedrock AWS SDK auth and local no-key custom providers in model picker and allowlist flows. Maintainer follow-up before merge: This is already an open implementation PR with a plausible narrow fix; the remaining action is maintainer review, rebase/merge judgment, and validation rather than a separate automated repair branch. Security review: Security review cleared: The diff changes local model-auth availability logic and tests only; it does not touch dependencies, CI, package metadata, downloads, release scripts, or secret material storage. Review detailsBest possible solution: Land a narrow fix that makes provider visibility reuse runtime-valid auth semantics for Bedrock AWS SDK and synthetic local providers, while keeping current main’s shared configured/auth-available catalog policy and explicit full-catalog browse paths intact. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against f05b78973600. |
…openclaw#74530) Co-authored-by: openclaw-clawsweeper[bot] <280122609+openclaw-clawsweeper[bot]@users.noreply.github.com>
…openclaw#74530) Co-authored-by: openclaw-clawsweeper[bot] <280122609+openclaw-clawsweeper[bot]@users.noreply.github.com>
…openclaw#74530) Co-authored-by: openclaw-clawsweeper[bot] <280122609+openclaw-clawsweeper[bot]@users.noreply.github.com>
…openclaw#74530) Co-authored-by: openclaw-clawsweeper[bot] <280122609+openclaw-clawsweeper[bot]@users.noreply.github.com>
…openclaw#74530) Co-authored-by: openclaw-clawsweeper[bot] <280122609+openclaw-clawsweeper[bot]@users.noreply.github.com>
Summary
The one-line picker change hides unauthenticated catalog rows in
promptDefaultModel/promptModelAllowlist, but it leaves the issue’s named/modelsand Web chat dropdown paths on the existing full-catalog behavior. It also makes the picker auth predicate stricter than runtime auth, hiding valid keyless/AWS-SDK providers.What ClawSweeper Is Fixing
/modelsstill use the full catalog path (bug)src/gateway/server-methods/models.ts:52/modelsand the Web chat dropdown. Web chat requestsmodels.listwith{ view: "configured" }inui/src/ui/controllers/models.ts:13, then renders every returned catalog entry inui/src/ui/chat-model-select-state.ts:71. The Gateway handler still falls back toallowed.allowedCatalogorcatalog, andbuildAllowedModelSetWithFallbacksreturns the fullcatalogwhenagents.defaults.modelsis empty atsrc/agents/model-selection-shared.ts:586. Text/modelsseparately loads the full catalog insrc/auto-reply/reply/commands-models.ts:72and adds everyallowed.allowedCatalogrow./modelsand Web chat model dropdown show full catalog (900+ models) instead of only configured providers #74423 without fixing the bug it claims to fix.models.list, Web chat, text/models, and the interactive picker. Keep a separate explicitallpath for full-catalog discovery.src/flows/model-picker.ts:297hasAuthForProvider, which only checks auth profiles, env API keys, and usable custom API keys atsrc/flows/model-picker.ts:76. Runtime’s broader auth availability helper accepts additional valid cases:auth: "aws-sdk", synthetic local provider auth, and implicitamazon-bedrockAWS SDK auth atsrc/agents/model-auth.ts:717. Bedrock docs explicitly say noapiKeyis required when configured withauth: "aws-sdk".hasAvailableAuthForProvider, including AWS SDK and synthetic local auth semantics, and add targeted tests foramazon-bedrockand local no-key custom providers.src/commands/model-picker.test.ts:162pnpm test src/commands/model-picker.test.tsfails 15 of 41 tests. Failures show catalog options becoming empty or missing after the new early return, including default model picker, allowlist, static manifest rows, configured provider rows, and router filtering cases.Expected Repair Surface
src/gateway/server-methods/models.tssrc/flows/model-picker.tssrc/commands/model-picker.test.tsSource And Review Context
ClawSweeper report: https://github.com/openclaw/clawsweeper/blob/main/records/openclaw-openclaw/commits/2bb16f771bb192a150bb7ca2e9a82db461b07ac6.md
Commit under review: 2bb16f7
Latest main at intake: 2a7d83b
Original commit author: jindongfu
GitHub author: @SymbolStar
Highest severity: medium
Review confidence: high
Diff:
e3af6fb3c884336d5cd4a15aec4e0dfe3e267b5c..2bb16f771bb192a150bb7ca2e9a82db461b07ac6Changed files:
src/flows/model-picker.tsCode read: full changed file, auth resolution helpers, Gateway model listing, Web chat model loading/rendering, text
/modelscommand, model allowlist resolution, related tests/docs.Issue context:
gh issue view 74423 --repo openclaw/openclawExpected validation
pnpm check:changedClawSweeper already ran:
pnpm docs:listsucceeded.pnpm test src/commands/model-picker.test.tsfailed initially becausenode_moduleswas missing.pnpm installsucceeded.pnpm test src/commands/model-picker.test.tsfailed: 15 failed, 26 passed.pnpm test src/gateway/server.models-voicewake-misc.test.ts src/auto-reply/reply/commands-models.test.ts ui/src/ui/controllers/models.test.ts ui/src/ui/chat-model-select-state.test.tspassed, but those tests still encode the unfixed Gateway/UI/chat-command behavior.git diff --check e3af6fb3c884336d5cd4a15aec4e0dfe3e267b5c..2bb16f771bb192a150bb7ca2e9a82db461b07ac6passed.Known review limits:
ClawSweeper Guardrails
mainbefore changing code.ClawSweeper 🐠 replacement reef notes:
fish notes: model gpt-5.5, reasoning medium; reviewed against 23fa618.