Repository navigation
fix(plugins): scope runtime catalog discovery by provider - #129624
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs changes before merge. Reviewed August 25, 2026, 7:46 PM ET / 23:46 UTC. ClawSweeper reviewWhat this changesScopes runtime provider-catalog discovery to each agent’s selected model providers, authenticated providers, and model-policy wildcards so unrelated configured providers are not probed. Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readinessKeep open: the accepted provider-isolation contract is implemented across the catalog owner boundary, but this review found a release-owned changelog edit to remove and could not directly inspect the Codex source contract cited by the PR. Priority: P1 Review scores
Verification
How this fits togetherPrepared model catalogs collect provider configuration for an agent before model selection and UI consumers read it. The change passes selected provider identities into plugin catalog hooks so credentials and live discovery are limited to the applicable providers. flowchart LR
A[Agent model references] --> B[Selected provider identities]
C[Authenticated providers] --> B
D[Model-policy wildcards] --> B
B --> E[Plugin catalog hooks]
E --> F[Credential and discovery gate]
F --> G[Prepared model catalog]
G --> H[Model selection and UI]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +120, Tests +489, Docs +7. Total +616 across 23 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the generic scoped-discovery path, remove the release-owned changelog line, directly verify the cited Codex catalog contract, then rebase and validate the exact merge head. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main adds every configured provider to discovery in src/agents/prepared-model-runtime.configured.ts, including providers absent from the effective agent model references. Is this the best way to solve the issue? Unclear: the implementation follows the accepted owner-scoped design and has focused coverage, but the PR’s cited Codex contract still needs direct source verification. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 80985b966325. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Maintainer decision: accept provider-scoped discovery. A configured The compatibility concern in the earlier automated review does not apply to stable releases: the unconditional global-provider union originated in #116261 ( The optional |
Co-authored-by: Erick Kinnee <[email protected]>
|
Merged via squash.
|
…29624) * fix: scope provider catalog discovery by selected identities * fix(plugins): enforce agent-scoped live catalog discovery Co-authored-by: Erick Kinnee <[email protected]> * chore: keep provider release notes in pull request context --------- Co-authored-by: Erick Kinnee <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
Recovery note
Restores #128863 after deletion of its source fork caused GitHub to close the original PR. This branch is the exact original head at 7f4c198; no code or history changed during recovery. The original review, comments, and evidence remain at #128863.
Related: #124008
Extracted from #126013. Complements #129307: that PR owns completed-catalog publication and metadata adoption; this PR owns provider-scope isolation before catalog auth and discovery.
What Problem This Solves
Prepared runtime now derives exact provider identities from effective agent references, maps them to owner plugins, forwards hook-local identities, and filters returned provider configs back to that same set.
The repair removes the unconditional union of global
models.providerskeys. Provider hooks gate work before credential resolution, plugin import, local probing, or network discovery; shared-family helpers filter members before their shared credential is resolved. Canonical IDs and registered/hook aliases take the same path.This prevents an agent selected for one provider from authenticating against, probing, or publishing another agent's catalog merely because both are globally configured or share a plugin owner.
Compatibility Contract
An unreferenced
models.providers.<id>entry is provider configuration, not live-discovery activation. Discovery is activated by an effective agent/default model reference, a provider wildcard, or authenticated-provider selection. Operators who need live discovery must use one of those activation paths.This is the intended isolation-preserving upgrade contract and matches the documented configured-provider/wildcard model. Maintainer confirmation of that contract is the only remaining requested decision; author text does not represent that approval.
Coverage
openaiperforms one redacted catalog request and publishes onlyopenai; unselected Azure identities make zero auth/API-key calls and zero requests (redacted real-flow harness and output).openai/codex@d1d51f6315f84a1737c655cb4d78104d030d5102:model/listruntime catalog loading/filtering and reasoning metadata in the protocol model.Evidence
Current head:
309ff5271bc227c925671d47dad3ba3e1cbd310b; based onmain@8bfcdbe884ce9fbdc7bce96b4daec60d8f04a97c.node scripts/check-changed.mjscompleted its selected final-head stages through the final pairing-account guard with no reported failure;git diff --checkand that final guard passed independently.The production patch is unchanged from the linked real-flow proof; later changes were test-only routing adjustments and the non-production SDK budget correction.
Scope and LOC
+140/-41, net+99across 9 owner-boundary paths;+407/-1, net+406;+6/-0;+553/-42across 19 files.No Gateway readiness, UI polling, metadata invalidation, config, protocol, storage, migration, or outcome-contract changes remain in this PR.