Repository navigation
Conversation
Contributor
|
🦞👀 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. |
obviyus
marked this pull request as ready for review
September 2, 2026 11:01
This was referenced Sep 10, 2026
Collaborator
Author
|
PR #136257 landed as focused changes and is being closed without merging the original branch.
Catalog and prepared view
Login: Auth A–H and legacy retirement
Setup and migration
Dead-path sweeps
Channel menus and message presentation
Native apps
Upgrade safety and final accounting gaps
Documentation
Deliberately dropped or superseded
Follow-ups and proof limits
|
Collaborator
Author
|
Closed: landed as the focused PRs listed above. |
This was referenced Sep 11, 2026
This was referenced Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Session-Only Model Selection
An ordinary admin model choice in a chat could also rewrite the agent or shared default. The omitted scope used a legacy
effectivepolicy that inferred a configuration target from the agent's current setup.Commit
9de42a0e26804c4e04d3f02a18c03e03a77d65a7makes ordinary selections session-only across the shared command and Gateway policy. It removes the effective-scope branch and requires an explicit target in the internal default writer. Explicit-a/-gcommands and configured agent/global scope retain their authorization and behavior. Public SDK callers that explicitly request persistence keep the shipped v2026.9.1 contract.This intentionally changes the unset
modelSelectionScopebehavior. Owners who want broad persistence must request an agent/global scope or configure it explicitly. No new configuration key, schema, or protocol field is added.The writer audit covered direct and mixed commands, Gateway patches and projections, channel pickers, SDK entry points, setup, migration, and CLI default-setting commands. Source review found no P0-P2 defects in the correction. Automated tests, CI, rebasing, and merge validation remain deferred. This correction removes 25 production lines, 5 test lines, and 1 documentation line net.
The corrected package is deployed. The same read-only admin request reports
modelSelectionTarget: "global"before the correction and"session"afterward; the configured default remains unchanged. The Gateway is healthy and the served Control UI identifies this commit. A verified state backup preceded the graceful service switch. Full manual interaction checks remain pending.Catalog Cutover Checkpoint
Ordinary model-list requests read the published catalog. Startup, lifecycle changes, and explicit refresh own discovery. Existing chats, new chats, commands, and native pickers use the same inventory and availability decisions.
models list --refreshrequests discovery explicitly.This is a staging draft. Earlier focused runs are recorded below; the latest source-review corrections have not been run through automated tests. Further tests, CI, rebasing, and merge validation are deferred until the work is split into smaller PRs. Native Android/Swift compilation remains unverified.
Cutover commit:
87ed7180ac702fa41b3e8be804550e5251387146. The source review corrections received a separate read-only review with no further findings.The package built from this commit is installed on a private deployment. The Gateway is healthy, the Control UI serves this build, and the published configured catalog returns 23 models with
grok-4.6available and no refresh failure. The catalog request for the originally reported existing chat and the neutral new-chat catalog both return the same six available xAI models, includinggrok-4.6. A verified state backup preceded the graceful service switch. Full manual interaction checks remain pending.This cutover adds 538 production lines net, 3,796 test/support lines, 28 generated protocol lines, and 87 documentation lines relative to
a26cf855. Production growth supplies shared runtime choices, explicit acquisition outcomes, and session-scoped publication consumers across clients; provider implementation code is net -120 lines.Named follow-up: measure an aggregate memory budget for paginated provider catalogs. The existing 4 MiB per-page and 50-page limits are unchanged by this cutover.
The checkpoints below describe earlier revisions.
What Problem This Solves
Model lists and provider sign-in were spread across parallel implementations: the Gateway
models.listprojection, the CLImodels list, chat/models, and the Control UI each rebuilt catalog and auth state their own way, and provider login existed as separate CLI, chat, Telegram, and UI flows with their own compatibility paths. First-run setup ran a multi-file staged-store probe machinery to verify a credential.Why This Change Was Made
This collapses the model-list cleanup (#135912) and the provider-login work into one change on
main, after a full de-slop pass:models.listreads the published catalog. The online CLI uses that Gateway API; chat/modelsreads the same prepared owner./login, Telegram/login, and the Control UI.openclaw.setup.auth.startowns interactive sign-in.Integration with current
mainkeeps the worker discovery plan (#137063), worker plugin scoping (#135486), auth order and profile identity (#132450, #137022), the plugin-owned Codex and Claude login readers, and the built-artifact preference for setup revalidation (#136036). It drops main's readiness reobservation (#134524) and the stale-refresh catalog mode (#136915), because the prepared build already carries the provider-auth facts those paths re-derived.User Impact
openclaw models list,/models, and the Control UI model picker show the same rows and availability from one prepared catalog./login <provider>works the same in chat, Telegram, the CLI, and the Control UI.Earlier reported diff versus
main: net −3,535 production lines and −14,869 test lines.Latest Draft Checkpoint
Head:
8d49c1eadb1. This remains a draft staging PR.OAuth Provider Menu Checkpoint
Head:
55ad0b353952. This remains a draft staging PR./loginnow lists available OAuth and device-code providers, one provider per button where command buttons are supported. It never starts sign-in before selection, even when only one provider is available./login <provider>.channelLogin.defaultcontract from runtime, manifest normalization, metadata, the OpenAI manifest, tests, and docs. Existing explicit aliases, including/login codex, remain. This field is absent from the current stable release.Shared Connection Choices Checkpoint
Head:
f15e96a4311c. This remains a draft staging PR./login ollamanow offers Ollama Cloud and Ollama server through a shared core choice reply. Provider plugins supply the labels and methods; channels do not define a separate provider menu.Owner Recognition Checkpoint
Head:
ec762512345. This remains a draft staging PR.Previous Draft Checkpoint
Head:
89e4a4d2a2d. This remains a draft staging PR; no merge, rebase, or PR split was performed.d782767c04b: −2,063 production lines, −437 test lines, and +19 documentation/metadata/tooling lines. Renames are accounted for.Validation:
/models anthropiccommand lists the same seven. Anthropic inventory also agrees across the Gateway's default, configured, and all views./tmp/.gitmarker invalidated its plain-directory assumption. An older broad directive suite also retains its previously observed mock-export collection blocker. Local typechecking/builds were not run, per operator constraints.Evidence
Head under proof:
7da38640ec9990d9a970ce1fdc28b751cf4306e9.Testbox (exact head)
pnpm tsgo:allgreen ontbx_01m1masksfmmrw9ygjzs83jtat(lane 23 atd0f4adf, lane 24 at7da38640ec9990d9a970ce1fdc28b751cf4306e9).7da3864, run as directory shards on fresh Testboxes (a single whole-suitepnpm testexceeds the 2-hour box lifetime):pnpm test ui packages test: 1,122 files passed (222 + 826 + 33 + 41).pnpm test src: 560 files passed, 1 failed:src/node-host/node-worker-transfer-client.git.test.ts(Git transfer byte counts off by 16 bytes on the Ubuntu runner; passes locally on git 2.54;src/node-hostis untouched by this branch).pnpm test extensions(solo ontbx_01m1mx6t2k3eg343dmd134xtgp): every extension project passed (75 project summaries, including the 68-, 102-, and 54-file projects); the run then ends with vitest'sError: Worker exited unexpectedly.pnpm test src/gateway(gateway-core in one process): 190 files pass, then the sameWorker exited unexpectedly. This reproduces onorigin/main(99c589f) in a clean local worktree, so it is a runner/memory limit of the non-isolated gateway project, not a change in this PR; CI shards avoid it. Twomanaged-image-attachmentsmedia-cap tests fail only in that exhausted state and pass in order-preserving reruns.Reviews
d0f4adf, zero actionable findings;7da3864(test-only plus the worker synthetic-auth fix) reviewed with zero findings, rating pending this evidence.--mode branch --base origin/main): 8 chunks, zero findings, "patch is correct (0.98)".codex review --base origin/main: findings triaged; fixed the worker scoped auth refresh, starter-model provider check, catalogparams, and the login test seam. Left as follow-ups (design, not defects in this PR): setup verification profile pinning and owner revalidation under persist-first login, New Session picker revalidation while the page stays open,models list --providerwithout--allon runtime-discovered providers, xAI forward-compat defaults for legacy Grok ids.Live: isolated dev gateway (this head's
dist, state dir~/.openclaw-models-test, port 18789, never the operator gateway)models.list view=configured agentId=main: 94 rows, all available.models.list view=all: 104 rows, 94 available; OpenAI rows resolveagentRuntime: { id: "codex", source: "auth" }from the Codex native sign-in (codex login status= ChatGPT). One row (gpt-5.4-nano) staysauth-failedbecause Codex does not serve it.Live: Telegram Test Server (
$telegram-e2e-userbot, Convex-leased credentials, mock provider, fresh gateway per run)/loginwithoutcommands.ownerAllowFrom: bot replies "Only a configured OpenClaw owner can start provider login from Telegram."/loginas configured owner: bot replies "OpenAI login complete using your existing CLI sign-in. Available OpenAI models will update automatically. Your default model is unchanged. Use /models to browse." (Codex import path, no device code needed on this host)./login@botas configured owner: not captured: the leased QA user has no write access to the Test Server group (sendMessage failed (400): Have no write access to the chat, two leases); this is pool setup, not gateway behavior.ok: true(Convex source, isolated TDLib state, Test DC, authorized user, Bot API proxy, group membership).Known tradeoffs called out for review
codexbinary is capped at 3 s.openaiprovider surface; thechannelLoginmanifest contract is new plugin API. Both are the intended product direction of this PR.CLI surface on the same gateway:
openclaw models list --allreturns the same 104 rows / 94 available with OpenAI 10 rows / 9 available;models.authRefreshreturns{ "refreshed": true }and the catalog republishes without a restart.Telegram Test Server event timeline (recorded by the userbot harness, mock provider, 0 provider requests in both runs):
commands.ownerAllowFrom/logincommands.ownerAllowFrom/login