Skip to content

feat: class grants — apps ask for a capability class; grants survive catalog drift (codex-parity slice 5a) - #151

Merged
sameeeeeeep merged 1 commit into
mainfrom
claude/codex-parity-class-grants
Sep 7, 2026
Merged

sameeeeeeep merged 1 commit into
mainfrom
claude/codex-parity-class-grants

Conversation

@sameeeeeeep

Copy link
Copy Markdown
Owner

What

Codex-parity slice 5a — daemon side, additive, opt-in. A grant is a list of one provider's model ids, so it silently binds an app to that catalog at a point in time (this morning: Codex CLI upgrade → gpt-5.5 gone, gpt-6-astra in; only a re-consent could follow).

  • Protocol: ScopeRequest.requirements: [{ class }] · OriginGrant.classes/providers · ModelInfo.classes. Classes: cloud-coding, cloud-vision, local-text (a model may satisfy several).
  • Consent: the user still approves concrete models on the card; providers = backends of what they approved. Never widened beyond that.
  • Resolution: a new conversation may resolve to any enabled, online model of a granted class on a granted provider → follows catalog drift, survives a provider being offline. Pinned conversations + explicit requests unchanged. Legacy scope.models grants: same behaviour, byte for byte.
  • Not in this slice (5b): SDK sb.connect({ requirements }) sugar, consent card showing classes + the currently-resolved model, migrating wrapps off hard-coded sonnet.

Test plan

  • protocol + sidekick build, 0 TS errors
  • routing/codex/storage suites green incl. the new class-grant test (per-provider default · excluded provider never routed · catalog drift: class app follows codex-b, legacy app never widened · override · connect derivation · discovery)
  • CI on this PR

🤖 Generated with Claude Code

…class, the grant survives catalog drift

Codex-parity slice 5a (daemon side, additive, opt-in). Grants store exact model ids, so an app that
connected for gpt-5.5 was silently bound to a provider's catalog at a point in time: on 2026-09-07 a
Codex CLI upgrade moved the catalog (gpt-5.5 → gpt-6-astra) and only a re-consent could follow it.

- protocol: `ScopeRequest.requirements: [{ class }]` (opt-in), `OriginGrant.classes` + `providers`,
  `ModelInfo.classes`; `ModelClass = cloud-coding | cloud-vision | local-text` (a model may satisfy
  several; local runners are local-text only).
- registry: `classesOf(model)` from backend capabilities; `modelInfo` advertises classes.
- grant store: stores classes/providers; `allowsModel` also accepts class × provider via a resolver the
  broker injects (no coupling to backends); a user override may point at a class-allowed model.
- connect: when an app opts in, classes come from its requirements and providers from the backends of
  the models the user actually approved — never widened beyond that consent. Legacy grants unchanged.
- routing: class-eligible models join the in-grant fallback, so a new conversation follows the
  provider's current catalog; pinned conversations and explicit requests keep today's rules.

Tests: class app honours the default per provider; a provider excluded at consent is never routed
(explicit request refused); catalog drift → the class app follows the new model while the legacy
id-only app is never widened; override accepts class-allowed models; connect() derives classes +
providers; discovery advertises classes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@sameeeeeeep
sameeeeeeep merged commit 00f7711 into main Sep 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant