AI Operation
What It Models
An AI operation defines a repeatable kind of model work, including routing, prompt version, expected usage and conversation budgets. Separate model prices determine credit and monetary charges. The pinned catalogue declares query generation and its task key.
Identity and Attributes
A declared key identifies the operation. Published versions carry generated identifiers, increasing version numbers and content digests. Model prices are versioned by provider and model. Integer rates price usage per million units; one credit corresponds to one hundredth of a cent at list price.
Relationships
Requests retain the routing and price references they resolved. Organization limits and temporary exemptions refer to operation keys. Usage groups requests by declared application, feature, operation and model.
Invariants
Validation precedes publication and rejects invalid declarations before any append. Publication itself consists of separate transactions, so a later persistence failure can leave earlier versions committed. Database triggers refuse ordinary updates and deletions of version history. Reservation sizing and usage rounding follow the published pricing functions.
How It Is Stored and Shared
Engineers maintain declarations and deployment publishes changed versions. The histories are global configuration shared by organizations. Warm processes cache the resolved current versions; the resolver retries a missing lookup, but does not verify an existing cached row against the database. HQ reads the catalogue and rates through dedicated operations.
Open Design Questions
Conversation budgets do not constitute absolute spending or duration guarantees: final-answer acceptance precedes some budget checks, and tools have no enforced deadline. The recorded direction for another macroservice requires a shared runtime and Platform metering boundary. Older running code can combine its estimate with a differently published routing version.