gut(providers): re-apply provider/model cascade after v2026.3.7 sync regression#2350
Merged
alexey-pelykh merged 1 commit intomainfrom Apr 13, 2026
Merged
Conversation
…regression (#2337) Targeted audit (fork HEAD 44b4f92) confirmed 19 provider/model files re-introduced by the v2026.3.7 upstream sync merge (#2298). Re-applies the cascade for the files whose only live consumers are already-dead paths or have in-tree rewire targets. Defers two groups to follow-ups for coordination reasons documented in the PR body. Clean stub deletions (zero external consumers): - agents/pi-embedded-messaging.ts, model-compat.ts, test-helpers/pi-tool-stubs.ts - agents/pi-tools.before-tool-call.{ts,runtime.ts} - auto-reply/reply.directive.directive-behavior.model-directive-test-utils.ts - commands/openai-codex-model-default.ts Stub deletions with rewired consumers: - agents/custom-api-registry.ts — drop dead ensureCustomApiRegistered call in tts/tts-core.ts plus test mock/assertion in tts.test.ts - agents/pi-model-discovery.ts — drop vestigial ModelRegistry vi.mock in gateway/test-helpers.mocks.ts plus the unused piSdkMock state - agents/model-catalog.ts — Telegram vision cascade: remove loadModelCatalog / findModelInCatalog / modelSupportsVision chain from telegram/ bot-message-context.body.ts, bot-message-dispatch.ts, sticker-cache.ts; middleware/runtimes own mediaCapabilities, not the model catalog. Drop catalog mocks in reply.block-streaming.test.ts, session.test.ts, agent.test.ts, cron/isolated-agent/run.test-harness.ts Gateway models/skills cascade: - Delete gateway/server-methods/{models,skills}.ts plus imports, spreads, method list entries, and scope entries in server-methods.ts, server-methods-list.ts, method-scopes.ts - Schema split: rename protocol/schema/agents-models-skills.ts to agents-tools.ts and prune ModelChoice, ModelsList*, SkillsStatus, SkillsBins, SkillsInstall, SkillsUpdate, SkillsSearch, SkillsDetail schemas, types, validators, and protocol-schemas registry entries TUI listModels cascade: - Drop listModels + GatewayModelChoice from tui/gateway-chat.ts - Drop openModelSelector + /model-no-args + /models + Ctrl+L binding from tui-command-handlers.ts and tui.ts. /model <provider/model> still works Session reset model cascade (unblocks #2339 Wave 2): - Delete auto-reply/reply/session-reset-model.ts stub, its import and applyResetModelOverride call block in get-reply.ts, its vi.mock in get-reply.test-mocks.ts, and the 3 applyResetModelOverride test cases in session.test.ts Deferred to follow-ups (documented in PR body): - 6 provider files coupled to onboard-auth.* (huggingface/synthetic/ together/venice/models-config.providers, provider-env-vars) — blocked on #2338 landing first (parallel PR deletes the onboard-auth cluster) - commands-models.ts + Discord/Mattermost model-picker cascade (~2500 LoC) — defer to a dedicated follow-up PR for reviewability Why: v2026.3.7 sync silently re-introduced gutted files; three restored stubs (model-catalog, gateway models/skills handlers) were wired into live call sites, silently neutering Telegram vision detection, node-host skill bins, and TUI listModels. How verified: pnpm check passes (format + tsgo + oxlint), pnpm build passes, pnpm test passes (725 files, 6340 tests, 0 failures), zombie- import gate passes, rebrand leakage check passes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Apr 19, 2026
alexey-pelykh
added a commit
that referenced
this pull request
Apr 21, 2026
…ns RPC + dangling gateway methods (#2413) Closes the final AC grep gaps from #2337 after the provider/model cascade landed via #2350 / #2364 / #2373. Three classes of survivors removed: - Stale `vi.mock("../agents/model-catalog.js", ...)` block in `remoteclaw-tools.session-status.test.ts` — mocks a module deleted in #2350 - Dangling gateway method-list entries for handlers removed in #2350 — `skills.bins`, `models.list` in method-scopes.ts; `models.list`, `skills.status`, `skills.bins`, `skills.install`, `skills.update` in server-methods-list.ts - Active runtime call to `skills.bins` RPC in `node-host/runner.ts` that fails at node-host startup (handler was removed in #2350). Deletes the `SkillBinsCache` class, `resolveSkillBinTrustEntries` + `resolveExecutablePathFromEnv` helpers, the RPC call, and cascades the dead `SkillBinsProvider` / `SkillBinTrustEntry` types from `invoke-types.ts` + `invoke.ts` handler signature cleanup Also bumps `.fork-boundary-mock-baseline` 134 → 133 to lock in the improvement from removing the dead model-catalog mock. Verification: - `git grep "model-catalog\|modelSupportsVision\|loadModelCatalog" src/` → zero - `git grep "models\.list\|skills\.bins\|skillsHandlers\|modelsHandlers" src/` → zero - `pnpm check` passes, `pnpm test` passes (7010/7010), zombie-import gate passes Part of #2337. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
alexey-pelykh
added a commit
that referenced
this pull request
Apr 21, 2026
…ns RPC + dangling gateway methods (#2413) (#2448) Closes the final AC grep gaps from #2337 after the provider/model cascade landed via #2350 / #2364 / #2373. Three classes of survivors removed: - Stale `vi.mock("../agents/model-catalog.js", ...)` block in `remoteclaw-tools.session-status.test.ts` — mocks a module deleted in #2350 - Dangling gateway method-list entries for handlers removed in #2350 — `skills.bins`, `models.list` in method-scopes.ts; `models.list`, `skills.status`, `skills.bins`, `skills.install`, `skills.update` in server-methods-list.ts - Active runtime call to `skills.bins` RPC in `node-host/runner.ts` that fails at node-host startup (handler was removed in #2350). Deletes the `SkillBinsCache` class, `resolveSkillBinTrustEntries` + `resolveExecutablePathFromEnv` helpers, the RPC call, and cascades the dead `SkillBinsProvider` / `SkillBinTrustEntry` types from `invoke-types.ts` + `invoke.ts` handler signature cleanup Also bumps `.fork-boundary-mock-baseline` 134 → 133 to lock in the improvement from removing the dead model-catalog mock. Verification: - `git grep "model-catalog\|modelSupportsVision\|loadModelCatalog" src/` → zero - `git grep "models\.list\|skills\.bins\|skillsHandlers\|modelsHandlers" src/` → zero - `pnpm check` passes, `pnpm test` passes (7010/7010), zombie-import gate passes Part of #2337. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Closes
Partially addresses #2337 — main scope done, two documented deferrals tracked below.
Scope
Deleted (13 files)
Clean stubs (zero external consumers):
Stub deletions with rewired consumers:
Cascade rewiring
Telegram vision (model-catalog.ts deletion): Removed loadModelCatalog→findModelInCatalog→modelSupportsVision chain from telegram/bot-message-context.body.ts, bot-message-dispatch.ts, sticker-cache.ts. Also removed catalog mocks in reply.block-streaming.test.ts, session.test.ts, commands/agent.test.ts, and cron/isolated-agent/run.test-harness.ts.
Product decision — Telegram vision: The middleware/runtimes/*.ts::mediaCapabilities field already gates media attachments in the CLI runtime layer (see middleware/media-capability.ts); the Telegram-side check was dead (stub returned false unconditionally, disabling vision even when available). Rewiring drops the capability check and unconditionally substitutes cached sticker descriptions. If a future product decision reinstates per-channel vision gating, it should source capabilities from the runtime's mediaCapabilities, not from a rebuilt catalog.
Gateway models/skills: Deleted server-methods/{models,skills}.ts stubs + their imports/spreads in server-methods.ts, method entries in server-methods-list.ts, and scope entries in method-scopes.ts. Removed models.list, skills.status, skills.bins, skills.install, skills.update from every registry.
Product decision — node-host skills: Node-host skills feature is unavailable today (empty handler returned []); the client-side SkillBinsCache fallback is preserved for a future re-implementation but no longer calls the skills.bins RPC. Removal is scoped to the gateway wiring only; the follow-up Discord/Mattermost PR will sweep the remaining references.
Product decision — TUI listModels: Removed listModels() + GatewayModelChoice type from tui/gateway-chat.ts, the openModelSelector function and /model-no-args + /models commands from tui-command-handlers.ts, and the Ctrl+L binding from tui.ts. Users can still set a model via /model <provider/model> — the interactive picker is gone until a real model catalog returns.
Schema split: Renamed gateway/protocol/schema/agents-models-skills.ts → agents-tools.ts and pruned ModelChoice, ModelsList*, SkillsStatus*, SkillsBins*, SkillsInstall*, SkillsUpdate*, SkillsSearch*, SkillsDetail* schemas, types, validators, and protocol-schemas.ts registry entries. Remaining content is live AgentSummary*, Agents*, Tools* schemas — the new filename reflects reality.
Session reset model: Removed applyResetModelOverride import + call block from auto-reply/reply/get-reply.ts (unblocks #2339 Wave 2), its vi.mock in get-reply.test-mocks.ts, and the 3 applyResetModelOverride test cases in session.test.ts.
Deferred (tracked for follow-up)
1. onboard-auth-coupled provider files (6 files)
These files are only consumed by src/commands/onboard-auth.config-core.ts, onboard-auth.credentials.ts, and onboard-auth.models.ts, which are deeply dependent (40+ symbol usages in config-core.ts alone):
Blocker: #2338 (running in parallel) deletes the onboard-auth.* cluster entirely. Deleting these 6 files in the current PR would either break the onboard-auth build (leaving dangling imports) or duplicate #2338's gut work and cause merge conflicts.
Plan: After #2338 merges, a 1-PR follow-up deletes these 6 files (no consumers remain).
2. commands-models + Discord/Mattermost model-picker cascade (~2500 LoC)
Reason: The actual diff is ~2500 LoC of production UI code deletion + test rewiring. Combined with the current PR this would exceed ~4000 LoC, beyond the issue's own suggested sub-PR threshold.
Plan: Dedicated follow-up PR covering the full Discord/Mattermost picker gut and the commands-models.ts deletion.
Other out-of-scope items from #2337
Test plan
References
🤖 Generated with Claude Code