Repository navigation
feat: policy model allowlist, Claude Opus 5.5, and policy-scoped pool status - #267
Conversation
|
🦞👀 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. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR adds policy model allowlists, Claude Opus 5.5 metadata, and opt-in pool status for policy holders. Example: An Anthropic policy allows only anthropic/claude-opus-5-5.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 5 items remain Keep open: this owner-directed feature remains absent from main, and the prior grant-identifier collision is still unfixed. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Worker authenticates callers, resolves policies, selects upstream grants, reserves budgets, and dispatches inference; the new pool endpoint returns scoped account and usage information. flowchart LR
Caller --> Authentication
Authentication --> Policy
Policy --> ModelAdmission
ModelAdmission --> GrantSelection
GrantSelection --> Provider
Policy --> PoolProjection
PoolProjection --> Caller
Technical reviewBest possible solution: Keep centralized model admission and shared quota rules, while preserving a distinct non-secret grant identifier consistently across pool inventory and usage. Do we have a high-confidence way to reproduce the issue? The identifier collision follows directly from scanning both supported grant scopes and projecting their distinct keys to the same token reference; no target code was executed. Is this the best way to solve the issue? Centralized admission and shared eligibility are appropriate, but the public representation must retain enough identity to associate each account with its own usage. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 61b3a8623746. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: No concrete authorization bypass was established, but the new permissions and account disclosure still require final-effect evidence. EvidenceWhat I checked:
Likely related people:
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 11, 2026, 8:34 PM ET / October 12, 2026, 00:34 UTC (Revision 2). |
Summary
Follow-up to #266 so a subscription pool can expose exactly the models its operator wants and so clients can show pool status without admin access.
AccessPolicy.models(null = every model of the allowed providers, unchanged default). Enforced at the single proxy preparation owner for native Messages/count_tokens, manifest routes, OpenAI-compatible routes, Responses, WebSocket creates, and Fusion; discovery (/v1/catalog,/v1/models) lists only allowed models; Access-session policy selection skips policies that do not allow the requested model. Requests whose model cannot be resolved are rejected for restricted policies (403 model_not_allowed) instead of passing through an opaque gateway.anthropic/claude-opus-5-5): $4 / $20 per MTok, $0.20 cache read, $5 / $8 cache writes, 1M context, 128K output.GET /v1/pool, opt-in per policy (poolStatus: "visible", default hidden → 404pool_status_hidden). Returns the caller's own policy routing, allowed models, per-grant account facts, quota windows as % free with resets, extra-usage spend, per-model eligibility, and 7-day per-grant/lane usage. Shares eligibility logic with the admin Subscriptions page. No tokens or other policies' data;cache-control: private, no-store. Visible pools intentionally expose account emails to the policy's key holders.Verification
pnpm provider:compile,pnpm check(1,222 Worker / 224 admin / 337 script tests),pnpm worker:e2e, admin build, 80 focused browser testsDeployment
After merge: Deploy Cloudflare workflow, then set
peter_claude_pooltomodels: [anthropic/claude-opus-5-5, anthropic/claude-fable-5-1],poolStatus: visible.