Model and quota management
Manage model configuration, pricing, quotas, budget requests, and usage.
Admins use model and quota pages to control platform cost and access.
Model management
Frontend route:
/admin/models
Backend routes:
/api/agents/models
/api/agents/models/catalog
/api/agents/models/catalog/providers
/api/agents/models/sync-pricing
Use model management to:
- Add or update model providers.
- Enable model entries for agents.
- Sync pricing from the model catalog.
- Disable models that should not be used.
Model create / edit dialog
Add and Edit share one <ModelDialog /> component (mode: "create" | "edit").
- Standard fields: Provider, Model ID (catalog autocomplete), API Key (BYOK), Display Name, Base URL, Description (create only).
- Advanced Settings (collapsed by default): input/output cost per 1M tokens, context window, max output tokens, and capability switches (Vision, Function Calling, Streaming, Active).
- Provider and Model ID stay editable in both modes.
Test a model connection
Use Test Connection before saving to verify that the selected provider, model ID, API key, and base URL can complete a lightweight model request.
- Configure the model
Select a provider and model ID, then select an API key and enter a base URL when the provider requires one.
- Run the connection test
Select Test Connection. The button is available after you enter a model ID.
- Review the result
Continue saving after a successful test. If the test fails, correct the credentials, model ID, provider, or base URL shown in the error and test again.
The connection test is restricted to admins and can test an unsaved model configuration. It calls:
POST /api/agents/models/test
SystemOne API Gateway Reverse-Proxy
Directly evaluate input state against bounded questions using the TypeSafe Jev SystemOne reasoning engine via Pinter API Gateway:
POST /api/agents/models/systemone
{
"model": "jev-latest",
"state": "Halo, tolong bantu rangkum laporan keuangan",
"questions": {
"intent": {
"type": "noul",
"instructions": "Does this input request a summary?"
}
}
}
Returns the official TypeSafe response:
{
"model": "jev-latest",
"answers": {
"intent": {
"type": "noul",
"noul": 0.95
}
}
}
Security Labels and Intelligence Ratings (L1 Only)
Pinter models carry enterprise security classifications and intelligence ratings curated by Platform Architects (L1) via PATCH /api/agents/models/{model_id}/curation.
Security Labels
Security labels determine where and how a model may be utilized across departments:
| Label | Status | Description |
|---|---|---|
black | Default / Unaudited | Assigned automatically upon model creation. Restricted from sensitive corporate workflows. |
red | High Risk / External | Third-party external models with data residency or compliance boundaries. |
yellow | Moderate / Controlled | Approved for non-confidential business processing. |
green | Approved / Internal | Verified compliant for standard enterprise data. |
white | Whitelisted / Highest Trust | Fully audited, on-premise or isolated dedicated tenant models. |
Intelligence Ratings (1 to 5 Bulbs)
Displayed in model pickers as bulb indicators (1 to 5 bulbs) to guide creators toward cost-effective models:
- 1–2 Bulbs (Lightweight / Fast): Small distilled models (e.g., Flash, Haiku, Mini) ideal for routing, extraction, and simple classification.
- 3 Bulbs (Balanced): Standard workhorse models for multi-step reasoning.
- 4–5 Bulbs (Advanced Reasoning): Flagship frontier models (e.g., Claude 3.5 Sonnet, GPT-4o, o1, Gemini 1.5 Pro) with chain-of-thought capabilities.
Provider API key management
Provider credentials are managed from the Models page. Each API key is a parent record: one key can serve many models, and models are assigned to a key from the model side.
Admin key endpoints:
GET /api/identity/api-keys
POST /api/identity/api-keys
PUT /api/identity/api-keys/{key_id}
DELETE /api/identity/api-keys/{key_id}
Key behavior to know:
- Credentials are encrypted at rest and shown masked after creation.
- Deleting a key does not delete its models; they fall back to the platform default credential.
- Keys marked as BYOK (bring your own key) belong to a specific application or user context.
Quota management
Frontend route:
/admin/quotas
Backend routes:
/api/governance/quotas
/api/governance/usage/all
/api/governance/usage/me
/api/governance/usage/detailed
/api/governance/quotas/alerts
/api/governance/quotas/alerts/{alert_id}/acknowledge
Use quotas to set usage limits and review consumption.
Default quota on user creation
When a new user is created (via self-registration, SSO JIT provisioning, or admin creation), a default monthly quota is automatically assigned:
| Role level | Monthly quota |
|---|---|
| L1 Platform Architect | $200.00 |
| L2 — L4 (standard) | $20.00 |
Additional approved top-up requests increase the monthly budget.
6-hour sliding budget rate limiter
To prevent rapid budget consumption, each AI request is checked against a sliding 6-hour window:
- Budget consumed in the last 6 hours is computed from
token_usage. - Limit = 10% of total monthly budget (
max_cost_per_month + approved_amount). - If the 6-hour spend reaches the limit, the request is blocked with HTTP 429 and message:
"Batas penggunaan 6 jam terlampaui (Maksimal 10% dari total kuota bulanan)."
Users can see their current 6-hour budget status on the Account Activity page:
- 6h Budget (10%) progress bar.
- Near Limit orange badge when >80% consumed.
- Remaining budget until the next sliding window.
Anomaly detection
After each AI request is logged, a background task compares the user’s spend in the last hour with their own usage pattern:
- The baseline is the median spend of the user’s active hours over the previous 7 days, excluding the hour being tested. Idle hours and one-off outlier days do not distort it.
- An alert is raised only when the last hour is above 3× the baseline, above the user’s own P95 hour, and at least a minimum amount (default
$0.25). Users with fewer than 6 active hours of history are skipped. - The multiple of baseline is stored in
quota_alerts.threshold_percent(for example840means 8.4× normal) and sets the severity: Elevated below 5×, High from 5×, Critical from 10×. - If an unacknowledged alert already exists for the quota, it is escalated in place when the severity increases; otherwise it is left untouched.
The thresholds can be tuned with the ANOMALY_RATIO_THRESHOLD, ANOMALY_MIN_COST_USD and ANOMALY_MIN_ACTIVE_HOURS environment variables.
Admins review alerts in the Anomaly tab of the Usage page. It shows summary counts, an Open/All filter (history of acknowledged alerts), and an expandable detail per alert: last-hour cost versus normal and threshold, whether the spike came from request volume or request size, a 48-hour spend chart, and the top agents, models, API keys and sources in the spike hour. Details are computed from GET /api/governance/quotas/alerts/{alert_id}/anomaly-details. Users with quota:manage can Acknowledge an alert.
Cost tracking — user × model breakdown
The /api/governance/usage/detailed endpoint now returns an additional by_user_model array, showing cost and request count grouped by each user-model combination. This is displayed in the Admin Usage page under the User×Model tab.
Usage/me — 6-hour budget fields
The /api/governance/usage/me response includes additional fields:
| Field | Type | Description |
|---|---|---|
base_monthly_quota | number | Base monthly quota (before top-ups) |
approved_amount | number | Approved top-up amount |
six_hour_limit | number | 10% of total monthly budget |
six_hour_spent | number | Spend in last 6 hours |
six_hour_remaining | number | Remaining 6-hour budget |
Budget requests
Frontend route:
/admin/budget-requests
Backend routes:
/api/governance/quotas/requests
/api/governance/quotas/requests/my
/api/governance/quotas/requests/{request_id}/review
Users can request more budget. Admins review and approve or reject those requests.
Operational guidance
Use the smallest quota that lets a team complete its work. Increase only when usage data shows the current limit is too low.