Skip to content

refactor(onboard): share generated custom model definition - #147915

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/custom-provider-model-definition-20260914
Sep 14, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/custom-provider-model-definition-20260914

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Custom-provider onboarding repeats most of the generated model definition in separate Azure and non-Azure object literals.

User Impact

Generated model values and field order stay unchanged. Azure definitions retain their context/token limits and compatibility field; non-Azure definitions still omit that field. Existing model updates keep their current preservation rules.

Why This Change Was Made

Use one model literal with the existing Azure-specific values selected in place. No helper, configuration surface or API is added. Production: −10 lines. Tests: +20 lines.

Evidence

  • Personal review covered the complete construction owner, public configuration and interactive tests, interactive/non-interactive callers, onboarding entrypoint, model type/schema and the change that introduced the Azure-specific definition.
  • Three existing public cases now assert complete ordered model entries for an Azure reasoning deployment, Foundry non-reasoning deployment and non-Azure model. Existing re-onboarding, input-mode and selected-agent coverage remains.
  • Signed head f0fc9a77cc5be3901f2d0fa52afbc64f05d66916 passed local whitespace checks and required P2 review with no actionable findings. The review used the supplied diff; primary review supplied the complete source and contract context. The staged classifier selected normal core lanes without executing them.
  • Ready CI attempt 1 passed 119 jobs with 17 unselected skips, including the required gate. The actual tested merge bde89994397952e91ed163e89650ad7c135f6be6 contains the exact reviewed source and tests. Production/test types, lint, pinned formatting, dependencies, boundaries and build passed.
  • Actual onboarding execution passed 63 files / 1,115 tests without skips. This includes all 39 custom-configuration cases, the three strengthened model-definition cases, 15 custom-interactive cases, 96 onboarding entrypoint cases, 28 non-interactive auth-choice cases and two config-write cases. These use fixtures and injected boundaries, not live Azure/provider calls.
  • The latest full ClawSweeper review, Revision 2, covers the exact head and has no findings or Before merge items. Stale local dependencies were not used for runtime proof. The UI budget passed at 361,695 bytes against 361,938 bytes; no bundle change is attributed to this refactor.
  • Compatibility: no persisted field, default value, provider/API selection, authentication, URL normalization or request behavior changes. The existing-model merge is unchanged. No migration or live Azure/provider execution is claimed.

@vincentkoc vincentkoc self-assigned this Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 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.

@vincentkoc
vincentkoc marked this pull request as ready for review September 14, 2026 04:51
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: S maintainer Maintainer-authored PR labels Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper

clawsweeper Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 3:08 AM ET / 07:08 UTC (Revision 3).

ClawSweeper review

What this changes

Consolidates custom-provider onboarding model definitions while preserving Azure-specific settings and strengthening three existing configuration tests.

Merge readiness

✅ Ready for maintainer review

Keep open: this remains a useful, behavior-preserving cleanup absent from current main. No actionable correctness or security findings remain, consistent with the prior review of the same head.

Priority: P3
Reviewed head: f0fc9a77cc5be3901f2d0fa52afbc64f05d66916

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, equivalent refactor with useful configuration assertions, successful relevant CI, and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored refactor is exempt from external-contributor live proof and changes no authority boundary; its fixture-based configuration tests cover the shared model constructor but are not live Azure evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored refactor is exempt from external-contributor live proof and changes no authority boundary; its fixture-based configuration tests cover the shared model constructor but are not live Azure evidence.
Evidence reviewed 7 items Equivalent model construction: The reasoning predicate already includes isAzure, so using it in the shared literal preserves false for non-Azure models. Context and output limits retain their original branches, compatibility remains Azure-only, and the existing-model merge is unchanged.
Configuration boundary coverage: Read the complete test module. Three existing cases now check complete ordered model entries; retained cases cover customized non-Azure fields, Azure re-onboarding, explicit image-input choices, and existing thinking preferences. These assertions exercise returned configuration without introducing a test-only production seam.
Current-main necessity: The current-main comparison contains the same focused production refactor as the pinned introduced patch: main still uses separate model literals. This comparison supports necessity; introduction ownership comes from the supplied merge-base-to-head evidence.
Findings None None.
Security None None.

How this fits together

Custom-provider onboarding turns wizard answers or CLI flags into provider configuration. The shared configuration owner creates model entries or merges them with existing settings before onboarding saves them.

flowchart TD
  A[Wizard answers] --> C[Custom provider configuration]
  B[CLI flags] --> C
  C --> D[Select Azure or general defaults]
  D --> E[Merge existing model settings]
  E --> F[Provider configuration for saving]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -10, Tests +20. Total +10 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 10 20 -10
Tests 1 29 9 +20
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 39 29 +10

Review metrics

None.

Technical review

Best possible solution:

Keep model construction in the existing shared onboarding owner with identical generated configuration and existing-setting preservation.

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

Not applicable: this PR reports duplicated construction code, not a runtime defect; the duplication remains visible on current main.

Is this the best way to solve the issue?

Yes: consolidating the literals inside the existing owner removes duplication without adding an abstraction, changing defaults, or altering re-onboarding rules.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is a bounded internal cleanup that preserves onboarding behavior and adds no configuration surface.
  • 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 MEMBER-authored refactor is exempt from external-contributor live proof and changes no authority boundary; its fixture-based configuration tests cover the shared model constructor but are not live Azure evidence.

Evidence

What I checked:

  • Equivalent model construction: The reasoning predicate already includes isAzure, so using it in the shared literal preserves false for non-Azure models. Context and output limits retain their original branches, compatibility remains Azure-only, and the existing-model merge is unchanged. (src/commands/onboard-custom-config.ts:631, f0fc9a77cc5b)
  • Configuration boundary coverage: Read the complete test module. Three existing cases now check complete ordered model entries; retained cases cover customized non-Azure fields, Azure re-onboarding, explicit image-input choices, and existing thinking preferences. These assertions exercise returned configuration without introducing a test-only production seam. (src/commands/onboard-custom-config.test.ts:424, f0fc9a77cc5b)
  • Current-main necessity: The current-main comparison contains the same focused production refactor as the pinned introduced patch: main still uses separate model literals. This comparison supports necessity; introduction ownership comes from the supplied merge-base-to-head evidence. (src/commands/onboard-custom-config.ts:649, 322e27210a48)
  • Latest-release comparison: The supplied latest release, v2026.9.4, also contains separate Azure and non-Azure literals; the consolidation is not present there. (src/commands/onboard-custom-config.ts:649, 3a9d69db306c)
  • Verified CI result: GitHub confirms the onboarding test job succeeded for the pinned head: https://github.com/openclaw/openclaw/actions/runs/34807553806/job/103862988490. A separate API read also confirmed openclaw/ci-gate succeeded. The captured body identifies the tests as fixture-based and makes no live-provider claim; local tests were not run during this read-only review. (f0fc9a77cc5b)
  • Review continuity and protected authorship: The supplied completed review covers this exact head with no findings or published rank-up moves. Live GitHub metadata confirms the PR remains open, assigned to vincentkoc, and MEMBER-authored; the supplied maintainer label also prevents automatic closure. (f0fc9a77cc5b)

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: 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 (2 earlier review cycles)
  • reviewed 2026-09-14T05:06:47.292Z sha f0fc9a7 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-14T05:13:01.114Z sha f0fc9a7 :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc merged commit a944c12 into main Sep 14, 2026
260 of 261 checks passed
@vincentkoc
vincentkoc deleted the refactor/custom-provider-model-definition-20260914 branch September 14, 2026 07:09
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 14, 2026
* commit '8e6fe8e02ddb51bfec4e80071f0f2adcae4cf098': (47 commits)
  refactor: simplify Gateway health response parsing (#147834)
  fix: avoid Gateway stalls when renaming sessions (#147869)
  refactor(plugins): reuse worker optional-method validation (#147925)
  refactor(infra): remove unreachable firewall diagnostic fallback (#147882)
  fix(ui): open attached automations from session hovercards (#147749)
  refactor(reply): share usage-bar numeric coercion (#147863)
  fix(doctor): report warnings for keyed agent configs (#123058)
  perf(plugins): reuse complete registry comparisons (#147893)
  fix(workboard): await lifecycle sweep completion in tests (#147950)
  fix: reduce stalls when browsing large session inventories (#147911)
  refactor(onboard): share custom model definition (#147915)
  feat(ios): collapse completed chat work above replies (#148002)
  fix(voice-call): retain state runtime for deferred streams (#147689)
  test(qa): compare Telegram entities semantically (#147752)
  fix(plugins): preserve runtime scope for deferred CLI actions (#147688)
  test(qa): keep Slack progress marker visible (#147748)
  test(qa): finish channel picker prompts (#147730)
  test(tui): handle auth restriction prompt (#147729)
  fix(qa): retain onboarding prompts across redraw bursts (#147687)
  fix(qa): seed Teams ambiguous timeout deterministically (#147686)
  ...
vincentkoc added a commit to SunnyShu0925/openclaw that referenced this pull request Sep 14, 2026
* commit '069710f909f0a7158777d0fc0bf1eab84e20c699': (45 commits)
  refactor(infra): consolidate update campaign reset ownership (openclaw#146555)
  refactor: simplify Gateway health response parsing (openclaw#147834)
  fix: avoid Gateway stalls when renaming sessions (openclaw#147869)
  refactor(plugins): reuse worker optional-method validation (openclaw#147925)
  refactor(infra): remove unreachable firewall diagnostic fallback (openclaw#147882)
  fix(ui): open attached automations from session hovercards (openclaw#147749)
  refactor(reply): share usage-bar numeric coercion (openclaw#147863)
  fix(doctor): report warnings for keyed agent configs (openclaw#123058)
  perf(plugins): reuse complete registry comparisons (openclaw#147893)
  fix(workboard): await lifecycle sweep completion in tests (openclaw#147950)
  fix: reduce stalls when browsing large session inventories (openclaw#147911)
  refactor(onboard): share custom model definition (openclaw#147915)
  feat(ios): collapse completed chat work above replies (openclaw#148002)
  fix(voice-call): retain state runtime for deferred streams (openclaw#147689)
  test(qa): compare Telegram entities semantically (openclaw#147752)
  fix(plugins): preserve runtime scope for deferred CLI actions (openclaw#147688)
  test(qa): keep Slack progress marker visible (openclaw#147748)
  test(qa): finish channel picker prompts (openclaw#147730)
  test(tui): handle auth restriction prompt (openclaw#147729)
  fix(qa): retain onboarding prompts across redraw bursts (openclaw#147687)
  ...
vincentkoc added a commit to nvtoroy/openclaw that referenced this pull request Sep 14, 2026
* commit '4ddb9ed21245eaca9f243e555a5ec070aaaf0dad': (113 commits)
  fix: avoid Gateway stalls when renaming sessions (openclaw#147869)
  refactor(plugins): reuse worker optional-method validation (openclaw#147925)
  refactor(infra): remove unreachable firewall diagnostic fallback (openclaw#147882)
  fix(ui): open attached automations from session hovercards (openclaw#147749)
  refactor(reply): share usage-bar numeric coercion (openclaw#147863)
  fix(doctor): report warnings for keyed agent configs (openclaw#123058)
  perf(plugins): reuse complete registry comparisons (openclaw#147893)
  fix(workboard): await lifecycle sweep completion in tests (openclaw#147950)
  fix: reduce stalls when browsing large session inventories (openclaw#147911)
  refactor(onboard): share custom model definition (openclaw#147915)
  feat(ios): collapse completed chat work above replies (openclaw#148002)
  fix(voice-call): retain state runtime for deferred streams (openclaw#147689)
  test(qa): compare Telegram entities semantically (openclaw#147752)
  fix(plugins): preserve runtime scope for deferred CLI actions (openclaw#147688)
  test(qa): keep Slack progress marker visible (openclaw#147748)
  test(qa): finish channel picker prompts (openclaw#147730)
  test(tui): handle auth restriction prompt (openclaw#147729)
  fix(qa): retain onboarding prompts across redraw bursts (openclaw#147687)
  fix(qa): seed Teams ambiguous timeout deterministically (openclaw#147686)
  refactor(mcp): load OAuth only when credentials are needed (openclaw#147884)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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