Repository navigation
feat(auth): ask before showing restricted provider models - #144468
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 10, 2026, 9:00 PM ET / September 11, 2026, 01:00 UTC (Revision 3). ClawSweeper reviewWhat this changesAdds a shared choice after provider sign-in to show that provider’s restricted models or keep existing restrictions across CLI, private chat, and Control UI. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this protected PR supplies distinct behavior still absent from main. The earlier routing and authorization findings are addressed, and this review found no new blocking defect. Priority: P2 Review scores
Verification
How this fits togetherProvider login saves credentials for OpenClaw’s model connections. The new consent step connects that login flow to the existing model-policy writer, which controls model visibility across clients. flowchart TD
A[CLI or private chat or Control UI] --> B[Provider sign-in]
B --> C[Save credentials]
C --> D{Provider restricted?}
D -->|No| E[Complete login]
D -->|Yes| F[Ask All or Keep]
F -->|Keep| E
F -->|All| G[Recheck authority and current policy]
G --> H[Save policy and report application]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +552, Tests +1044, Docs +61. Total +1657 across 28 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one shared consent owner, preserve existing restrictions and defaults, and retain the documented SDK transition with its All/Keep/cancellation compatibility evidence. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature reproduction verdict: source confirms main lacks this confirmation step, and the PR records concrete restricted-provider All/Keep scenarios. Is this the best way to solve the issue? Yes. Reusing the existing config writer, wizard, and typed command presentation keeps policy decisions centralized while preserving concurrent settings and credential persistence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d841e35101d5. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
933c9d1 to
ac7eabe
Compare
|
landpr-approve-admin-merge |
ac7eabe to
d6cb6aa
Compare
|
landpr-approve-admin-merge |
|
landpr-approve-admin-merge |
|
landpr-approve-unrelated-red |
|
Landed as Proof: Real Telegram Test Server All/Keep choices change
The exact-head review found no code or security defect. The documented SDK post-save selection contract is accepted with package-consumer proof; legacy/default/agent policy tests cover the existing materialization path. No new config key, schema, migration or protocol field was added. Native Discord All passes the registered-command harness; the full native Keep case remains an explicitly accepted pre-login harness gap. No real Discord user-client exchange is claimed. CI: Run 34548349273 completed with 125 passing jobs. Its only failed child was control-ui-performance, job 103105927532: startup JavaScript gzip was 353,134 bytes against a 353,107-byte limit. The aggregate gate failed because of that child. No Android child failed this final run. The UI failure is unrelated to Auth D. A fresh paired build of exact CI base The earlier main run 34547582025, job 103103722226 had the same budget failure at 353,123 bytes before Auth D. Main's later browser change
|
…44468) Save provider credentials before asking whether to expose restricted provider models. Apply only current consent through the existing config writer, preserve defaults and legacy restrictions, recheck live command permission, and distinguish saved policy from confirmed Gateway application. Use shared choices across CLI, chat and Control UI, retain native Discord routing, and close browser authorization before the later consent prompt. Targeted tests, package-consumer checks, real Telegram choices, CLI restart behavior and native Discord All support the change. The remaining native Keep harness limitation is explicitly accepted and documented in the PR. Co-authored-by: Ayaan Zaidi <[email protected]>
## What Problem This Solves Show all after sign-in reported success while fetched account models stayed missing from `/models` (#144468). ## Why This Change Was Made Keep complete discovery in the existing inventory and apply current membership before publication. The decision "whether a provider's declared manual IDs constrain discovered membership under the resolved agent policy" is made by exactly one mechanism at `src/agents/provider-model-membership.ts:24`. Production: 194 added / 67 removed (+127). Growth preserves manual metadata and alias provenance while retaining raw discovery without a second cache or fetch. The helper uses named `cfg`, `agentId` and `normalizeProvider` options; this is the only production adjustment since 771b8cdc. Based on #146317, which updates the same catalog publication owner. ## User Impact Show all exposes fetched models immediately. Keep preserves restrictions. ## Evidence The same Telegram flow shows 8 models before and 10 after the fix, including both account-only rows, without another catalog request. Four Gateway cases cover widening, narrowing, agent overrides and overlapping hooks. All 17 sanitized configuration shapes reached Gateway readiness with fake credentials (one with Tailscale disabled). An installed old-state configuration passed login and both choices. ## Compatibility No stored-state or public API change. Manual lists keep their behavior. No older-host compatibility contract changes. ## Consumers - `/models` and `models.list` adopt recomputed membership. - Prepared model leases receive the same permitted executable rows. - CLI catalog reads and the embedded terminal model list adopt the recomputed membership from the shared catalog owner; their response and display formats are unchanged. This includes the no-Gateway CLI path. ## Invalidation Policy reload rebuilds the projection. Account, provider and plugin changes still invalidate discovery; restart creates a fresh owner. ## Contention No new wait, lock or queue; recomposition stays synchronous. ## Tests Four new cases exercise registered `models.list` and `config.patch`. Existing startup fixtures adopt the internal provenance map. Real Telegram login and choices, catalog, credential-reload and startup checks pass. Co-authored-by: Ayaan Zaidi <[email protected]>
## What Problem This Solves Show all after sign-in reported success while fetched account models stayed missing from `/models` (openclaw#144468). ## Why This Change Was Made Keep complete discovery in the existing inventory and apply current membership before publication. The decision "whether a provider's declared manual IDs constrain discovered membership under the resolved agent policy" is made by exactly one mechanism at `src/agents/provider-model-membership.ts:24`. Production: 194 added / 67 removed (+127). Growth preserves manual metadata and alias provenance while retaining raw discovery without a second cache or fetch. The helper uses named `cfg`, `agentId` and `normalizeProvider` options; this is the only production adjustment since 771b8cdc. Based on openclaw#146317, which updates the same catalog publication owner. ## User Impact Show all exposes fetched models immediately. Keep preserves restrictions. ## Evidence The same Telegram flow shows 8 models before and 10 after the fix, including both account-only rows, without another catalog request. Four Gateway cases cover widening, narrowing, agent overrides and overlapping hooks. All 17 sanitized configuration shapes reached Gateway readiness with fake credentials (one with Tailscale disabled). An installed old-state configuration passed login and both choices. ## Compatibility No stored-state or public API change. Manual lists keep their behavior. No older-host compatibility contract changes. ## Consumers - `/models` and `models.list` adopt recomputed membership. - Prepared model leases receive the same permitted executable rows. - CLI catalog reads and the embedded terminal model list adopt the recomputed membership from the shared catalog owner; their response and display formats are unchanged. This includes the no-Gateway CLI path. ## Invalidation Policy reload rebuilds the projection. Account, provider and plugin changes still invalidate discovery; restart creates a fresh owner. ## Contention No new wait, lock or queue; recomposition stays synchronous. ## Tests Four new cases exercise registered `models.list` and `config.patch`. Existing startup fixtures adopt the internal provenance map. Real Telegram login and choices, catalog, credential-reload and startup checks pass. Co-authored-by: Ayaan Zaidi <[email protected]>
…26.9.5) (#696) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/openclaw/openclaw](https://openclaw.ai) ([source](https://github.com/openclaw/openclaw)) | patch | `2026.9.4` → `2026.9.5` | --- ### Release Notes <details> <summary>openclaw/openclaw (ghcr.io/openclaw/openclaw)</summary> ### [`v2026.9.5`](https://github.com/openclaw/openclaw/releases/tag/v2026.9.5): openclaw 2026.9.5 [Compare Source](openclaw/openclaw@v2026.9.4...v2026.9.5) #### 2026.9.5 ##### Highlights - **Safer upgrades and retained history:** Doctor preserves session history and repeated-repair state, finishes upgrades with invalid retained histories, and avoids repeatedly stalling or stopping a Gateway that is still starting. ([#​149741](openclaw/openclaw#149741), [#​149956](openclaw/openclaw#149956), [#​148901](openclaw/openclaw#148901), [#​149308](openclaw/openclaw#149308), [#​149823](openclaw/openclaw#149823), [#​149760](openclaw/openclaw#149760)) Related [#​149822](openclaw/openclaw#149822) Thanks [@​masatohoshino](https://github.com/masatohoshino). - **Live plugin management:** install and reload supported plugins without restarting the Gateway, update tools in active agent and managed Codex conversations, and manage multiple plugins in one CLI command. ([#​145484](openclaw/openclaw#145484), [#​145710](openclaw/openclaw#145710), [#​145713](openclaw/openclaw#145713), [#​145648](openclaw/openclaw#145648), [#​145917](openclaw/openclaw#145917), [#​149910](openclaw/openclaw#149910)) Related [#​149909](openclaw/openclaw#149909) Thanks [@​obviyus](https://github.com/obviyus). - **Clearer multi-agent work:** distinguish execution from result delivery, use private parent completion handoffs, resume scoped session inventories, and deliver one answer for each steered input. ([#​147571](openclaw/openclaw#147571), [#​147206](openclaw/openclaw#147206), [#​150065](openclaw/openclaw#150065), [#​148051](openclaw/openclaw#148051), [#​149925](openclaw/openclaw#149925)) Related [#​27445](openclaw/openclaw#27445), [#​147955](openclaw/openclaw#147955) Thanks [@​good-warning](https://github.com/good-warning), [@​nicknmorty](https://github.com/nicknmorty), [@​obviyus](https://github.com/obviyus), [@​VACInc](https://github.com/VACInc), and [@​vincentkoc](https://github.com/vincentkoc). - **A desktop-first Systems workspace:** manage Gateway connections through web login and switch saved Gateways independently of Primary, with sidebar switching on iOS and Android. ([#​147519](openclaw/openclaw#147519), [#​148526](openclaw/openclaw#148526), [#​147684](openclaw/openclaw#147684), [#​146641](openclaw/openclaw#146641), [#​148209](openclaw/openclaw#148209)) Related [#​147217](openclaw/openclaw#147217), [#​147576](openclaw/openclaw#147576), [#​148205](openclaw/openclaw#148205) Thanks [@​IWhatsskill](https://github.com/IWhatsskill), [@​Solvely-Colin](https://github.com/Solvely-Colin), and [@​vincentkoc](https://github.com/vincentkoc). - **More flexible live voice:** use GPT Live across calls and meetings, choose account-specific Talk defaults, and change voices during an active Talk or Discord call. ([#​145382](openclaw/openclaw#145382), [#​146546](openclaw/openclaw#146546), [#​146676](openclaw/openclaw#146676)) Related [#​145071](openclaw/openclaw#145071). - **Citations and review in context:** preview cited sources in web and native chats, turn selected chat text into editable comments, reference selected Android review lines, and toggle word wrapping in Review. ([#​148431](openclaw/openclaw#148431), [#​148904](openclaw/openclaw#148904), [#​148906](openclaw/openclaw#148906), [#​148649](openclaw/openclaw#148649), [#​144101](openclaw/openclaw#144101), [#​143972](openclaw/openclaw#143972)) Related [#​144093](openclaw/openclaw#144093), [#​148409](openclaw/openclaw#148409) Thanks [@​ansxor](https://github.com/ansxor), [@​IWhatsskill](https://github.com/IWhatsskill), [@​Marvinthebored](https://github.com/Marvinthebored), [@​Patrick-Erichsen](https://github.com/Patrick-Erichsen), and [@​shakkernerd](https://github.com/shakkernerd). - **Simpler model sign-in and selection:** align native sign-in with runtime choices, sign in without changing the model, choose across agent harnesses, and connect Radius models with browser sign-in and native streaming. ([#​143588](openclaw/openclaw#143588), [#​144329](openclaw/openclaw#144329), [#​147994](openclaw/openclaw#147994), [#​145377](openclaw/openclaw#145377)) Thanks [@​obviyus](https://github.com/obviyus). ##### Changes - **Conversation navigation:** native sidebars preview pending requests, while macOS, iOS, Android, and web chat can collapse completed work so replies and older history remain easier to read. ([#​149811](openclaw/openclaw#149811), [#​147540](openclaw/openclaw#147540), [#​148002](openclaw/openclaw#148002), [#​148050](openclaw/openclaw#148050), [#​147295](openclaw/openclaw#147295)) Related [#​147271](openclaw/openclaw#147271), [#​149682](openclaw/openclaw#149682) Thanks [@​vyctorbrzezowski](https://github.com/vyctorbrzezowski). - **Agent setup and teams:** start from role templates and a team preset, show every agent and its sessions in team mode, and use a roster-first Agents home. ([#​145712](openclaw/openclaw#145712), [#​141476](openclaw/openclaw#141476), [#​141097](openclaw/openclaw#141097)) Thanks [@​hannesrudolph](https://github.com/hannesrudolph). - **Group conversations:** coordinate bounded multi-agent group threads across channels and share selected sessions read-only with a paired team Gateway. ([#​141411](openclaw/openclaw#141411), [#​136253](openclaw/openclaw#136253)) - **Activity and run artifacts:** show rolling session recaps, Git changes and PR previews, and select assistant-delivered files by the run that produced them. ([#​147441](openclaw/openclaw#147441), [#​145530](openclaw/openclaw#145530), [#​147682](openclaw/openclaw#147682)) Related [#​145529](openclaw/openclaw#145529), [#​147383](openclaw/openclaw#147383) Thanks [@​onlyysaurabh](https://github.com/onlyysaurabh) and [@​vincentkoc](https://github.com/vincentkoc). - **Browser and dashboards:** download assets from the Browser sidebar, share browser dashboards with agents, embed websites in full-screen session dashboards, and save shared split/full-screen defaults. ([#​144480](openclaw/openclaw#144480), [#​146702](openclaw/openclaw#146702), [#​146312](openclaw/openclaw#146312), [#​146475](openclaw/openclaw#146475)) Related [#​144477](openclaw/openclaw#144477), [#​146303](openclaw/openclaw#146303), [#​146308](openclaw/openclaw#146308), [#​146577](openclaw/openclaw#146577) Thanks [@​Patrick-Erichsen](https://github.com/Patrick-Erichsen). - **Desktop interaction:** control Gateway desktops without a paired node, match virtual worker displays to their viewport, and watch live desktops in Picture-in-Picture. ([#​147275](openclaw/openclaw#147275), [#​143938](openclaw/openclaw#143938), [#​143836](openclaw/openclaw#143836)) Related [#​143829](openclaw/openclaw#143829), [#​147274](openclaw/openclaw#147274) Thanks [@​vincentkoc](https://github.com/vincentkoc). - **Remote workspaces:** start remote sessions without a repository, select repository-defined source checkouts, and reduce source storage through filesystem snapshots, APFS clones, and ReFS clones. ([#​147773](openclaw/openclaw#147773), [#​149581](openclaw/openclaw#149581), [#​146251](openclaw/openclaw#146251), [#​146338](openclaw/openclaw#146338), [#​146403](openclaw/openclaw#146403)) Related [#​146250](openclaw/openclaw#146250), [#​146288](openclaw/openclaw#146288), [#​149580](openclaw/openclaw#149580) Thanks [@​fuller-stack-dev](https://github.com/fuller-stack-dev) and [@​obviyus](https://github.com/obviyus). - **Code mode:** find MCP tools by task, reuse results between code cells, retain oversized results for later cells, and infer result shape from the requested action. ([#​147134](openclaw/openclaw#147134), [#​147154](openclaw/openclaw#147154), [#​147278](openclaw/openclaw#147278), [#​147291](openclaw/openclaw#147291)) - **Plugin state and background work:** offer asynchronous task/flow reads and worker-backed keyed and conditional state operations without removing the supported synchronous SDK paths. ([#​145851](openclaw/openclaw#145851), [#​146557](openclaw/openclaw#146557), [#​147891](openclaw/openclaw#147891)) - **Hot policy changes:** apply browser control policy, Telegram access/reply policy, and renewed TLS certificates without restarting their running services. ([#​146100](openclaw/openclaw#146100), [#​146129](openclaw/openclaw#146129), [#​146267](openclaw/openclaw#146267)) - **Model providers:** support OpenRouter sign-in from private chat, explicit consent before exposing restricted provider models, and opt-in stored HTTP continuation for compatible Responses endpoints. ([#​144491](openclaw/openclaw#144491), [#​144468](openclaw/openclaw#144468), [#​128633](openclaw/openclaw#128633)) Related [#​123215](openclaw/openclaw#123215) Thanks [@​hartmark](https://github.com/hartmark), [@​obviyus](https://github.com/obviyus), and [@​Patrick-Erichsen](https://github.com/Patrick-Erichsen). - **Codex interaction:** answer asynchronous questions while other agent work continues, view usage beside saved logins, and expose slow or failed catalog phases with retained-request correlation. ([#​144664](openclaw/openclaw#144664), [#​132453](openclaw/openclaw#132453), [#​132454](openclaw/openclaw#132454), [#​148639](openclaw/openclaw#148639), [#​148735](openclaw/openclaw#148735), [#​149616](openclaw/openclaw#149616)) Related [#​144643](openclaw/openclaw#144643), [#​148629](openclaw/openclaw#148629), [#​148728](openclaw/openclaw#148728) Thanks [@​jesse-merhi](https://github.com/jesse-merhi). - **Daybreak fallback:** retry supported cyber-refused turns on Daybreak, surface cyber notices, and announce successful retries. ([#​143761](openclaw/openclaw#143761), [#​145291](openclaw/openclaw#145291), [#​147146](openclaw/openclaw#147146)) Thanks [@​VACInc](https://github.com/VACInc). - **Triage handoffs:** add Muse, Grok, Cursor, Kimi Code, and Qwen Code handoffs through the existing triage workflow. ([#​149703](openclaw/openclaw#149703), [#​149877](openclaw/openclaw#149877)) - **Automation history:** query and paginate run history from the CLI, show readable timer wake timestamps, and list matches when an automation name is ambiguous. ([#​141777](openclaw/openclaw#141777), [#​141742](openclaw/openclaw#141742), [#​150082](openclaw/openclaw#150082)) Related [#​58574](openclaw/openclaw#58574), [#​141745](openclaw/openclaw#141745) Thanks [@​Alix-007](https://github.com/Alix-007), [@​Celthi](https://github.com/Celthi), [@​Patrick-Erichsen](https://github.com/Patrick-Erichsen), and [@​shakkernerd](https://github.com/shakkernerd). - **Structured channel questions:** answer an agent question directly from its offered Mattermost option or LINE tap. ([#​135350](openclaw/openclaw#135350), [#​133421](openclaw/openclaw#133421)) Related [#​133288](openclaw/openclaw#133288), [#​133418](openclaw/openclaw#133418) Thanks [@​edenfunf](https://github.com/edenfunf) and [@​Patrick-Erichsen](https://github.com/Patrick-Erichsen). - **Chat composition and files:** keep drafting while history loads, offer emoji shortcodes, retain file previews in tabs with HTML rendering, and display image attachments inline in the TUI. ([#​143625](openclaw/openclaw#143625), [#​146737](openclaw/openclaw#146737), [#​146672](openclaw/openclaw#146672), [#​146644](openclaw/openclaw#146644)) Related [#​143607](openclaw/openclaw#143607), [#​146590](openclaw/openclaw#146590), [#​146610](openclaw/openclaw#146610), [#​146655](openclaw/openclaw#146655) Thanks [@​VACInc](https://github.com/VACInc), [@​vincentkoc](https://github.com/vincentkoc), and [@​vyctorbrzezowski](https://github.com/vyctorbrzezowski). - **Review and workboards:** inspect CI jobs and steps from PR chips and select or update multiple workboard cards together. ([#​148070](openclaw/openclaw#148070), [#​144756](openclaw/openclaw#144756)) Related [#​147952](openclaw/openclaw#147952) Thanks [@​vyctorbrzezowski](https://github.com/vyctorbrzezowski). - **Personalization:** choose an avatar during agent hatching, use custom SVG session icons, and distinguish plugin activity with compact icons. ([#​146669](openclaw/openclaw#146669), [#​147442](openclaw/openclaw#147442), [#​147333](openclaw/openclaw#147333), [#​143711](openclaw/openclaw#143711)) Related [#​143683](openclaw/openclaw#143683) Thanks [@​Patrick-Erichsen](https://github.com/Patrick-Erichsen). - **Gateway visibility:** show ping and shared activity graphs, a browser-tab status dot, and compact System busyness widgets with all three metrics. ([#​146755](openclaw/openclaw#146755), [#​147388](openclaw/openclaw#147388), [#​147760](openclaw/openclaw#147760), [#​147840](openclaw/openclaw#147840)) Related [#​147343](openclaw/openclaw#147343), [#​147757](openclaw/openclaw#147757), [#​147829](openclaw/openclaw#147829) Thanks [@​vyctorbrzezowski](https://github.com/vyctorbrzezowski). - **Native desktop layout:** unify Tauri setup, Quick Chat themes, title bars, and window controls; the macOS app defaults to the web experience while retaining its experimental native experience. ([#​148808](openclaw/openclaw#148808), [#​147097](openclaw/openclaw#147097), [#​149763](openclaw/openclaw#149763)) Related [#​147096](openclaw/openclaw#147096). - **Diagnostics:** report when the runtime was built from a different commit than HEAD, expose administrative CPU profiles, and inspect native FreeBSD rc.d service discovery. ([#​144499](openclaw/openclaw#144499), [#​148004](openclaw/openclaw#148004), [#​148875](openclaw/openclaw#148875)) Related [#​148003](openclaw/openclaw#148003) Thanks [@​RomneyDa](https://github.com/RomneyDa) and [@​vincentkoc](https://github.com/vincentkoc). - **Provider and channel configuration:** expose official channel labels/docs in JSON listings, allow a Discord API URL override, and show comparative cost analysis in the Control UI. ([#​93265](openclaw/openclaw#93265), [#​118067](openclaw/openclaw#118067), [#​100432](openclaw/openclaw#100432)) Related [#​100405](openclaw/openclaw#100405) Thanks [@​fuller-stack-dev](https://github.com/fuller-stack-dev), [@​obviyus](https://github.com/obviyus), and [@​RomneyDa](https://github.com/RomneyDa). - **Execution options:** configure approval-reviewer thinking and fast mode, and default parallel-session capacity to four runs per available CPU. ([#​147192](openclaw/openclaw#147192), [#​147423](openclaw/openclaw#147423)) Thanks [@​VACInc](https://github.com/VACInc). - **Plugin SDK migration — Gateway V2:** the existing Gateway handler and node-session imports now expose physical WebSocket, generic framed, and HTTP polling capabilities honestly. Before WebSocket-only operations, narrow `node.client.webSocket`; narrow `node.client.socket` separately for framed operations. Polling nodes remain visible, and the node wire protocol is unchanged. Migration details: `/plugins/sdk-migration/compatibility-policy#gateway-node-transport-sdk-v2`. Thanks [@​vincentkoc](https://github.com/vincentkoc) and [@​RomneyDa](https://github.com/RomneyDa). ##### Fixes - **Identity and authorization:** stop inferring forwarded sender identity from message text, stop MiniMax token requests after chat-login permission is revoked, and preserve attachments whose content types use prototype-like names. ([#​138579](openclaw/openclaw#138579), [#​149140](openclaw/openclaw#149140), [#​143673](openclaw/openclaw#143673)) Related [#​149139](openclaw/openclaw#149139) Thanks [@​LiuwqGit](https://github.com/LiuwqGit), [@​masatohoshino](https://github.com/masatohoshino), [@​obviyus](https://github.com/obviyus), and [@​xialonglee](https://github.com/xialonglee). - **Transcript and session ownership:** prevent stale companion/cloud transcript writes, preserve context and ownership across compaction, and track new sessions before their first transcript write. ([#​149997](openclaw/openclaw#149997), [#​149840](openclaw/openclaw#149840), [#​149712](openclaw/openclaw#149712)) - **Final replies and completed work:** retain completed tool receipts through text-only finalization and empty-answer retries without repeating completed actions or recording internal continuation prompts as new user messages. Thanks [@​vincentkoc](https://github.com/vincentkoc) and [@​RomneyDa](https://github.com/RomneyDa). - **Large-history responsiveness:** keep large session detail and chat metadata reads responsive, avoid blocking the Gateway during memory index publication, and reduce retention work and startup/Doctor memory pressure. ([#​149749](openclaw/openclaw#149749), [#​149853](openclaw/openclaw#149853), [#​149901](openclaw/openclaw#149901), [#​149754](openclaw/openclaw#149754), [#​149704](openclaw/openclaw#149704)) Thanks [@​fuller-stack-dev](https://github.com/fuller-stack-dev). - **Update and Doctor recovery:** preserve shared WAL after a refused restore, unblock shared-state repair for July upgrades, and avoid false pending migrations for bundled runtimes. ([#​149918](openclaw/openclaw#149918), [#​149753](openclaw/openclaw#149753), [#​149653](openclaw/openclaw#149653)) Thanks [@​obviyus](https://github.com/obviyus). - **Service upgrades:** preserve Gateway authentication when reinstalling legacy services and avoid timing out systemd restart inspection. ([#​149686](openclaw/openclaw#149686), [#​149970](openclaw/openclaw#149970)) - **Managed-service updates:** fix service environment refresh failures when upgrading from 2026.9.4 to 2026.9.5 with `openclaw update`. ([#​151977](openclaw/openclaw#151977)) - **Subagent continuation:** inherit the active model at spawn, enforce fork limits against current context, and resume tasks after output-limited tool calls. ([#​149036](openclaw/openclaw#149036), [#​149666](openclaw/openclaw#149666), [#​149844](openclaw/openclaw#149844)) Thanks [@​vincentkoc](https://github.com/vincentkoc). - **Channel shutdown:** finish accepted Telegram work, Discord introductions, and deferred Slack replay before shutdown, while preserving Telegram spool settlement ownership. ([#​150080](openclaw/openclaw#150080), [#​150072](openclaw/openclaw#150072), [#​150073](openclaw/openclaw#150073), [#​149953](openclaw/openclaw#149953)) Thanks [@​obviyus](https://github.com/obviyus). - **Channel startup and routing:** avoid blocking Discord startup on persisted bindings and allow cross-provider messaging by default. ([#​149861](openclaw/openclaw#149861), [#​149875](openclaw/openclaw#149875)) - **Plugin reloads:** reuse the published inbound registry and bundled setup code, keep Lossless usable after settings reload, and validate source reloads under Bun. ([#​149648](openclaw/openclaw#149648), [#​149646](openclaw/openclaw#149646), [#​149675](openclaw/openclaw#149675), [#​150088](openclaw/openclaw#150088)) Thanks [@​Patrick-Erichsen](https://github.com/Patrick-Erichsen). - **Provider execution:** retain disabled-plugin CLI backend capabilities during inspection, reject incomplete compatible reply streams, and preserve the configured transport during authentication refresh. ([#​149837](openclaw/openclaw#149837), [#​149842](openclaw/openclaw#149842), [#​150003](openclaw/openclaw#150003)) Related [#​149854](openclaw/openclaw#149854), [#​149855](openclaw/openclaw#149855) Thanks [@​obviyus](https://github.com/obviyus), [@​zhangguiping-xydt](https://github.com/zhangguiping-xydt), and [@​SunnyShu0925](https://github.com/SunnyShu0925). - **Codex startup and catalogs:** prevent service refresh from repeatedly aborting startup, bound catalog memory while retaining tied rows, and avoid repeated scans across multiple homes. ([#​149365](openclaw/openclaw#149365), [#​150112](openclaw/openclaw#150112), [#​149879](openclaw/openclaw#149879)) Thanks [@​bdjben](https://github.com/bdjben) and [@​obviyus](https://github.com/obviyus). - **Automation correctness:** prevent extra event-schedule runs, reject ambiguous exact-name lookups, and keep selected automation history and edits attached to the intended task. ([#​149902](openclaw/openclaw#149902), [#​149958](openclaw/openclaw#149958), [#​149955](openclaw/openclaw#149955), [#​150129](openclaw/openclaw#150129)) Thanks [@​Alix-007](https://github.com/Alix-007). - **Session navigation:** retain archive confirmation after leaving Sessions, preserve pagination when switching agents during deletion, and keep newer selections when older mutations finish. ([#​150108](openclaw/openclaw#150108), [#​150125](openclaw/openclaw#150125), [#​149959](openclaw/openclaw#149959)) - **Chat state:** keep your own messages right-aligned through refresh and reconnect, and clear resolved queued-message reorder conflicts. ([#​147634](openclaw/openclaw#147634), [#​149962](openclaw/openclaw#149962)) Related [#​147511](openclaw/openclaw#147511) Thanks [@​keith9681](https://github.com/keith9681), [@​obviyus](https://github.com/obviyus), and [@​SunnyShu0925](https://github.com/SunnyShu0925). - **Files and selection:** keep workspace files readable, preserve Files selection during directory refreshes, retain parent navigation for unavailable folders, and preserve model searches during text composition. ([#​149499](openclaw/openclaw#149499), [#​149900](openclaw/openclaw#149900), [#​150118](openclaw/openclaw#150118), [#​149845](openclaw/openclaw#149845)) - **Windows paths and credentials:** preserve state roots during database admission and worker startup, retain credential reads, and read exact configuration filenames containing whitespace. ([#​149976](openclaw/openclaw#149976), [#​150035](openclaw/openclaw#150035), [#​149124](openclaw/openclaw#149124), [#​149629](openclaw/openclaw#149629)) Related [#​149630](openclaw/openclaw#149630) Thanks [@​obviyus](https://github.com/obviyus) and [@​zhangguiping-xydt](https://github.com/zhangguiping-xydt). - **Workspace safety:** keep file tools aligned with overlapping sandbox mounts and preserve work through worktree creation and cleanup races. ([#​148893](https://github.com/openclaw/openclaw/issues/148893), [#​149914](https://github.com/openclaw/openclaw/issues/149914)) Thanks [@​vincentkoc](https://github.com/vincentkoc). - **Legacy updater handoffs:** keep the Node runner resolver independent of candidate runtime imports, complete changed-plugin Doctor work through the correct parent/child owner, and inspect copied Doctor contracts in private rehearsals while leaving live installation paths protected. Thanks [@​vincentkoc](https://github.com/vincentkoc) and [@​RomneyDa](https://github.com/RomneyDa). - **Plugin SDK authoring:** retain released boolean memory-search `enabled` values and undefined per-channel `responseUsage` entries without changing runtime resolution or persisted configuration schemas. Thanks [@​vincentkoc](https://github.com/vincentkoc) and [@​RomneyDa](https://github.com/RomneyDa). - **Shipped SDK compatibility:** preserve full-config and readonly roster inputs, versioned legacy model-selection authoring, Discord component registration's `void` return, and Gateway plugin metadata notifications through their existing lifecycle and restart owners. The deprecated model-policy `allowsKey` member remains source-only and is never used for authorization; asynchronous completion and errors remain owned after a void call returns. Thanks [@​vincentkoc](https://github.com/vincentkoc) and [@​RomneyDa](https://github.com/RomneyDa). ##### Complete contribution record The full contribution record is available in the tag-pinned [CHANGELOG.md](https://github.com/openclaw/openclaw/blob/v2026.9.5/CHANGELOG/records/2026.9.5.md#complete-contribution-record). ##### Release verification - npm package: <https://www.npmjs.com/package/openclaw/v/2026.9.5> - registry tarball: <https://registry.npmjs.org/openclaw/-/openclaw-2026.9.5.tgz> - integrity: `sha512-TCO/ImVLh5HkF4tdfo7iriIa7kT6iYkIr/jR5ZOkePGFGhUx5Oe7DE716Y1DzzG2teRAVDdCjgJDu1A24Yta7w==` - release SHA: `ec9c1a13db8938e5a3eaa51fca2e981cde2395a9` - full release CI report: <https://github.com/openclaw/releases/blob/main/evidence/2026.9.5/release-evidence.md> - release publish: <https://github.com/openclaw/openclaw/actions/runs/35414217443> - npm preflight: <https://github.com/openclaw/openclaw/actions/runs/35382454474> - full release validation: <https://github.com/openclaw/openclaw/actions/runs/35381634370> - plugin npm publish: <https://github.com/openclaw/openclaw/actions/runs/35414496234> - plugin ClawHub submission: <https://github.com/openclaw/openclaw/actions/runs/35414501298>; public artifact verification follows successful release-parent completion - plugin ClawHub bootstrap: dispatched separately, not awaited by this proof: <https://github.com/openclaw/openclaw/actions/runs/35414503229> - Stable soak waived by operator: "Operator-approved by Peter for 2026.9.5: soak-only live/E2E lanes blocked by infrastructure and main-owned fixture failures; non-soak Full Release Validation [`3538163`](openclaw/openclaw@35381634370) attempt 2 green; 9.4 to 9.5 update proven on systemd-service and plain installs." - npm Telegram beta E2E: not supplied - Android APK: skipped — apps/android/version.json is 2026.8.2, release train is 2026.9.5; run the shared mobile cutter (scripts/mobile-release-version.ts --prepare) before the next tag. </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/London) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEwNC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19--> Reviewed-on: https://git.hayden.moe/hayden/phoebe/pulls/696
…#190019) ## What Problem This Solves Adding a provider did not make it usable when a model allowlist (`modelPolicy.allow`) existed. On the Team server, saving a Particle API key in **Settings → Models → Connect provider** succeeded, but no Particle model appeared in the model picker: the allowlist hid them all. Sign-in flows (CLI, chat `/login`, Telegram, Control UI wizard) asked **Show all <Provider> models / Keep current restrictions** with Keep as the default. The API-key save path skipped even that, and #189917 only added a text warning that told the user to edit config by hand. ## Fix Saving credentials for a provider is now the request to use its models. When the allowlist that governs the agent hides **every** model of that provider, the save adds `<provider>/*` to that allowlist, through the existing model-policy owner (`src/commands/models/auth-model-policy.ts`): - per-agent `agents.entries.<id>.modelPolicy.allow` when the agent sets its own policy, otherwise `agents.defaults.modelPolicy.allow`; - an unmigrated legacy `agents.defaults.models` allowlist gets the wildcard key, so none of its models is dropped. Nothing changes when there is no allowlist, or when the allowlist already names some of the provider's models (an exact ref such as `openai/gpt-x`, or a narrower wildcard such as `clawrouter/anthropic/*`). The policy owner decides that: the check reads providers from `createModelVisibilityPolicy(...).allowedKeys`, which resolves exact refs, aliases and bare legacy refs (inferring their provider from configured provider rows) the same way the picker does. A deliberate exact list is never widened. Paths: - API key / token save (`models.authSetApiKey`, `openclaw models auth paste-api-key`, `paste-token`): the wildcard is added in the same config write as the credential's auth profile. - Sign-in (`openclaw models auth login`, Control UI wizard, chat `/login`, Telegram `/login`): after the credential is saved, one write adds the wildcard. The login result carries `modelAccess: { message, applied }`; chat and Telegram append "Added `<provider>/*` to allowed models." to the completion message; the Control UI wizard reports an unconfirmed apply as before. Removed: the post-save select prompt, the deferred `onModelAccessRequested` request, `offerProviderLoginModelAccess` / `answerProviderLoginModelAccess`, the `/login access` and `/login choice` model-access commands, `createLoginChoicePrompt`, `ProviderModelPolicyChangedError`, and the #189917 Control UI warning. `provider-auth-login-flow-runtime` is a private-local SDK subpath (docs/plugins/sdk-subpaths.md), so its only consumers are bundled (core chat `/login`, Telegram), migrated here. Authority: every `models.authSetApiKey` save now checks live requester authority (`readGatewayRequestMutationAuthority`, the guard `config.patch` uses) before its credential and config writes. Before, browser saves without `expectedOwnerId` passed no guard; the save now also widens the allowlist, so a requester whose connection or scopes end mid-save cannot commit it. Owner-bound CLI saves keep their owner check and add the same requester check. Plugin setup defaults still cannot change restrictions (`withoutProviderModelPolicy` is unchanged); only the credential save does. This reverses the ask-first default from #144468 by maintainer decision. No undo button: the `models.authSetApiKey` result has no field for the change, and adding one is a protocol change; the change is a single visible `provider/*` allowlist entry. ## User Impact Add a provider key or sign in → its models show in the model picker, even under an existing allowlist that did not mention the provider. Operators who listed specific models of that provider keep exactly their list. ## Evidence Real Gateway, real config write (`src/gateway/server-methods/models-auth-api-key.integration.test.ts`): config `agents.defaults.modelPolicy.allow: ["other/*"]`, `models.authSetApiKey` for `fixture` → saved config `["other/*", "fixture/*"]`. Negative control: with the new line disabled, the test fails `expected [ 'other/*' ] to deeply equal [ 'other/*', 'fixture/*' ]`. Policy owner (`src/commands/models/auth-model-policy.test.ts`, real config file): - per-agent policy widened, defaults untouched; - no allowlist / provider already allowed → config bytes unchanged; - allowlist with exact `sample/one`, `sample/two` → unchanged; with `sample/family/*` → unchanged (both fail when the check is reverted to "literal `sample/*` missing"); - deferred legacy map keeps `existing-model` and gains `sample/*`; - migrated model map is not treated as an allowlist; - authority revoked during the writer's preflight → no write. Sign-in end to end against a real plugin and config (`src/commands/models.auth.provider-resolution.test.ts`): `access`, `access-legacy`, `access-legacy-set-default` cases save the credential, add `authstore-proof/*` with no prompt, and log the notice. Real key writer under revocation (`src/commands/models/auth-api-key.test.ts`, real auth store and config file): with an allowlist present, authority revoked inside the config write leaves the config bytes unchanged (no auth binding, no `sample/*`); unrevoked, the same write saves the binding and `["other/*", "sample/*"]`. Gateway-to-writer revocation chain (`src/commands/models/auth-api-key.test.ts`): the real `models.authSetApiKey` handler, its `readGatewayRequestMutationAuthority` guard and the real key/config writer, with the requester's authority ending inside the config write. The RPC fails with "Gateway requester authority changed"; the config file bytes are unchanged (no auth binding, allowlist still `["other/*"]`). The key itself committed earlier, while the requester was still authorized, and stays saved. Negative control: with the handler guard replaced by a no-op, the test fails. Run output (synthetic keys only): ``` ✓ |commands| src/commands/models/auth-api-key.test.ts > checks requester authority after credential commit (revoked=false) 1511ms ✓ |commands| src/commands/models/auth-api-key.test.ts > checks requester authority after credential commit (revoked=true) 914ms ✓ |commands| src/commands/models/auth-api-key.test.ts > checks requester authority after config transform (revoked=false) 1392ms ✓ |commands| src/commands/models/auth-api-key.test.ts > checks requester authority after config transform (revoked=true) 1067ms ✓ |commands| src/commands/models/auth-api-key.test.ts > models.authSetApiKey writes no binding or allowlist once the requester is revoked 977ms Tests 5 passed | 42 skipped (47) ``` Upgrade compatibility: no stored schema or config shape changes. Existing configs load as before and keep working: explicit `modelPolicy.allow` (defaults and per-agent), unmigrated legacy `agents.defaults.models` allowlists (wildcard added as a map key, every existing model kept), migrated maps with the `modelPolicyAllowlist` marker (not treated as an allowlist), and configs without an allowlist (never written). Each case runs against a real config file in `auth-model-policy.test.ts` and `models.auth.provider-resolution.test.ts`. The removed chat model-access questions were in-memory only, so no stored state refers to them. Existing data, real CLI entry point: a temporary state directory seeded with the Team server's pre-change allowlist shape (exact `openai/...` refs plus `clawrouter/anthropic/...` refs, and a legacy `agents.defaults.models` map), then `openclaw models auth paste-api-key` from this branch for three providers (synthetic keys, the first run's output trimmed to the resulting list): ``` Team pre-change allowlist (exact openai refs + clawrouter/anthropic refs), no Gateway running == openclaw models auth paste-api-key --provider openai allow = ['openai/gpt-6-luna', 'openai/gpt-6-astra', 'openai/gpt-daybreak-blue-latest', 'openai/gpt-daybreak-red-latest', 'openai/gpt-6.1-sol', 'clawrouter/anthropic/claude-fable-5-1', 'clawrouter/anthropic/claude-opus-5-5'] == openclaw models auth paste-api-key --provider particle Auth profile: particle:manual (particle/api_key) Added particle/* to allowed models. allow = ['openai/gpt-6-luna', 'openai/gpt-6-astra', 'openai/gpt-daybreak-blue-latest', 'openai/gpt-daybreak-red-latest', 'openai/gpt-6.1-sol', 'clawrouter/anthropic/claude-fable-5-1', 'clawrouter/anthropic/claude-opus-5-5', 'particle/*'] == openclaw models auth paste-api-key --provider clawrouter Auth profile: clawrouter:manual (clawrouter/api_key) allow = ['openai/gpt-6-luna', 'openai/gpt-6-astra', 'openai/gpt-daybreak-blue-latest', 'openai/gpt-daybreak-red-latest', 'openai/gpt-6.1-sol', 'clawrouter/anthropic/claude-fable-5-1', 'clawrouter/anthropic/claude-opus-5-5', 'particle/*'] ``` OpenAI and ClawRouter keep the operator's exact lists; only Particle, which the list did not mention, gains `particle/*`. Bare legacy ref (`auth-model-policy.test.ts`): legacy map `{ tiny: {} }` with a configured `sample` provider that has `tiny` → saving a `sample` credential leaves config unchanged (fails against the earlier `DEFAULT_PROVIDER` parse). Requester authority (`src/gateway/server-methods/models-auth-status.set-api-key.test-support.ts`): authority ends during the save → the RPC fails with "Gateway requester authority changed" and the writer's `assertCurrent` throws before commit. Negative control: with the handler's default guard replaced by a no-op, the test fails. Surface tests: chat `/login` and Telegram completion messages include the notice; Control UI wizard reports unconfirmed apply; mocked-Gateway Control UI E2E (`model-provider-login.e2e.test.ts`) passes. Control UI, mocked Gateway, policy `allow: ["openai/*"]`, save a Particle key: Before (main, #189917): the dialog stays open with a config-editing instruction.  After: the Gateway widens the policy during the save; the dialog closes like any successful save.  Commands: - `pnpm test src/commands/models/auth-model-policy.test.ts --maxWorkers=1`: 7 passed. - `pnpm test src/gateway/server-methods/models-auth-api-key.integration.test.ts --maxWorkers=1`: 1 passed (~12.5 s, real Gateway, existing test extended; no new boot). - `pnpm test src/commands/models/auth.test.ts src/commands/models.auth.provider-resolution.test.ts --maxWorkers=1`: 80 passed. - Chat/Gateway/Telegram/UI suites: passed. - `pnpm tsgo:core`, `pnpm tsgo:extensions`, `OPENCLAW_CHECK_CHANGED_SKIP_DEADCODE=1 pnpm check:changed`. No overlap with Pash/Sarah changes. Merge danger: one-way for configs: a credential save can now write `<provider>/*` into a model allowlist. A revert stops new writes but does not remove entries already added. Blast radius: operators who rely on an allowlist that does not mention a provider to keep that provider hidden after someone adds its credentials. Only admins can save credentials. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
…openclaw#190019) ## What Problem This Solves Adding a provider did not make it usable when a model allowlist (`modelPolicy.allow`) existed. On the Team server, saving a Particle API key in **Settings → Models → Connect provider** succeeded, but no Particle model appeared in the model picker: the allowlist hid them all. Sign-in flows (CLI, chat `/login`, Telegram, Control UI wizard) asked **Show all <Provider> models / Keep current restrictions** with Keep as the default. The API-key save path skipped even that, and openclaw#189917 only added a text warning that told the user to edit config by hand. ## Fix Saving credentials for a provider is now the request to use its models. When the allowlist that governs the agent hides **every** model of that provider, the save adds `<provider>/*` to that allowlist, through the existing model-policy owner (`src/commands/models/auth-model-policy.ts`): - per-agent `agents.entries.<id>.modelPolicy.allow` when the agent sets its own policy, otherwise `agents.defaults.modelPolicy.allow`; - an unmigrated legacy `agents.defaults.models` allowlist gets the wildcard key, so none of its models is dropped. Nothing changes when there is no allowlist, or when the allowlist already names some of the provider's models (an exact ref such as `openai/gpt-x`, or a narrower wildcard such as `clawrouter/anthropic/*`). The policy owner decides that: the check reads providers from `createModelVisibilityPolicy(...).allowedKeys`, which resolves exact refs, aliases and bare legacy refs (inferring their provider from configured provider rows) the same way the picker does. A deliberate exact list is never widened. Paths: - API key / token save (`models.authSetApiKey`, `openclaw models auth paste-api-key`, `paste-token`): the wildcard is added in the same config write as the credential's auth profile. - Sign-in (`openclaw models auth login`, Control UI wizard, chat `/login`, Telegram `/login`): after the credential is saved, one write adds the wildcard. The login result carries `modelAccess: { message, applied }`; chat and Telegram append "Added `<provider>/*` to allowed models." to the completion message; the Control UI wizard reports an unconfirmed apply as before. Removed: the post-save select prompt, the deferred `onModelAccessRequested` request, `offerProviderLoginModelAccess` / `answerProviderLoginModelAccess`, the `/login access` and `/login choice` model-access commands, `createLoginChoicePrompt`, `ProviderModelPolicyChangedError`, and the openclaw#189917 Control UI warning. `provider-auth-login-flow-runtime` is a private-local SDK subpath (docs/plugins/sdk-subpaths.md), so its only consumers are bundled (core chat `/login`, Telegram), migrated here. Authority: every `models.authSetApiKey` save now checks live requester authority (`readGatewayRequestMutationAuthority`, the guard `config.patch` uses) before its credential and config writes. Before, browser saves without `expectedOwnerId` passed no guard; the save now also widens the allowlist, so a requester whose connection or scopes end mid-save cannot commit it. Owner-bound CLI saves keep their owner check and add the same requester check. Plugin setup defaults still cannot change restrictions (`withoutProviderModelPolicy` is unchanged); only the credential save does. This reverses the ask-first default from openclaw#144468 by maintainer decision. No undo button: the `models.authSetApiKey` result has no field for the change, and adding one is a protocol change; the change is a single visible `provider/*` allowlist entry. ## User Impact Add a provider key or sign in → its models show in the model picker, even under an existing allowlist that did not mention the provider. Operators who listed specific models of that provider keep exactly their list. ## Evidence Real Gateway, real config write (`src/gateway/server-methods/models-auth-api-key.integration.test.ts`): config `agents.defaults.modelPolicy.allow: ["other/*"]`, `models.authSetApiKey` for `fixture` → saved config `["other/*", "fixture/*"]`. Negative control: with the new line disabled, the test fails `expected [ 'other/*' ] to deeply equal [ 'other/*', 'fixture/*' ]`. Policy owner (`src/commands/models/auth-model-policy.test.ts`, real config file): - per-agent policy widened, defaults untouched; - no allowlist / provider already allowed → config bytes unchanged; - allowlist with exact `sample/one`, `sample/two` → unchanged; with `sample/family/*` → unchanged (both fail when the check is reverted to "literal `sample/*` missing"); - deferred legacy map keeps `existing-model` and gains `sample/*`; - migrated model map is not treated as an allowlist; - authority revoked during the writer's preflight → no write. Sign-in end to end against a real plugin and config (`src/commands/models.auth.provider-resolution.test.ts`): `access`, `access-legacy`, `access-legacy-set-default` cases save the credential, add `authstore-proof/*` with no prompt, and log the notice. Real key writer under revocation (`src/commands/models/auth-api-key.test.ts`, real auth store and config file): with an allowlist present, authority revoked inside the config write leaves the config bytes unchanged (no auth binding, no `sample/*`); unrevoked, the same write saves the binding and `["other/*", "sample/*"]`. Gateway-to-writer revocation chain (`src/commands/models/auth-api-key.test.ts`): the real `models.authSetApiKey` handler, its `readGatewayRequestMutationAuthority` guard and the real key/config writer, with the requester's authority ending inside the config write. The RPC fails with "Gateway requester authority changed"; the config file bytes are unchanged (no auth binding, allowlist still `["other/*"]`). The key itself committed earlier, while the requester was still authorized, and stays saved. Negative control: with the handler guard replaced by a no-op, the test fails. Run output (synthetic keys only): ``` ✓ |commands| src/commands/models/auth-api-key.test.ts > checks requester authority after credential commit (revoked=false) 1511ms ✓ |commands| src/commands/models/auth-api-key.test.ts > checks requester authority after credential commit (revoked=true) 914ms ✓ |commands| src/commands/models/auth-api-key.test.ts > checks requester authority after config transform (revoked=false) 1392ms ✓ |commands| src/commands/models/auth-api-key.test.ts > checks requester authority after config transform (revoked=true) 1067ms ✓ |commands| src/commands/models/auth-api-key.test.ts > models.authSetApiKey writes no binding or allowlist once the requester is revoked 977ms Tests 5 passed | 42 skipped (47) ``` Upgrade compatibility: no stored schema or config shape changes. Existing configs load as before and keep working: explicit `modelPolicy.allow` (defaults and per-agent), unmigrated legacy `agents.defaults.models` allowlists (wildcard added as a map key, every existing model kept), migrated maps with the `modelPolicyAllowlist` marker (not treated as an allowlist), and configs without an allowlist (never written). Each case runs against a real config file in `auth-model-policy.test.ts` and `models.auth.provider-resolution.test.ts`. The removed chat model-access questions were in-memory only, so no stored state refers to them. Existing data, real CLI entry point: a temporary state directory seeded with the Team server's pre-change allowlist shape (exact `openai/...` refs plus `clawrouter/anthropic/...` refs, and a legacy `agents.defaults.models` map), then `openclaw models auth paste-api-key` from this branch for three providers (synthetic keys, the first run's output trimmed to the resulting list): ``` Team pre-change allowlist (exact openai refs + clawrouter/anthropic refs), no Gateway running == openclaw models auth paste-api-key --provider openai allow = ['openai/gpt-6-luna', 'openai/gpt-6-astra', 'openai/gpt-daybreak-blue-latest', 'openai/gpt-daybreak-red-latest', 'openai/gpt-6.1-sol', 'clawrouter/anthropic/claude-fable-5-1', 'clawrouter/anthropic/claude-opus-5-5'] == openclaw models auth paste-api-key --provider particle Auth profile: particle:manual (particle/api_key) Added particle/* to allowed models. allow = ['openai/gpt-6-luna', 'openai/gpt-6-astra', 'openai/gpt-daybreak-blue-latest', 'openai/gpt-daybreak-red-latest', 'openai/gpt-6.1-sol', 'clawrouter/anthropic/claude-fable-5-1', 'clawrouter/anthropic/claude-opus-5-5', 'particle/*'] == openclaw models auth paste-api-key --provider clawrouter Auth profile: clawrouter:manual (clawrouter/api_key) allow = ['openai/gpt-6-luna', 'openai/gpt-6-astra', 'openai/gpt-daybreak-blue-latest', 'openai/gpt-daybreak-red-latest', 'openai/gpt-6.1-sol', 'clawrouter/anthropic/claude-fable-5-1', 'clawrouter/anthropic/claude-opus-5-5', 'particle/*'] ``` OpenAI and ClawRouter keep the operator's exact lists; only Particle, which the list did not mention, gains `particle/*`. Bare legacy ref (`auth-model-policy.test.ts`): legacy map `{ tiny: {} }` with a configured `sample` provider that has `tiny` → saving a `sample` credential leaves config unchanged (fails against the earlier `DEFAULT_PROVIDER` parse). Requester authority (`src/gateway/server-methods/models-auth-status.set-api-key.test-support.ts`): authority ends during the save → the RPC fails with "Gateway requester authority changed" and the writer's `assertCurrent` throws before commit. Negative control: with the handler's default guard replaced by a no-op, the test fails. Surface tests: chat `/login` and Telegram completion messages include the notice; Control UI wizard reports unconfirmed apply; mocked-Gateway Control UI E2E (`model-provider-login.e2e.test.ts`) passes. Control UI, mocked Gateway, policy `allow: ["openai/*"]`, save a Particle key: Before (main, openclaw#189917): the dialog stays open with a config-editing instruction.  After: the Gateway widens the policy during the save; the dialog closes like any successful save.  Commands: - `pnpm test src/commands/models/auth-model-policy.test.ts --maxWorkers=1`: 7 passed. - `pnpm test src/gateway/server-methods/models-auth-api-key.integration.test.ts --maxWorkers=1`: 1 passed (~12.5 s, real Gateway, existing test extended; no new boot). - `pnpm test src/commands/models/auth.test.ts src/commands/models.auth.provider-resolution.test.ts --maxWorkers=1`: 80 passed. - Chat/Gateway/Telegram/UI suites: passed. - `pnpm tsgo:core`, `pnpm tsgo:extensions`, `OPENCLAW_CHECK_CHANGED_SKIP_DEADCODE=1 pnpm check:changed`. No overlap with Pash/Sarah changes. Merge danger: one-way for configs: a credential save can now write `<provider>/*` into a model allowlist. A revert stops new writes but does not remove entries already added. Blast radius: operators who rely on an allowlist that does not mention a provider to keep that provider hidden after someone adds its credentials. Only admins can save credentials. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Login could save credentials while new models stayed hidden by restrictions, or expand a legacy model map without consent.
Why This Change Was Made
The shared login flow saves credentials first, then asks whether to show all of that provider’s models or keep current restrictions. Only current authorized consent changes policy through the existing writer. Saved policy and confirmed Gateway application have separate messages.
User Impact
Defaults stay unchanged unless explicitly requested. Users can cancel the post-save choice without losing the credential. Unconfirmed application gives restart guidance; no new config key or schema is added.
Evidence
Telegram button clicks with synthetic authentication verified All expands the model list and Keep preserves it. CLI proof with reload disabled retained the old live list until restart. Compiled plugin-interface and browser flows passed All, Keep, and cancellation. Registered command and login tests passed. One native channel Keep flow remained unproved, and no real user-client slash/button run was claimed.
Related: #136257, #144491.