Skip to content

feat: account routing#2

Merged
albanm merged 21 commits intomainfrom
feat-account-routing
Mar 20, 2026
Merged

feat: account routing#2
albanm merged 21 commits intomainfrom
feat-account-routing

Conversation

@albanm
Copy link
Member

@albanm albanm commented Mar 19, 2026

No description provided.

albanm and others added 14 commits March 18, 2026 05:58
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements a pure function that enforces model access control based on
account ownership and configured roles (admin-only, member, or external).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Route now uses /:type/:id/v1/chat/completions so the owner comes from
URL params instead of the session account. Adds permission checks via
assertCanUseModel and tracks per-user usage when the owner is an org or
the caller is external. Includes tests for external user access control.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Route now takes owner from URL params instead of session account,
uses assertCanUseModel for permission checks, and enforces token
quotas with usage recording (same pattern as gateway router).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@albanm albanm merged commit f237326 into main Mar 20, 2026
2 of 3 checks passed
@albanm albanm deleted the feat-account-routing branch March 20, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant