# Feature plans for teams and organizations

**Last updated:** 2026-11-21T09:54:10-03:00 (UTC-3)

Plans add a feature ceiling to authorization. They never grant a role, route scope, model, membership or provider credential. Operational flags enable the installation; a team plan and its optional organization plan must permit the tenant operation too. The vendor's signed license controls **new classified grants and activation**, separately from the operator's plans.

## Two compatible enforcement profiles

| Flag | Default and behavior |
| --- | --- |
| `plan_entitlements` | False. Enables the legacy four rights: MCP execution, explicitly requested exact cache, scoped prompt reads and scoped skills under their existing opt-ins. Requires PostgreSQL. |
| `feature_plan_entitlements` | False. Requires `plan_entitlements`; expands admission to tenant features from the applicability catalog, including ordinary inference and public resources. Also enables the scoped prompt/skill ceilings. |
| `organization_plan_entitlements` | False. Requires `organizations` and `plan_entitlements`; intersects the current organization plan with the mandatory team plan. |
| `entitlement_management` | False. Requires `plan_entitlements` and `ui`; permits the existing versioned editor/API for global administrators. |

All four are runtime-mutable through the feature API and Settings & sources, with dependency validation, versioning and audit. The separate `organizations` flag is boot-only. Prepare assignments before enabling either admission profile: an unassigned team or a missing right is denied. An organization without an assignment adds no extra ceiling.

With the expanded mode off, ordinary inference retains its previous behavior. The legacy rights are `mcp_execution`, `exact_cache`, `prompt_scoped_read` and `skill_registry`; prompt/skill reads additionally need `prompt_entitlements`/`skill_entitlements` respectively. The expanded mode does not silently add those rights to an existing plan.

## Feature applicability

The console shows the complete server-owned feature catalog with search, group and applicability filters. GET `/api/v1/admin/entitlements` publishes it as `feature_catalog` alongside the assignable `rights`. The compiled catalog classifies every flag and exposes its assignable tenant rights; GET `/api/v1/admin/entitlements` is authoritative for the current edition.

| Scope | Examples | Enforcement |
| --- | --- | --- |
| Tenant ingress/resources | Chat, embeddings, native protocols, media, files/batches, vectors, public evals, MCP, agents, conversations and containers | Authenticated request admission; nested resource families and stateful Responses fields are checked too. |
| Tenant alias policies | Auto-routing, semantic/exact cache, latency/weighted/strategy routing, retry and semantic fallback | Required configured policy rights before helper, cache or provider effects. |
| Tenant scoped views | Analytics/logs and exports, scoped prompts and skills | Current eligible teams filter queries before counts/pagination; prompt/skill grants keep their transaction snapshot. Optional outputs/filters and UI presentation have their own availability. |
| Operator controls | Authentication/RBAC, model/tag restrictions, quotas/budgets, guardrails, telemetry, admission, stream clocks, storage and installation administration | Remain mandatory instance policy. They are visible in the catalog but cannot be put in a tenant plan. Vendor classification can protect their administrative activation/actions. |

A new flag must explicitly choose applicability; unknown/operator IDs in a plan are refused. Operator controls are never switched off for a tenant who lacks a right. Classification does not select a commercial plan: the shipped enterprise catalog is still empty.

**Alias-policy contract:** a configured, enabled optional tenant policy makes its right mandatory for that alias, even if a particular stream or payload would skip the policy's execution profile. The gateway refuses instead of silently changing routing or cache behavior. Translated requests also check the canonical Chat policies they consume. Auto-routing/semantic-cache embedding helpers require the embeddings right; an operator-required moderation guardrail remains an operator action and cannot be disabled through a tenant plan.

## Declare a plan

```yaml
features:
  plan_entitlements: true
  feature_plan_entitlements: true
  entitlement_management: true     # also requires ui
plan_entitlements:
  plans:
    - id: chat-team
      name: Chat team
      rights: [chat_completions]
      disabled: false
  team_bindings:
    - team_id: existing-team-id    # actual active ID, not its name
      plan_id: chat-team
      disabled: false
  organization_bindings: []        # optional extra ceiling
```

| Key | Default | What it does |
| --- | --- | --- |
| `plan_entitlements.plans[].id` | required | Lower-case identifier the bindings name, up to 64 characters |
| `plan_entitlements.plans[].name` | required | Display name, 1–120 characters without control characters |
| `plan_entitlements.plans[].rights` | `[]` | The rights the plan includes; an empty list grants nothing |
| `plan_entitlements.plans[].disabled` | `false` | A disabled plan denies: the teams bound to it get none of its rights |
| `plan_entitlements.team_bindings[].team_id` | required | Actual ID of an existing team |
| `plan_entitlements.team_bindings[].plan_id` | required | The plan that sets the team's ceiling |
| `plan_entitlements.team_bindings[].disabled` | `false` | A disabled binding denies: the team gets none of the plan's rights until it is enabled again |
| `plan_entitlements.organization_bindings[].organization_id` | required | Actual ID of an existing organization, including `org_default` |
| `plan_entitlements.organization_bindings[].plan_id` | required | The plan that sets the organization's ceiling, intersected with each team's plan |
| `plan_entitlements.organization_bindings[].disabled` | `false` | A disabled binding denies: the organization's teams get none of the plan's rights |

This is a policy fragment, not a full installation. Configure the ordinary operational flags, keys, scopes and models independently. Limits: 100 plans, 5,000 team bindings and 5,000 organization bindings; removed binding rows still count. An empty-rights plan grants nothing. Binding an ID does not create the team or organization.

## Optional organization ceiling

An organization's enabled plan must include the same right as the team's plan. A disabled assignment/plan denies. Use actual IDs from Organizations, including `org_default`, never a display name. The current team→organization link is read from PostgreSQL; moving a team changes the ceiling on its next admission.

An absent organization assignment means **unrestricted at this layer**, not an empty grant. Consequently, removing a restrictive assignment can grant rights. Revert, YAML removal and runtime disabling of plan boundaries participate in classified-grant checks; they are not licensing bypasses. Disabling just the organization flag makes saved assignments dormant, while team enforcement remains active. Dormant assignments still protect referenced plans from deletion.

Absent/empty YAML organization bindings preserve the earlier base fingerprint. Console changes override YAML per entity. Revert restores the YAML or absence, with a versioned tombstone.

## API and console

Global administrators manage Plans & entitlements. Viewer/operator/team roles cannot access the global catalog. CSRF, same origin, strict canonical JSON and a 16 KiB mutation limit apply. A stale entity version or YAML fingerprint is 409; the editor retains the reviewed draft until an explicit reload/review. Creation starts at version 0.

| Endpoint | What it does | Body |
| --- | --- | --- |
| `GET /api/v1/admin/entitlements` | Effective plans, assignments, rights, applicability and safe license availability | none |
| `PUT /api/v1/admin/entitlements/plans` | Creates or replaces a plan | `{base_fingerprint,version,plan:{id,name,rights,disabled}}` |
| `DELETE /api/v1/admin/entitlements/plans` | Removes a console plan or reverts a YAML one | `{base_fingerprint,version,id}` |
| `PUT /api/v1/admin/entitlements/teams` | Binds a team to a plan | `{base_fingerprint,version,binding:{team_id,plan_id,disabled}}` |
| `DELETE /api/v1/admin/entitlements/teams` | Removes a team's console binding or reverts it to the YAML | `{base_fingerprint,version,team_id}` |
| `PUT /api/v1/admin/entitlements/organizations` | Binds an organization to a plan, its ceiling | `{base_fingerprint,version,binding:{organization_id,plan_id,disabled}}` |
| `DELETE /api/v1/admin/entitlements/organizations` | Removes an organization's console binding or reverts it | `{base_fingerprint,version,organization_id}` |

API access provides complete examples that obtain current fingerprints/versions and require explicit active IDs. Mutations revalidate the administrator and applicable live entity, then commit CAS, licensing admission and correlated audit atomically. A referenced console-only plan cannot be removed. No credential appears in the catalog.

Scoped configuration adds `feature_access`: a boolean union of the session's own eligible teams, used for visibility and presentation. Operational `features` remain unchanged. A union does not authorize a selected team: the API narrows current memberships for each action before querying. Missing/malformed projection denies scoped UI availability; role/flag/projection changes clear held reports, exports, details and drafts.

## Admission, failure and revocation

- Public requests load one bounded coherent team/organization rights snapshot after identity/scopes, before dispatch. Configured policy/cache checks reuse it only for that admission. Fresh internal jobs/helper HTTP calls replace inherited decisions; there is no cross-request positive-grant TTL cache.
- Models and model details hide aliases outside the plan before external wildcard discovery. Plans never broaden a key's model allowlist.
- In expanded mode, stateless Responses use explicit `store:false`. Stored/default-stored/background/previous-response operations require `responses_lifecycle`; conversation and hosted-container use require their corresponding rights, including token-count bodies. Existing signing/ownership checks remain mandatory.
- Every new Realtime response checks current rights, including the busy client branch, independently of quota activation. Existing in-flight responses retain their admitted state. A provider-initiated turn can start before the gateway observes `response.created`; denial follows the existing cancellation/accounting path, not a zero-provider-effect guarantee.
- Normal entitlement denial is 403; hidden prompt/skill/model detail keeps 404. Malformed assigned state fails closed with denial or hidden detail; unavailable storage/catalog produces 503. Live revocation applies to the next admission, even for a warm cache. Actual request/trace correlation is preserved without recording prompt content.

## License and activation

The [vendor commercial catalog](/docs/operate/licensing/#enterprise-classification-at-build-time) stays empty until the owner defines the cutoff. Once classified, adding/reactivating rights, assigning plans, broadening reverts and removing ceilings need an available signed license. Free additions and restrictive recovery remain possible; the existing classified administrative-action policy still applies. Plan/license status never grants RBAC.

Grant checks run at the locked transaction boundary. A control-version/shared lock detects concurrent license replacement; terminal trial state is checked under its lock. Expiry is evaluated there rather than captured before waiting. An unchanged established grant is not removed merely because a license expires; ordinary authorization, policy and budget checks still apply.

YAML is also an activation boundary. Migration 104 records approved effective plan bases and active classified flag IDs. First/new classified activation requires a valid license. Unchanged approved activation survives expiry and restart. Dormant YAML plan definitions are not activated merely by booting with plan enforcement off. Feature activation, its YAML approval, CAS and audit share one transaction, so rejected activation leaves no unusable persisted override. A nonempty commercial edition requires PostgreSQL approval storage even when classified features are currently off; the default empty edition is unchanged.

## Upgrade and recovery

Migration 103 added organization assignments; migration104 adds private durable approval state. Neither rewrites existing bindings, usage, trial records or commercial classification. Back up and roll out compatible binaries before enabling the new mode; all replicas need the same YAML. Older binaries refuse newer schema history. Revert changes policy, not database schema.

For a rejected new YAML activation, restore the last approved configuration or supply valid signed activation and restart. Never reset trial/approval rows to extend access. Use the normal license API/console for managed renewal. Operator-controlled full backup/binary rollback remains the documented offline trust limitation. Scoped task evidence is separate from final branch/release qualification.

## See also

- [Access control](/docs/features/access-control/).
- [Organizations](/docs/features/organizations/).
- [Licensing](/docs/operate/licensing/).
- [Console](/docs/features/console/).
