Model adapters

No part of the platform talks to a language model directly. Agents, AI functions, evaluation judges and the Assistant send every model call through the model gateway, which picks a route for the task, removes what the route is not cleared to see, enforces budgets, calls the provider through an adapter and records the call in the trace. Adapters exist for the major hosted model APIs, for cloud model services in your own account, and for models you run yourself. Your data is never used to train anyone's models

Any modelHosted APIs, your cloud account or your own servers
Per taskRoutes chosen by task class, data and region
RedactedAccess labels and personal data removed before a call leaves
No trainingCustomer data is never used to train models

In the platform today

Built
  • Every model call from agents, AI functions, document extraction, the Assistant and evaluations goes through the gateway, with adapters for Claude and OpenAI models through their official SDKs, chosen and keyed in the service settings
  • Each call names a purpose, and a routing table picks its model, Claude Opus 5.5 or Claude Haiku 5.5
  • Redaction replaces personal data and values the person is not cleared for before a call leaves
  • Budgets per tenant, agent and person, each model's capacity and the language model catalogue are enforced, and every call is a row in ops.model_usage
  • Without a key, calls fail with NO_ELIGIBLE_ROUTE and the caller takes its deterministic path
On request
  • Routes with residency and access label constraints, failover between targets, the cache, the vault for provider credentials, adapters for Google Gemini, cloud accounts and your own servers, and the custom adapter interface

The model gateway

On request, the gateway runs as a stateless service in your deployment. A call arrives with a task class, the rendered messages, an output schema if there is one, the run or function context and the identity behind it. The gateway resolves a route, applies the route's data policy, checks budgets, and calls the provider. On the way back it restores redacted placeholders, validates structured output, and writes a model span with tokens, cost and latency. Callers see one interface regardless of the provider behind it

Callers Agent runtime AI functions Evaluation judges Assistant Embedding pipelines Model gateway Routetask class → route Data policyaccess labels, redaction Budgetstokens, cost, rate Cacheexact match, scoped Adapterone interface: chat, tools, schema, embed, stream Return pathrestore placeholders · validate · record span Hosted model APIszero retention terms Your cloud accountmodel services, your region Models you runKubernetes, on premises
Routing happens before redaction because the data policy depends on the route: a model you run on premises may be cleared for data with access labels that a hosted API is not

Adapters

An adapter translates the gateway's request into one provider's API and back, for chat, tool calling, structured output, embeddings and streaming. In the platform service today the adapters are for Claude and OpenAI models, through their official SDKs; the others below are delivered on request

AdapterConnects toCredentials and notes
OpenAI APIOpenAI modelsAPI key in the vault. Zero data retention where the account qualifies
Anthropic APIClaude modelsAPI key in the vault. Prompt caching used for long, stable instructions
Google Gemini APIGemini modelsAPI key or service account. Native structured output
Azure OpenAIDeployments in your Azure subscriptionManaged identity. Canada Central and Canada East regions available
Amazon BedrockModels enabled in your AWS accountIAM role. ca-central-1 where the model is offered
Google Vertex AIModels in your Google Cloud projectWorkload identity. northamerica-northeast1 (Montréal)
OpenAI-compatible endpointvLLM, Text Generation Inference, Ollama, or any server that speaks the same APIToken or mTLS. The usual adapter for models you run
Custom adapterAnything elseCredentials of your choice. A container implementing the adapter interface

Today provider keys come from the service environment. On request, provider credentials are stored in the platform vault or referenced from your cloud's secret manager, and only the gateway can read them. Credentials for your own cloud account let the gateway call models that run inside your account and region, billed to you, under the terms you already have with that cloud provider

Routing per task

Agents and functions do not name models. They name a task class, and the tenant's routing table maps each task class to a route. A route is an ordered list of model targets with constraints. This keeps model choice in one place, where an Administrator can change it, test it with evaluations and roll it back, without touching any agent or function

Task classUsed forTypical route
planAgent steps that choose tools and reason over resultsA large model with strong tool calling
extractStructured fields from documents and emailsA mid-size model with constrained decoding
classifyShort labels, routing, triageA small, fast model
summarizeContext compression, notes, digestsA small or mid-size model
draftMessages a person will read and sendA mid-size or large model
judgeRubric graders in evaluationsA large model from a different family than the target
embedEmbedding properties and retrieval queriesAn embedding model, usually one you run

Routing in the platform service

The built routing table maps a purpose to a tier, and the tier to a model through the catalogue's aliases. It is set in ontology.yaml under languageModels.routing. An explicit tier on a call always wins over the table. GET /api/v2/models/routing shows the table in force

languageModels:
  routing:
    default: smart                       # purposes not listed
    purposes:
      extract: fast
      search-answer: { tier: fast, escalate: false }
      plan: smart
    escalate: { onSchemaFailure: true, onRefusal: true, to: smart }

escalate retries a call on another tier when its output fails its schema or the provider refuses, unless the purpose turns it off. JSON output is requested through the call's schema and checked by the gateway

The rest of this section is delivered on request. Routes are ordered lists of model targets with residency and access label constraints, and overrides send a call to a different route based on what is in it, such as any call with data that carries the QUALITY access label going to the creamery's own model, whatever task class it asked for. If no route can take a call, because none is cleared for its access labels or in its residency, the call fails with NO_ELIGIBLE_ROUTE rather than silently sending data somewhere it should not go

Redaction

By the time a call reaches the gateway, row and field access have already been applied for the person behind it. The gateway adds a second, route-specific layer. Its job is to make sure that what leaves for a given route is only what that route is cleared for, even when the person is cleared for more

On request, each route is cleared for certain access labels, and properties with a label the route is not cleared for are withheld with a note. Further detectors, such as people's names from the directory and street addresses, can replace a value with a placeholder, mask it or block the call

Redaction in the platform service

The built gateway applies pattern and access-label redaction, set per purpose. Redacted values become stable placeholders, so the same value gets the same placeholder on every turn of a run. Values a caller passes with an access label the person does not hold are replaced in every mode. Built-in patterns for common personal data, plus your own, follow each purpose's mode: on, off or required, which refuses the call if a configured pattern is broken. Placeholders are restored in the reply text and tool inputs, and only counts by kind are kept

languageModels:
  redaction:
    default: on
    patterns: [email, phone, sin, card]
    custom:
      - { kind: EMPLOYEE_ID, regex: '\bE\d{4}\b' }
    purposes: { extract: required, eval_judge: off }

Your data is not used for training

No customer data, prompt, output, trace or evaluation is used to train or improve any model, ours or a provider's. This holds in three places

  • Provider terms. No model provider is used without terms that exclude training on inputs and outputs and, where the provider offers it, keep no copy after the response
  • The gateway. It sends nothing to a provider except the call itself, with no telemetry, feedback or ratings
  • Our own operations. We do not train models on customer data, and we do not move customer data between tenants for any purpose

Calls through adapters to your own cloud account or your own servers are governed by your terms with that provider, or by nothing at all if the model runs on your hardware. If you want a model tuned on your data, for example a classifier for complaint categories trained on two years of labelled emails, you do it yourself in your tenant: the training data stays in your open tables, the run is tracked in your MLflow server, and the resulting model is registered and served like any other model you run

What the gateway keeps

Prompts and outputs are stored only as part of the reasoning trace, in your tenant, under the trace's retention and access labels. The gateway itself keeps request metadata for billing and rate limits: tenant, route, token counts, cost and timing, for 13 months

Running your own models

On request, models you run connect as routes, and anything else through a custom adapter, so data that must stay on site never leaves. The common reasons are a disconnected plant, predictable cost at high volume, and embeddings, where a small open model run locally is usually as good as a hosted one

Language model catalogue

The catalogue lists the language models the gateway can use: the models from each configured adapter with their prices, plus any declared in ontology.yaml. Each has a lifecycle state, and the gateway checks the catalogue before every call, so a call to a retired or disabled model fails with NO_ELIGIBLE_ROUTE instead of reaching the provider

languageModels:
  # omit enabled for every available or deprecated model
  enabled: [claude-opus-5-5, claude-haiku-5-5]
  aliases: { fast: claude-haiku-5-5, smart: claude-opus-5-5 }
  models:
    claude-sonnet-5-5:
      { state: deprecated, retiresOn: 2027-03-31, replacement: claude-opus-5-5 }
  capacity:
    claude-opus-5-5: { tokensPerDay: 2000000, callsPerMinute: 60 }
  noticeDays: 90
PartBehaviour
Statespreview, available, deprecated and retired. A model past its retiresOn date is retired, and retirement notices appear noticeDays before it
EnablementPer tenant, from the config, then administrator overrides with POST /api/v2/models/catalogue/{model}:enable or :disable. A retired model cannot be enabled
AliasesNames such as fast and smart that agents and functions use instead of a model id. Administrators move them with PUT /api/v2/models/aliases/{alias}
CapacityTokens per day and calls per minute per model for the tenant, counted from ops.model_usage. A call past either is refused with RATE_LIMITED and can be retried
UsageGET /api/v2/models/usage and /catalogue/{model}/usage, by day and by purpose, for administrators and holders of the ops grant

Trained machine learning models, such as a late departure classifier, are a different thing with their own registry and endpoints, on trained models and endpoints

Budgets, caching and failover

Budgets per tenant, agent and person are built; see model usage and budgets. On request, a per-call budget from the AI function or agent, and rate limits per route that protect providers' quotas

The Claude adapter uses the provider's prompt caching for the stable prefix of agent contexts, the instructions and the conversation so far. On request, the gateway also caches exact repeats, scoped to the caller's access

On request, failover is ordered and per call: when a target fails or stops answering, the gateway tries the next target on the route with the same data policy, and records the failover on the model span

Limitations

  • The built routing table chooses a tier per purpose; routes with ordered targets and constraints, and the custom adapter interface, are delivered on request, and the set of native and emulated capabilities differs by adapter
  • Agents and functions can only name task classes, never a specific model, so a model change is a routing change that every dependent target picks up
  • A call that no route is cleared for, by access labels or residency, fails with NO_ELIGIBLE_ROUTE; the gateway never falls back to a less restricted route
  • Failover only moves to a target with the same data policy on the same route, so a route with a single target has no failover
  • Pattern redaction catches the detectors listed and your own patterns, not every form of personal data in free text; access labels and field access remain the primary control
  • Budgets are checked before a call is sent and settled when it returns, so the call that crosses a limit finishes over it; on request, a per-call cap is checked against an estimate of output tokens, so a single call can finish slightly over it
  • The cache serves exact repeats only; a change to the messages, tools, schema or the caller's access makes a new call

Related