AI Gateway
The AI gateway is the account-level entry point for AI access and metering — individuals and organizations each configure their own connections and models, set a default model, and meter their AI usage.
Personal vs Organization
- Personal gateway — configure your own connections and models on Account → My AI (one connection hosts many models, see Model Providers), and set a personal default model for each role (
agent/completion). Platform access has three modes: Automatic with plan / Always allow / Always off. The default automatic mode exposes platform AI immediately while the active free plan includes platform-AI entitlement, with no manual opt-in; it turns off when that entitlement ends. “Always allow” also permits usage-billed access without the free entitlement. - Organization gateway — configure the org's shared connections and models (effective for org members) on Org view → Org AI Gateway, and set an org default model, with the same platform fallback toggle. An org's model usage is aggregated on Org Model Usage.
Resolution order
A request's selectable catalog depends on the current context: the personal view = your personal models + platform models (folded in only when platform fallback is on); the org view = that org's models + platform models (also gated by platform fallback). Personal models are visible only to you; org members see the org tier and never another member's personal models.
Within that catalog, the model actually used resolves as:
- Your explicit pick — it must be in the catalog above, otherwise the request is rejected (no silent downgrade).
- With no explicit pick, fall back in order: last pick (preference) → own default → platform default (gated by platform fallback).
- If a
completionrole still has none, fall back to the same chain for theagentrole. - Still none → the request fails (fail-closed).
The model used for the platform fallback is configured by platform admins under Model Providers.
A platform administrator can also close the user-facing platform-AI master gate. While it is closed, neither personal nor organization settings expose platform models; personal and organization BYOM models are unaffected.
End-user model selector
When you start a diagnosis or a terminal copilot, or use terminal command completion, the control end shows a model selector:
- It lists the models selectable in your current context, each showing the model name, its price (at least the input / output unit price, from AI model prices), an image input / text only capability label, and your current balance.
- Diagnosis / terminal copilot use the
agentrole; terminal command completion has its own selector (labeled "Completion model") on thecompletionrole, so it can pick a different model thanagent. - Your choice is remembered — kept per context (a separate memory for the personal view and for each organization) and pre-selected next time.
- It appears only when connected to a manager: when the control end talks to the open-source signaling server (which has no multi-model capability), the selector hides and the flow falls back to the server's default model.
When diagnosis includes a screenshot, the current agent model must be declared image-capable. The control end prompts you to switch models or turn off the screenshot, and the server checks again both before collection and immediately before sending an image. Screenshot access still requires operator authorization and the host's local collection policy. At most one image is retained temporarily for recovery while the current turn is active; after settlement it becomes a text placeholder and historical REST responses never redistribute the original image.
Relation to Model Providers
BYOM and platform content review
When a platform administrator enables content-safety review, user input and candidate output/actions are still sent to the platform-configured safety provider even if you selected personal or organization BYOM. An authorized attached image is sent only when that safety model supports images; when it does not, the screenshot-bearing request is refused — the image reaches neither the review provider nor the model you selected. Raw tool results such as logs, files, and command output are not sent directly to the reviewer. The platform bears review usage; it does not enter your bill or visible model usage. See AI Content Safety.
- Model Providers (admin, platform-level): which connections and models the platform provides, plus the platform default model.
- AI Gateway (account-level): per-user / per-org connections, models, defaults, and metering on top of platform capability.
Usage Metering
The gateway meters token usage as one basis for billing and cost attribution. The audit side records only content-free metadata summaries — see AI Audit.
In personal context, AI and TURN relay usage belongs to the authenticated operator's personal account even when they operate a device shared by somebody else. In organization context it belongs to the selected organization account while the operator remains the audit actor. An explicit organization context without membership or device grant is rejected rather than silently falling back to personal billing.
For models you configure, choose an exact wire protocol and explicitly enter the 4 KiB–16 MiB history byte budget. Neither the application nor Test connection can discover an arbitrary endpoint's true context window. Presets only populate visible request options; they do not infer capabilities from a model name. Reasoning payload used for tool-call continuity is private protocol state: it is not displayed in the conversation or audit, although it may be stored opaquely and contribute to provider usage.
Long conversations are trimmed only in the model-facing view. The conversation still appears in full in the UI; an inline notice identifies a turn where some older history was not sent to the model. If the newest indivisible item itself is too large, shorten it or ask someone who can edit the model to raise its history budget, then retry.
Command Execution During Diagnosis
In the personal view, a device owner can let the diagnostic agent request commands during the same conversation. The server first applies the blocklist and execution mode. Every free-form command is displayed as Critical and requires the owner to inspect the complete shell and command and explicitly approve that one request. The model cannot approve its own request or lower the server-assigned risk.
The same owner-interactive path is available through the open-source signal / Portable mode. Organization members acting on somebody else's device and Fleet batch execution do not inherit this exception; Fleet remains template-only.
Related
- Platform model access: Model Providers.
- Per-model pricing: AI model prices.
- Org usage: Organizations & Members.