Skip to content

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

Merged
obviyus merged 15 commits into
mainfrom
repair/pr-141541
Sep 9, 2026
Merged

obviyus merged 15 commits into
mainfrom
repair/pr-141541

Conversation

@obviyus

@obviyus obviyus commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Provider setup could save an account that the first reply did not use. Model names, endpoints, and selected credentials could diverge across setup and execution.

Why This Change Was Made

Setup shares connection configuration and produces detached model rows. Credential selection follows the selected endpoint, while provider-owned identity joins catalog and wire names without duplicate choices. Catalog lookup resolves policy once per search.

User Impact

Setup, catalog selection, session creation, and replies use the intended endpoint and account. Authored rows, explicit bindings, linked accounts, and account order retain precedence.

Evidence

Real Gateway setup, account-link, session-creation, and first-reply checks with controlled transport reproduced the wrong credential before the fix and selected the linked account afterward. Normal installed-plugin setup and replies passed. Focused identity and row-isolation tests passed; 400 lookups reduced policy reads from 80,600 to 400. Installed-package proof predates later setup-helper and lookup changes; live authentication and browser interaction were not claimed.

Related: #112747, #113097. Replaces #141541 and preserves the original contribution by @obviyus.

@obviyus
obviyus requested a review from a team as a code owner September 9, 2026 06:44
@clawsweeper

clawsweeper Bot commented Sep 9, 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: XL maintainer Maintainer-authored PR labels Sep 9, 2026
@obviyus obviyus self-assigned this Sep 9, 2026
@obviyus

obviyus commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-admin-merge
pr: 142898
head: f23f8be
scope: owner-review

@clawsweeper

clawsweeper Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 9, 2026, 6:14 AM ET / 10:14 UTC (Revision 4).

ClawSweeper review

What this changes

The PR preserves authored Arcee models and carries the selected endpoint, credentials, and logical model identity through onboarding, catalog selection, sessions, and execution.

Merge readiness

⛔ Blocked before merge - 6 items remain

The prior onboarding-helper finding is resolved, and no remaining blocking code defect was identified. The credential repair remains necessary on current main; this maintainer-engaged PR is not a cleanup-close candidate.

Priority: P1
Reviewed head: 8f564706c77d5c6da37aedd7f7eb0300058abb13
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent repair with substantive production-path observations and a resolved prior finding; owner involvement remains a separate merge prerequisite.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Retained Gateway and installed-package observations exercise setup, catalog selection, session creation, and first-reply transport with distinguished credentials and incompatible-endpoint controls. They support the routing repair at their recorded revisions; current helper regression results supplement them without restamping the older package or claiming vendor authentication.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): Retained Gateway and installed-package observations exercise setup, catalog selection, session creation, and first-reply transport with distinguished credentials and incompatible-endpoint controls. They support the routing repair at their recorded revisions; current helper regression results supplement them without restamping the older package or claiming vendor authentication.
Evidence reviewed 10 items Prior finding resolved: Both registered setup functions now call applyProviderConnectionConfig with lazy catalog builders. The existing shared helper clones generated replace-mode rows; the two public helpers retain eager catalog behavior.
Shared helper and merged history: The commit API identifies obviyus as the author of the merged shared-helper change and shows the connection helper and structured cloning in its patch. This corroborates the existing implementation that the revised branch now reuses.
Repair still needed on main: Fetched main’s Arcee manifest has no endpoint-conditioned auth alias, and its catalog code still prioritizes direct credentials before inspecting the configured endpoint. The related merged shared-helper PR does not implement this Arcee credential repair.
Findings None None.
Security None None.

How this fits together

Arcee’s provider plugin connects setup and model discovery to OpenClaw’s shared credential selection and agent execution. The selected model endpoint determines which stored credential realm supplies the request, while logical model identity keeps catalog rows and reply diagnostics consistent.

flowchart LR
  A[Setup and saved model settings] --> B[Arcee provider plugin]
  B --> C[Logical model catalog]
  C --> D[Selected model endpoint]
  E[Stored accounts and session pins] --> F[Endpoint-aware credential selection]
  D --> F
  F --> G[Provider request]
  G --> H[Reply and route receipt]
Loading

Decision needed

Question Recommendation
Has a listed security owner requested or reviewed the endpoint-conditioned credential selection changes? Establish listed-owner involvement: Have the listed security team confirm its review or identify the existing qualifying request for this credential-routing repair.

Why: Repository policy requires listed-owner involvement for these authentication paths, and the available approval markers do not verify that role.

Before merge

  • Resolve merge risk (P1) - An updated Arcee plugin paired with an older host can lack the new SDK export or endpoint-alias support; publication must preserve matching host compatibility metadata.
  • Resolve merge risk (P1) - Listed security-owner involvement is not established by the supplied approval markers.
  • Complete next step (P2) - Confirm listed security-owner involvement for the endpoint-conditioned authentication changes before landing.
  • 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 +430, Tests +1793, Docs +12. Total +2235 across 77 files.

View PR surface stats
Area Files Added Removed Net
Source 52 637 207 +430
Tests 23 1907 114 +1793
Docs 2 13 1 +12
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 77 2557 322 +2235

Review metrics

Metric Value Why it matters
Plugin contract expansion 1 extended manifest value shape; 1 additional SDK export Endpoint-conditioned aliases and merged provider-config access require coordinated host/plugin compatibility.

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 is a candidate repair for the canonical Arcee credential mismatch, with broader model-preservation work.

Members:

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

Merge-risk options

Maintainer options:

  1. Publish matching host and plugin (recommended)
    Use the existing release version synchronization and generated host peer range so the updated Arcee plugin requires a host that understands its SDK and manifest contracts.
  2. Pause independent plugin publication
    Do not publish this plugin independently if the matching host compatibility floor cannot be guaranteed.

Technical review

Best possible solution:

Retain the provider-owned endpoint aliases and shared onboarding helper, preserving existing accounts and authored rows through a coordinated host/plugin release.

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

Yes: isolated Arcee-via-OpenRouter onboarding followed by an Arcee agent turn exercises the documented mismatch, and current-main source still lacks the required alias. This review inspected source and retained observations without executing a reproduction.

Is this the best way to solve the issue?

Yes: the revised branch reuses the canonical setup helper and preserves the shipped Arcee model identity instead of migrating users to a different provider namespace.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Retained Gateway and installed-package observations exercise setup, catalog selection, session creation, and first-reply transport with distinguished credentials and incompatible-endpoint controls. They support the routing repair at their recorded revisions; current helper regression results supplement them without restamping the older package or claiming vendor authentication.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P1: The repair addresses documented Arcee onboarding that succeeds but leaves the first agent turn unable to use its saved OpenRouter credentials.
  • merge-risk: 🚨 compatibility: The separately distributed Arcee plugin now consumes host functionality absent from older releases.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Retained Gateway and installed-package observations exercise setup, catalog selection, session creation, and first-reply transport with distinguished credentials and incompatible-endpoint controls. They support the routing repair at their recorded revisions; current helper regression results supplement them without restamping the older package or claiming vendor authentication.
  • proof: sufficient: Contributor real behavior proof is sufficient. Retained Gateway and installed-package observations exercise setup, catalog selection, session creation, and first-reply transport with distinguished credentials and incompatible-endpoint controls. They support the routing repair at their recorded revisions; current helper regression results supplement them without restamping the older package or claiming vendor authentication.

Evidence

What I checked:

  • Prior finding resolved: Both registered setup functions now call applyProviderConnectionConfig with lazy catalog builders. The existing shared helper clones generated replace-mode rows; the two public helpers retain eager catalog behavior. (extensions/arcee/onboard.ts:54, 8f564706c77d)
  • Shared helper and merged history: The commit API identifies obviyus as the author of the merged shared-helper change and shows the connection helper and structured cloning in its patch. This corroborates the existing implementation that the revised branch now reuses. (src/plugin-sdk/provider-onboard.ts:685, 0f3db48abbf0)
  • Repair still needed on main: Fetched main’s Arcee manifest has no endpoint-conditioned auth alias, and its catalog code still prioritizes direct credentials before inspecting the configured endpoint. The related merged shared-helper PR does not implement this Arcee credential repair. (extensions/arcee/openclaw.plugin.json:8, 588436b7eaa4)
  • Latest release context: The supplied latest release retains the previous catalog-seeding Arcee setup helpers. No shipped fix for the complete requested behavior was established. (extensions/arcee/onboard.ts:19, 1391f7cd2d40)
  • Credential and authority boundaries: Endpoint projection precedes credential compatibility checks without rewriting stored credential providers. Session creation retains its current-authority guards and personal-account ownership check before committing the selected default. (src/gateway/session-create-service.ts:393, 8f564706c77d)
  • Behavior proof and source identities: The captured PR body reports authenticated Gateway setup, models.list, sessions.create, and first-reply observations using independently distinguished stored and received credentials, plus mixed-endpoint and authored-row controls. Installed-package proof belongs to build 5ef331fa92c3c9f71ed260203cb6a2459225797e from source 4d560b9. Later lookup and shared-helper changes are expressly excluded from that package identity; the current helper correction separately reports 29 passing Arcee checks. Synthetic transport proves OpenClaw routing, not real vendor authentication. (4d560b9e4764)

Likely related people:

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

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 (3 earlier review cycles)
  • reviewed 2026-09-09T06:49:26.119Z sha f23f8be :: blocked before merge. :: none
  • reviewed 2026-09-09T08:34:09.060Z sha 0f25a87 :: blocked before merge. :: none
  • reviewed 2026-09-09T08:50:23.453Z sha f61ab54 :: blocked before merge. :: [P1] [P1] Reuse the existing connection-only onboarding helper

@obviyus

obviyus commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-admin-merge
pr: 142898
head: 0f25a87
scope: owner-review

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. labels Sep 9, 2026
@obviyus

obviyus commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-admin-merge
pr: 142898
head: f61ab54
scope: owner-review

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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. labels Sep 9, 2026
@obviyus

obviyus commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-admin-merge
pr: 142898
head: 8f56470
scope: owner-review

@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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 9, 2026
@obviyus
obviyus merged commit 8bc0bac into main Sep 9, 2026
181 of 183 checks passed
@obviyus
obviyus deleted the repair/pr-141541 branch September 9, 2026 10:24
@obviyus

obviyus commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

Landed in 8bc0bac after a clean exact-head local review and required CI.

  • Bug: Arcee setup could save an OpenRouter account that the first reply did not use, while model edits could lose authored settings or change later defaults.
  • Fix: Shared owners now keep the model, endpoint and account consistent; registered setup uses the existing connection helper and copies generated replace-mode rows.
  • Proof: Both new clone regressions failed before the fix; all 29 affected Arcee cases passed afterward. Current CI also served 400 models to each of 11 agents: 4,400 available rows, no provider traffic and 13.219 seconds for the 11 catalog requests. That built-Gateway result belongs to CI merge build de057660cfbc635c0b5992b5d597f9537bb9dc0e. Retained packaged installation, authenticated session creation and first-reply evidence keep their original build identities.

The recorded owner-review approval covered the procedural ownership hold. Code, security, proof and required CI passed their normal gates. The existing paired host/plugin release process remains required. Earlier failed and incomplete attempts remain preserved; this success does not classify the earlier Telegram network failure.

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. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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