Skip to content

docs(plans): design the model and provider registry (#103) - #154

Merged
mergify[bot] merged 2 commits into
mainfrom
docs/103-model-provider-registry-design
Oct 12, 2026
Merged

mergify[bot] merged 2 commits into
mainfrom
docs/103-model-provider-registry-design

Conversation

@ericlitman

@ericlitman ericlitman commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

Design document for #103, produced with pstack:architect. This PR adds only docs/plans/2026-10-11-model-provider-registry.md. Eric approved the design on 2026-10-11. His six decisions are folded in, and the implementation issues are #155 (U1), #156 (U2) and #157 (U3).

 plugins/pstack/skills/poteto-mode/scripts/runner/
+├── registry/
+│   ├── contract.ts      # Lane and the provider adapter contract
+│   ├── family.ts        # family entry, role default, released pair types
+│   ├── models.ts        # data: families, role defaults, released pairs
+│   ├── providers.ts     # data: the only provider list
+│   ├── index.ts         # resolveModel, resolveLane, defaultDescriptor
+│   └── render.ts        # writes references/model-catalog.md and native agent files
+├── providers/{claude,codex,grok}.ts   # today's switch arms, behavior unchanged
-├── commands.ts / parse-output.ts / model-aliases.ts
 └── run.ts               # keeps every timing, retry, fallback and receipt policy
  • Single entries: GPT-6.1 Sol and an optional GPT-6 Luna are one family entry each in registry/models.ts. Devin is one adapter module and its test, one line in registry/providers.ts, and one SWE-2 family entry.
  • Role pointers: the twelve Cursor-derived files that copy model slugs name a role and link to its role default. A default-model change then edits one port-only file.
  • Shapes compared: typed code (chosen), a JSON file with a generic interpreter, and the markdown table as the source.
  • Rules kept: no implicit runtime timeout, no weaker-model fallback, no retry on another provider.
  • Decisions:
    • Unregistered pairs still pass through the runner unchanged.
    • grok-4.6 is a kept predecessor.
    • A registered exact pin wins over the rolling pattern.
    • A model without effort tiers uses the default effort.
    • Generated content lives in a separate model-catalog.md with its own verifier feature, so a model change no longer runs every skill check.

Evidence

  • Arena: Opus max native, GPT-6.1 Sol max external and Grok 4.7 xhigh external each produced a candidate. All three chose the same whole shape.
  • Cross-judge: a separate Sol max lane scored the candidates and recommended the Sol candidate as base. The orchestrator kept the Opus candidate as base and adopted four of the judge's source corrections. The "Synthesis decision" section explains why.
  • Measured CLI facts on this host:
    • codex debug models: gpt-6.1-sol lists ultra; gpt-6-luna does not.
    • grok models.
    • devin --help, devin auth status and devin models list --format json.
    • One read-only Devin print-mode probe. It showed that stdout holds only the final text and the --export file holds the model ID, session and usage.
  • Checks: the static invariants pass on d8e9409. On b087980: bun run test 274 pass; bun run typecheck passes; PSTACK_STATIC_ONLY=1 bash tests/skill-collision-repro.sh exit 0; claude plugin validate plugins/pstack passes.

Merge Danger

Door: two-way

Blast Radius: none

The PR adds one document under docs/**, which the verifier's feature map classifies as no runtime change.

Findings recorded in the design

  • poteto-mode/SKILL.md:94 and README.md:83 still name GPT-5.6 Sol as a default. Unit U3 replaces both.
  • grok:grok-4.6 sheets have no rule today. Open question 3 covers them.
  • The verifier's ROUTE pattern, its setup assertion and DEFAULT_ROUTES hard-code providers or slugs. Units U3 and U5 change them.

Not verified

  • No live gate ran. This PR changes no runtime file.
  • Devin's logged-out, failed and cancelled outputs, and its tool-approval behavior in print mode, are not captured. Unit U5 captures them before a Devin adapter ships.
  • API-key login output for Claude and Codex, and what Claude reports for an exact pin, are unverified.

Closes #103

🤖 Generated with Claude Code

Records the pstack:architect design for one registry of model families and
provider adapters: typed family entries and role defaults, one adapter module
per provider CLI, generated provider-dispatch.md regions and native agent
files, and role pointers in the Cursor-derived skill files. Shows GPT-6.1 Sol,
an optional GPT-6 Luna and a Devin CLI provider as single entries, compares
three whole shapes, and orders the implementation into seven units with their
live checks. Draft for maintainer approval; no runtime file changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mergify

mergify Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 2 merge protections satisfied — ready to merge.

Show 2 satisfied protections

🟢 Queue ready pull requests

Automatically queue non-draft pull requests targeting main after verify, Unfret, and live-gate pass on the head.

  • -draft
  • check-success=Unfret
  • check-success=live-gate
  • check-success=verify

🟢 🚦 Auto-queue

When all merge protections are satisfied and these conditions match, this pull request will be queued automatically.

  • -files~=^\.github/
  • base = main

@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Low impact] This documentation-only PR appears safe to merge, with a non-blocking migration-order correction.

Findings

  1. P2 U2 leaves CI broken ▶
  2. P2 Old Devin models lack support ▶

Summary

This PR designs a typed model and provider registry without changing runtime files.

  • Contributors now have an approved plan for one model and provider registry.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Models["registry/models.ts"] --> Registry["REGISTRY"]
  Providers["registry/providers.ts"] --> Registry
  Registry --> Runner["resolveLane → run.ts"]
  Registry --> Render["registry/render.ts"]
  Render --> Catalog["model-catalog.md"]
  Render --> Agents["Static agent files"]
  Rules["provider-dispatch.md"] --> Catalog
  Catalog --> Parent["Parent chooses roles and routes"]
Loading

Reviews (2) · Last reviewed commit: "docs(plans): record Eric's registry deci..." · Reviewed by Greptile

Comment on lines +428 to +432
export type FamilyEntry<P extends ProviderId = ProviderId> = P extends ProviderId
? FamilyCommon<P> & (EffortInOf<P> extends "model-id"
? { readonly efforts: { readonly [E in Effort]?: string } } // effort → CLI model ID
: { readonly efforts: readonly Effort[]; readonly predecessors?: readonly KeptPredecessor[] })
: never;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Old Devin models lack support

The model-id branch of FamilyEntry cannot describe kept predecessors. If a released Devin family changes its model slug, RELEASED_PAIRS requires the old pair to keep resolving to that family, but this shape cannot store its old effort-to-model mapping.

Add a predecessor shape for model-id families and cover it in the resolution tests. Otherwise, a later model update requires changing the shared contract or dropping support for saved descriptors.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid, and it matters only when a Devin model slug changes. No Devin family exists until U5, so this is recorded on #69 (U5). U5 either adds a predecessor shape for model-id families with a resolution test, or records why SWE-2 and SWE-1.6 do not need one.

Folds the six approved answers into the design: unregistered pairs pass
through the runner unchanged, grok-4.6 is a kept predecessor, a registered
exact pin wins over the rolling pattern, models without effort tiers use a
`default` effort, and generated content moves to a separate model catalog
with its own verifier feature. Links the U1 to U3 implementation issues
(#155, #156, #157).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment on lines +829 to +830
| U2 Model catalog | `render.ts`; the generated `model-catalog.md`; `provider-dispatch.md` reduced to hand-written rules that link to it; regenerated agents with identical bytes; `registry.test.ts` replacing `model-matrix.test.ts`; the verifier's `catalog` feature. U2 changes the verifier, so its live run uses the candidate head as the publisher revision | `setup` rerun on a `grok:grok-4.6` sheet (snapshot and restore) showing the proposed replacement; `runner` route from each parent reading the catalog; a verifier unit test that a catalog-only change selects `catalog`, `setup` and `runner` and no skill check |
| U3 Role pointers | the twelve Cursor-derived files, setup steps 5 to 7, `codex-tools.md`, `docs/reference.md`, `README.md`, an `UPSTREAM.md` ledger entry; deletes three bash checks; adds the text scans | `setup` first run with no sheet, seeding from role defaults; a verifier case where the sheet lacks `arena runners` and `bug-fix` and the parent reports both role defaults and routes; `skill-invocation:interrogate` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 U2 leaves CI broken

U2 removes the model matrix from provider-dispatch.md, but U3 deletes the bash checks that read it. Between those separate PRs, tests/skill-collision-repro.sh cannot find the Sol row and fails CI. This does not block the documentation PR, but U2 cannot land as written. Move that reader to model-catalog.md in U2, or move its replacement check into U2.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed. tests/skill-collision-repro.sh:404-413 reads the Sol row from provider-dispatch.md, so U2 alone would fail CI until U3 deletes that check. #156 (U2) now requires moving that reader to model-catalog.md, or replacing it with an equivalent registry.test.ts check, in the same PR. It also gains an acceptance criterion that the static invariants pass with U2 merged and U3 not yet merged.

@ericlitman

Copy link
Copy Markdown
Owner Author

Live evidence: Open Pstack

  • Candidate SHA: d8e940953206c9b66d65c84f845e1b29ca3cf75c
  • Base SHA: c5c8e237c324359a3d1929037da78fe66da3d1ed
  • Result: PASSED — no runtime change
  • Self-test: not requested
  • Publisher revision: c5c8e237c324359a3d1929037da78fe66da3d1ed
  • Evidence-set SHA-256: ba39baf0f002da0420c051a84e5b4c1b27840c3f9949f7ce6a3f70c08448a8a3
  • Policy: every new head requires a fresh run; this verifier does not change PR state, queue, or merge.

@unfret-eal

unfret-eal Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

✅ No blocking findings

Light review ran with 1 elected reviewer.

Walkthrough

This PR adds one design document, `docs/plans/2026-10-11-model-provider-registry.md`, for issue #103 and changes no runtime file. The design moves model and provider facts into a typed TypeScript registry beside the external runner. Each provider becomes its own adapter module, and the model catalog and Claude agent files are generated from the registry, so adding a model like GPT-6 Luna or a provider like Devin touches only a few port-only files. Cursor-derived skill files would stop naming models and instead point to role defaults. The document also records Eric's six approval decisions, including passing unregistered models through unchanged and keeping `grok-4.6` as a kept predecessor. It splits the work into units U1–U7, with U1–U3 tracked as #155–#157.

Details
Lane / stage Model Effort Outcome Duration
focal-gpt-5.6-sol-xhigh copy / review openai/gpt-6.1-sol → gpt-6.1-sol · primary xhigh succeeded 6 min 14 s

First review of this pull request.
1 reviewer finished.
Commit d8e9409.
Check run.
Run: GET /unfret/run/panel:d8e940953206c9b66d65c84f845e1b29ca3cf75c:32XVc_wSYhC:vTgnTPjY-Pc.

@unfret review · @unfret status · @unfret help

@unfret-eal unfret-eal Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No blocking findings
Check

@mergify

mergify Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-12 12:33 UTC · Rule: default · triggered by merge protections
  • ✅ Checks skipped · PR is already up-to-date
  • ✅ Merged — 2026-10-12 12:34 UTC · at 748a9bc0c144fdcfa433c494806f23facc4daa9f · merge

This pull request spent 15 seconds in the queue, including 2 seconds running CI.

Required conditions to merge
  • github-review-approved [🛡 GitHub repository ruleset rule Protect main]
  • all of [🛡 Merge Protections rule Queue ready pull requests]:
  • any of [🛡 GitHub repository ruleset rule Protect main]:
    • check-success = @github-actions/verify
    • check-neutral = @github-actions/verify
    • check-skipped = @github-actions/verify
  • any of [🛡 GitHub repository ruleset rule Protect main]:
    • check-success = live-gate
    • check-neutral = live-gate
    • check-skipped = live-gate
  • any of [🛡 GitHub repository ruleset rule Review gate]:
    • check-success = @unfret-eal/Unfret
    • check-neutral = @unfret-eal/Unfret
    • check-skipped = @unfret-eal/Unfret

@mergify
mergify Bot merged commit 748a9bc into main Oct 12, 2026
6 of 7 checks passed
danpal35 pushed a commit to danpal35/open-pstack that referenced this pull request Oct 13, 2026
…man#163)

Mergify queued PR ericlitman#154 with two unanswered Greptile threads, because it
checks only verify, Unfret and live-gate. The queue rule and the merge
protection now also require #review-threads-unresolved = 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Design a model and provider registry before adding models or CLIs

1 participant