Skip to content

fix(arcee): preserve model rows and use the selected credentials - #141541

Closed
obviyus wants to merge 10 commits into
mainfrom
fix/arcee-openrouter-credential-route
Closed

obviyus wants to merge 10 commits into
mainfrom
fix/arcee-openrouter-credential-route

Conversation

@obviyus

@obviyus obviyus commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

Verification in progress: This revision stages the installed-plugin identity repair for CI artifacts. Its source regression and caller checks pass. Packaged OpenClaw with separately installed Arcee still needs the captured picker-to-first-reply proof before final review and merge.

Related: #112747, #113097

What this fixes

Arcee setup through OpenRouter could save a working account while the first reply failed with missing Arcee credentials. Registered setup also copied generated catalogs into config. Mixed-endpoint sessions could lose a healthy account pin, and wire model IDs could produce duplicate picker rows or false fallback notices. Large configured catalogs could block Gateway responses past the request deadline.

Changes

  • Registered setup saves connection settings and retains authored model rows. Explicit replace mode and public preset helpers keep their eager catalog behavior.
  • Credential readiness, session creation, same-model pin preservation and execution use the selected model endpoint. Stored credential realms, explicit bindings, linked accounts, account order and plugin trust remain authoritative.
  • Provider-owned logical identity governs catalog joins, authored metadata, aliases, default tags, terminal receipts and persisted fallback state. Real provider/model changes remain distinct.
  • The shared configured-model matcher preserves an authored row's endpoint, headers and limits after a shortened picker ID is selected. Exact authored rows take precedence over equivalent wire spellings in both catalog metadata and execution. Unknown case and foreign-provider namespaces retain their existing behavior.
  • Identity lookup uses the selected trusted installed-plugin metadata when the provider is outside the core package. Captured and explicitly empty metadata retain their authority, and loader failures remain visible.
  • Catalog operations prepare identity sets within the existing visibility owner and use the existing nullable artifact loader for providers without a policy artifact. The same path, hardlink and module validation remain. No global cache, configuration field, store schema, credential copy or provider migration is added.

Validation

  • Unmodified main reproduced the OpenRouter-only credential failure. The candidate completes through the synthetic OpenRouter route with its stored profile. Direct, both-account, mixed-endpoint and unknown-endpoint controls retain their actual results.
  • Authenticated Gateway before/after proof links a work account, creates a session, changes the default for future sessions and reaches the first reply. The baseline sends the other account; the candidate retains and sends the linked work account. Independent stored/received fingerprints distinguish the credentials. An incompatible OpenRouter session uses its own account. Normal terminal-client identity and ownership checks remain active.
  • Public picker-to-session-to-reply proof preserves an authored OpenRouter endpoint, header, account and 32,768-token run budget. A separate competing-row control proves catalog metadata and execution both prefer the exact authored 65,536-token row. Config and stored credentials remain unchanged.
  • Corrected public models.list returns three logical rows with authored metadata and alias/default/configured tags. Pin, later-session selection, false-notice cleanup and genuine fallback/recovery observations retain their original source and transport identities.
  • Six compiled public-helper controls, both real interactive setup routes, stored-profile and flag/environment/stored precedence controls, and first-prompt Ctrl-C pass at their recorded scopes. The same source-blind verifier passed all seven original and four supplemental clauses. Later linked-account, authored-row, collision and catalog observations extend that evidence for the final source-aware review.
  • The 400-model, 11-agent source baseline timed out at the unchanged 30-second request limit. Complete Gateway/client profiles identified repeated missing-artifact exceptions and catalog scans. The final source candidate returns all 4,400 available rows in 11 requests, with 18.75 seconds total request time and a 2.49-second maximum. It makes no provider request, preserves config and shuts down cleanly. The earlier nine-agent partial result and every failed trace remain recorded.
  • Fifteen provider-policy checks, eleven changed/existing visibility checks and the earlier focused collision, missing-artifact, auth-rotation and prepared-selection controls pass at their exact inputs. Lint, pinned formatting, import-cycle and whitespace checks pass. The installed-source regression, captured/empty-owner controls and authored catalog/auth caller check also pass. The image-policy fixture supplies the nullable loader export; its four failing CI cases now pass. Packaged installation proof, fresh exact-head review and full required CI remain the landing gates.

Proof combines separately bound source executions, compiled runtime 621dcb063135e31ea0c41878bcd57792ee2f8771 from raw 94015ca066a802e19a44c9a540fe9fae23f84a12, and retained historical fallback/recovery controls. Later source repairs are not part of that older build. The unrelated full-layout refusal remains recorded. Traffic is isolated and synthetic; no real vendor authentication, graphical banner, separate nondefault-agent onboarding or personal-enrollment policy is claimed. The source-blind report remains unchanged at its earlier scopes. Full original failures, incomplete attempts and source/build distinctions remain available to the reviewer.

@obviyus
obviyus requested a review from a team as a code owner September 7, 2026 20:41
@obviyus obviyus self-assigned this Sep 7, 2026
@clawsweeper

clawsweeper Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime commands Command implementations agents Agent runtime and tooling extensions: arcee size: L maintainer Maintainer-authored PR labels Sep 7, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 7, 2026
@clawsweeper

clawsweeper Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 8, 2026, 4:21 AM ET / 08:21 UTC.

ClawSweeper review

What this changes

The PR preserves authored Arcee models, selects credentials using the chosen endpoint, and keeps model identity consistent across installed plugins, model pickers, session pins, and execution.

Merge readiness

⛔ Blocked before merge - 6 items remain

This remains a useful repair for behavior still present on main. The earlier correctness findings are addressed, and no new actionable defect was established. The related migration PR is an alternative approach, not a merged replacement.

Priority: P1
Reviewed head: 9788e674435b344d87aeed0bd2dfb53f3c08579e
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The repair is coherent and addresses prior findings, with useful boundary coverage and an outstanding package compatibility check.
Proof confidence 🌊 off-meta tidepool Not applicable: The host identifies this as maintainer-authored, exempting the ordinary contributor proof gate. The captured body reports Gateway account and picker-to-reply observations, while explicitly leaving final separately installed Arcee package coverage pending; that remains a compatibility validation requirement.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The host identifies this as maintainer-authored, exempting the ordinary contributor proof gate. The captured body reports Gateway account and picker-to-reply observations, while explicitly leaving final separately installed Arcee package coverage pending; that remains a compatibility validation requirement.
Evidence reviewed 10 items Current main retains the original mismatch: Current main's Arcee auth method stores openrouter:default while retaining the arcee model reference. Its manifest has no endpoint-conditioned auth alias, and the catalog resolver still prefers direct credentials before considering OpenRouter.
Latest release retains the old configuration: The v2026.9.2 preset still writes the OpenRouter-backed catalog under arcee, and the release manifest has no OpenRouter auth alias. No implemented-on-main or shipped-fix closure is supported.
Prior review continuity: The pinned latest commit changes only two optional-chain assertions in the installed-plugin test. The previously reviewed production code is unchanged. The local parent comparison encountered an unavailable blob; the exact GitHub commit patch established this delta.
Findings None None.
Security None None.

How this fits together

The Arcee plugin converts setup choices into model and credential configuration. Shared catalog and authentication code then carries the selected model, endpoint, and account into agent execution.

flowchart TD
  A[Arcee setup or existing configuration] --> B[Authored model rows]
  C[Trusted plugin metadata] --> D[Logical model identity]
  B --> D
  D --> E[Selected model endpoint]
  F[Stored accounts and session pin] --> G[Compatible credential selection]
  E --> G
  G --> H[Agent request and terminal result]
Loading

Decision needed

Question Recommendation
Should endpoint-conditioned provider auth aliases and the merged-provider SDK export become supported plugin contracts for this repair? Accept the route-preserving contracts: Obtain relevant owner acceptance and complete package compatibility validation before landing this approach.

Why: The implementation preserves existing references, but accepting these shared contracts requires owner intent that the available approval marker does not establish.

Before merge

  • Resolve merge risk (P1) - Separately installed Arcee package behavior remains unverified for fresh and existing configurations; source and older compiled evidence do not establish that the final package preserves the selected row and account through the first reply.
  • Resolve merge risk (P1) - Endpoint-conditioned manifest aliases and the added SDK export expand plugin compatibility semantics; the recorded approval marker does not establish the relevant owner acceptance.
  • Complete next step (P2) - Complete packaged installed-Arcee verification for fresh and existing configurations, and confirm relevant owner acceptance of the endpoint-conditioned alias and SDK contracts.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +424, Tests +1756, Docs +12. Total +2192 across 77 files.

View PR surface stats
Area Files Added Removed Net
Source 52 617 193 +424
Tests 23 1870 114 +1756
Docs 2 13 1 +12
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 77 2500 308 +2192

Review metrics

Metric Value Why it matters
Public provider contracts 1 manifest alias form and 1 SDK export added; 2 public preset helpers preserved The repair extends shared plugin contracts while retaining the existing eager preset behavior.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/doctor/shared/stale-auth-order.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #112747
Summary: This PR addresses the canonical onboarding credential mismatch while preserving existing Arcee references.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Verify the installed package contract (recommended)
    Confirm owner acceptance and capture fresh and existing configurations retaining their selected model, endpoint, and account through the first reply.

Technical review

Best possible solution:

Preserve existing Arcee references and credential realms through one endpoint-aware flow, with owner-approved plugin contracts and packaged fresh-install and upgrade evidence.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: main retains the Arcee model/OpenRouter credential mismatch described by the linked report. This read-only review did not execute a reproduction.

Is this the best way to solve the issue?

The endpoint-aware approach coherently preserves existing references and fixes the prior pin and authored-row defects; final acceptance remains conditional on the shared plugin contract decision and package verification.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f5a30f848467.

Labels

Label justifications:

  • P1: The documented Arcee-via-OpenRouter workflow can complete onboarding and then fail its first agent request.
  • merge-risk: 🚨 compatibility: The new manifest and SDK contracts need owner acceptance and verification with the separately installed plugin.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The host identifies this as maintainer-authored, exempting the ordinary contributor proof gate. The captured body reports Gateway account and picker-to-reply observations, while explicitly leaving final separately installed Arcee package coverage pending; that remains a compatibility validation requirement.

Evidence

What I checked:

  • Current main retains the original mismatch: Current main's Arcee auth method stores openrouter:default while retaining the arcee model reference. Its manifest has no endpoint-conditioned auth alias, and the catalog resolver still prefers direct credentials before considering OpenRouter. (extensions/arcee/index.ts:106, f5a30f848467)
  • Latest release retains the old configuration: The v2026.9.2 preset still writes the OpenRouter-backed catalog under arcee, and the release manifest has no OpenRouter auth alias. No implemented-on-main or shipped-fix closure is supported. (extensions/arcee/onboard.ts:34, 3928bad9badf)
  • Prior review continuity: The pinned latest commit changes only two optional-chain assertions in the installed-plugin test. The previously reviewed production code is unchanged. The local parent comparison encountered an unavailable blob; the exact GitHub commit patch established this delta. (src/plugins/provider-model-routes.installed.test.ts:154, 9788e674435b)
  • Endpoint and authored-row repair: Early auth selection resolves the selected authored row before projecting its endpoint. The shared matcher prefers exact authored rows, and session creation and pin preservation consume that projection. Focused tests cover direct, routed, incompatible-pin, and competing-row cases. (src/agents/model-auth-provider-route.ts:26, 9788e674435b)
  • Installed-plugin security boundary: Identity resolution uses selected metadata and the existing trusted-official-install loader. The inspected loader retains path, module, and hardlink validation. Tests reject untrusted installed policy and preserve explicitly empty metadata; no new credential store or authorization bypass was established. (src/plugins/provider-model-routes.ts:33, 9788e674435b)
  • Captured behavior evidence and remaining package scope: The supplied body at sourceRevision 899198d432f2d96599ff03213d1952b35ccc36d518941b4c8ff43e9e98e934b6 reports authenticated Gateway account-selection, picker-to-reply, collision, fallback, and catalog-load observations. It explicitly separates source executions from compiled runtime 621dcb063135e31ea0c41878bcd57792ee2f8771 and states that separately installed Arcee package proof remains pending. These observations were not independently rerun.

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Complete the declared packaged installed-Arcee capture for fresh and existing configurations, showing the selected row and account survive through the first reply.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (6 earlier review cycles)
  • reviewed 2026-09-07T20:47:43.839Z sha fc4ff91 :: needs real behavior proof before merge. :: [P1] Match credential aliases against the effective model endpoint
  • reviewed 2026-09-07T21:49:02.472Z sha 601a2bb :: blocked before merge. :: [P1] Apply model endpoint facts before clearing session account pins
  • reviewed 2026-09-08T03:06:43.094Z sha f57dac9 :: blocked before merge. :: [P1] Resolve shortened picker IDs back to authored model rows
  • reviewed 2026-09-08T04:47:34.548Z sha 155f075 :: blocked before merge. :: none
  • reviewed 2026-09-08T07:11:35.726Z sha b0c8a9c :: blocked before merge. :: none
  • reviewed 2026-09-08T08:08:49.476Z sha 4d560b9 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. proof: sufficient ClawSweeper judged the real behavior proof convincing. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 7, 2026
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. label Sep 8, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 8, 2026
@obviyus

obviyus commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-admin-merge
pr: 141541
head: b0c8a9c
scope: owner-review

@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 8, 2026
obviyus added a commit that referenced this pull request Sep 9, 2026
…2898)

Arcee setup could save an OpenRouter account that the first reply did not use. This repair keeps model identity, the selected endpoint and the account consistent through setup, catalog selection, session creation and execution.

Related: #112747, #113097

## Changes

- Registered setup uses the shared connection-config helper to save connection settings and retain authored rows. Replace mode generates detached model rows through lazy catalog builders, so editing one setup result cannot change later defaults. Public preset helpers retain eager catalog behavior.
- Credential readiness, session pins and execution use the selected model endpoint. Endpoint-conditioned auth aliases extend the existing manifest value shape; string aliases remain supported. Stored credential realms, explicit bindings, linked accounts and account order stay authoritative.
- Provider-owned identity joins wire and logical model names without duplicate picker rows or false fallback notices. Exact authored rows retain their endpoint, headers, limits, aliases and precedence. Genuine provider/model changes remain distinct.
- Identity lookup uses selected, trusted installed-plugin metadata when the provider is outside the core package. Empty/captured metadata and loader failures retain their existing meanings.
- Catalog lookup binds the provider policy once per synchronous search. It preserves first-match order, canonical aliases, unique case-insensitive fallback and providerless ambiguity, while removing repeated registry work for each scanned row. This lookup change adds no cross-call cache or new data.

## Validation

- Main reproduced the OpenRouter credential failure. Retained candidate and direct/both-account/mixed-endpoint controls reach the real Gateway path through isolated synthetic transport.
- Authenticated account-link and session-creation proof distinguishes stored and received credentials. The candidate retains the linked work account; the baseline sends the other account. Later primary selection and incompatible-endpoint controls keep their original results.
- Authored-row and competing-row observations preserve endpoint, header, credential, run budget and exact-row precedence after selecting a shortened catalog ID.
- Six compiled helper controls, two real interactive setup routes, profile/precedence/cancellation observations and the same independent source-blind review pass all seven original and four supplemental clauses at their recorded scopes.
- The canonical core tarball passed its complete integrity checker. Arcee was separately installed through the normal npm-prefixed CLI against an isolated registry serving the actual built package. Public inspection reports genuine official trust and the expected registry integrity; all nine installed files match the archive. Normal package lifecycle and consent ran without manual marker or trust changes.
- That installed plugin then handled normal setup, authenticated `models.list`, `sessions.create` and the first visible reply. The catalog exposes the logical Arcee ID; transport uses the stored OpenRouter account and its wire ID. The completed receipt correctly reports no model switch. Config remains unchanged after the turn, and all consumers stop.
- The resolved merge with pinned target `338a53fbde2cd2668e987156a22b4383b4207bdc` preserves separate public and runtime catalog rows and inherited manifest fields. The affected catalog-route file passes 18 cases; Arcee visibility passes four cases, including the new unmanaged-row identity check. Normal formatting, commit hooks and SSH signing pass on `0f25a8723c45016b1a93591f3525021783a85789`.
- The registered direct and OpenRouter setup routes both reproduced shared generated-cost mutation. The shared-helper correction passes all 29 cases in the affected Arcee index file, including both new clone regressions, with zero lint warnings/errors, normal formatting, hooks and SSH signing. This result belongs to `8f564706c77d5c6da37aedd7f7eb0300058abb13`; earlier package and public observations retain their original identities.
- CI on the merge found one stale import and a command-file size limit. The follow-up removes the unused import and reuses the existing auth-lookup options object. Targeted lint reports zero warnings and errors for both files; normal formatting, hooks and signed commits pass. The existing behavior reports retain their tested identities.
- The current lookup correction reduces 400 real source lookups from 80,600 policy reads / 2.57 seconds to 400 reads / 0.043 seconds. Five existing identity controls, formatting, lint, import-cycle and whitespace checks pass. The unchanged 400-model, 11-agent required CI test remains the final performance check on this new revision; the earlier compiled timeout is retained.

Package proof uses build `5ef331fa92c3c9f71ed260203cb6a2459225797e` from raw input `4d560b9e47640c7e5ce1cfc2967baa390cb1e854`. The subsequent test-only correction, lookup optimization and shared setup-helper cutover are not restamped into that package. Earlier compiled `621dcb063135e31ea0c41878bcd57792ee2f8771` and source proofs keep their original identities. All traffic is synthetic; browser interaction and real vendor authentication are not claimed. Earlier failed layouts, memory stops, wrapper errors and incomplete attempts remain available with their resolving evidence. Fresh exact-head review and required CI precede merge.


Replaces #141541 because its PR record does not reflect the pushed head. This replacement preserves the signed contribution history and original author, @obviyus, and resolves the actual target-branch conflicts. The original PR stays open until verified replacement landing; its reviews and failure history remain part of the record.

Co-authored-by: Ayaan Zaidi <[email protected]>
@obviyus

obviyus commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #142898, verified merged as 8bc0bac after clean exact-head review and successful required CI. The replacement preserves the signed contribution history, scoped proof and earlier failures.

@obviyus obviyus closed this Sep 9, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 10, 2026
…nclaw#142898)

Arcee setup could save an OpenRouter account that the first reply did not use. This repair keeps model identity, the selected endpoint and the account consistent through setup, catalog selection, session creation and execution.

Related: openclaw#112747, openclaw#113097

## Changes

- Registered setup uses the shared connection-config helper to save connection settings and retain authored rows. Replace mode generates detached model rows through lazy catalog builders, so editing one setup result cannot change later defaults. Public preset helpers retain eager catalog behavior.
- Credential readiness, session pins and execution use the selected model endpoint. Endpoint-conditioned auth aliases extend the existing manifest value shape; string aliases remain supported. Stored credential realms, explicit bindings, linked accounts and account order stay authoritative.
- Provider-owned identity joins wire and logical model names without duplicate picker rows or false fallback notices. Exact authored rows retain their endpoint, headers, limits, aliases and precedence. Genuine provider/model changes remain distinct.
- Identity lookup uses selected, trusted installed-plugin metadata when the provider is outside the core package. Empty/captured metadata and loader failures retain their existing meanings.
- Catalog lookup binds the provider policy once per synchronous search. It preserves first-match order, canonical aliases, unique case-insensitive fallback and providerless ambiguity, while removing repeated registry work for each scanned row. This lookup change adds no cross-call cache or new data.

## Validation

- Main reproduced the OpenRouter credential failure. Retained candidate and direct/both-account/mixed-endpoint controls reach the real Gateway path through isolated synthetic transport.
- Authenticated account-link and session-creation proof distinguishes stored and received credentials. The candidate retains the linked work account; the baseline sends the other account. Later primary selection and incompatible-endpoint controls keep their original results.
- Authored-row and competing-row observations preserve endpoint, header, credential, run budget and exact-row precedence after selecting a shortened catalog ID.
- Six compiled helper controls, two real interactive setup routes, profile/precedence/cancellation observations and the same independent source-blind review pass all seven original and four supplemental clauses at their recorded scopes.
- The canonical core tarball passed its complete integrity checker. Arcee was separately installed through the normal npm-prefixed CLI against an isolated registry serving the actual built package. Public inspection reports genuine official trust and the expected registry integrity; all nine installed files match the archive. Normal package lifecycle and consent ran without manual marker or trust changes.
- That installed plugin then handled normal setup, authenticated `models.list`, `sessions.create` and the first visible reply. The catalog exposes the logical Arcee ID; transport uses the stored OpenRouter account and its wire ID. The completed receipt correctly reports no model switch. Config remains unchanged after the turn, and all consumers stop.
- The resolved merge with pinned target `894dc67cbfd95b5218bc1afab8eddaa4f0fd414c` preserves separate public and runtime catalog rows and inherited manifest fields. The affected catalog-route file passes 18 cases; Arcee visibility passes four cases, including the new unmanaged-row identity check. Normal formatting, commit hooks and SSH signing pass on `0f25a8723c45016b1a93591f3525021783a85789`.
- The registered direct and OpenRouter setup routes both reproduced shared generated-cost mutation. The shared-helper correction passes all 29 cases in the affected Arcee index file, including both new clone regressions, with zero lint warnings/errors, normal formatting, hooks and SSH signing. This result belongs to `8f564706c77d5c6da37aedd7f7eb0300058abb13`; earlier package and public observations retain their original identities.
- CI on the merge found one stale import and a command-file size limit. The follow-up removes the unused import and reuses the existing auth-lookup options object. Targeted lint reports zero warnings and errors for both files; normal formatting, hooks and signed commits pass. The existing behavior reports retain their tested identities.
- The current lookup correction reduces 400 real source lookups from 80,600 policy reads / 2.57 seconds to 400 reads / 0.043 seconds. Five existing identity controls, formatting, lint, import-cycle and whitespace checks pass. The unchanged 400-model, 11-agent required CI test remains the final performance check on this new revision; the earlier compiled timeout is retained.

Package proof uses build `5ef331fa92c3c9f71ed260203cb6a2459225797e` from raw input `4d560b9e47640c7e5ce1cfc2967baa390cb1e854`. The subsequent test-only correction, lookup optimization and shared setup-helper cutover are not restamped into that package. Earlier compiled `621dcb063135e31ea0c41878bcd57792ee2f8771` and source proofs keep their original identities. All traffic is synthetic; browser interaction and real vendor authentication are not claimed. Earlier failed layouts, memory stops, wrapper errors and incomplete attempts remain available with their resolving evidence. Fresh exact-head review and required CI precede merge.


Replaces openclaw#141541 because its PR record does not reflect the pushed head. This replacement preserves the signed contribution history and original author, @obviyus, and resolves the actual target-branch conflicts. The original PR stays open until verified replacement landing; its reviews and failure history remain part of the record.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations docs Improvements or additions to documentation extensions: arcee gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant