Subscriptions and usage quotas
This page describes how user subscription tier (Free vs Pro) ties together webservice limits, agent usage, and LLM model selection. It complements User and AI agent reports.
Subscription on the user
Every Glacez user has a subscription field (for example FREE or PRO). It is part of normal user state: new users receive a default tier at creation, and user-scoped product flows assume a subscription is present (legacy data can be normalized via the updater; see below).
Subscription drives:
- Per-tier quotas in glacez-soa-webservice (connexions and other caps).
- Per-tier monthly agent call limits in glacez-soa-agent.
- Which Copilot / LLM model the agent uses for user-scoped generation (Free vs Pro model id).
Webservice (glacez-soa-webservice)
What is tracked
User usage counts current consumption for quota-backed resources, for example:
- Credentials (exchange connexions)
- Wallets
Counts are kept in sync with the user’s actual connexions so the UI and admin tools can show usage vs limit without recomputing from scratch on every read.
Enforcement
When a user adds a credential or wallet (and in related flows such as file-backed imports where applicable), the webservice checks the user’s subscription tier, compares current usage to the configured quota for that tier, and rejects the operation if the limit would be exceeded.
Other product limits (for example strategies and simulations) follow the same pattern: limits are defined per tier in configuration and enforced on the relevant write paths.
Configuration
Authoritative keys live in glacez-soa-webservice application.yaml under glacez.quota, with nested free / pro (or equivalent) sections for each limited dimension. Prefer the checked-in YAML over this wiki when they differ.
UI and admin
- The main user app profile area can show credentials and wallets usage (current count vs quota).
- Admin user forms can show the same usage fields for support and operations.
Bulk migration and maintenance
Operations tooling can:
- Set all users to FREE subscription (one-shot migration or policy reset), exposed as an updater HTTP endpoint (see webservice updater resources).
- Run the usual webservice updater job that refreshes derived user state; that path can also align subscriptions and resynchronize usage so counts match persisted connexions after bulk changes.
Exact paths and authentication follow the same conventions as other updater endpoints in glacez-soa-webservice.
Agent (glacez-soa-agent)
Monthly agent calls
User-triggered or user-scoped agent work increments a per-calendar-month counter. When the count for the user’s subscription tier reaches the configured maximum, further agent calls for that user in that month are rejected until the window rolls or limits are adjusted.
Configuration is under glacez.quota in the agent application.yaml, with flat per-tier properties (for example separate keys for Free vs Pro monthly call caps). See the repository file for exact property names and env overrides.
Model selection (Copilot)
For user-scoped jobs, the agent resolves the LLM model id from the user’s subscription (dedicated Free vs Pro model configuration).
Global or non-user jobs (for example scheduled digest or trend reports) continue to use task-models configuration where no user subscription applies.
Daily user reports (positions, portfolio) and flows such as investment profile summarization pass subscription context so model choice stays consistent with tier.
Why this matters for operators
- Support can explain “limit reached” errors by checking subscription tier and usage in admin UI.
- Capacity planning tunes
glacez.quota(webservice and agent) per environment. - Incidents involving “wrong model” or “calls blocked” should verify subscription on the user document, agent monthly counters, and deployment config for
glacez.model/glacez.quota.