Contexts¶
A context is a first-class resource that selects and configures one segmentation model and one transcription model. Contexts let users reuse a processing setup across items without embedding provider switches throughout the UI.
A context may include selection metadata used to resolve the best context for an image. Provider endpoints and credential policy remain administrator-owned; workspaces select registered capabilities rather than arbitrary authenticated network destinations.
ContextService.GetModelCatalog is the client discovery contract. Its
descriptors intentionally contain only safe selection metadata. The server
builds the catalog from trusted configuration, validates every context against
it on create/update, and resolves endpoint, audience, and credentials only when
executing a job. Context protobuf fields for client-controlled provider URLs or
audiences are reserved and must not be reintroduced.
Optional sampling controls are model capabilities, not provider-wide guesses. Clients show temperature only when the selected model descriptor advertises it; the server validates the same capability when a context is written.
Context quality is read through the generated Connect
ContextService.GetContextMetrics RPC. It summarizes committed processing and
correction data; there is no parallel REST metrics route.
Context and selection-rule discovery uses signed workspace-bound keyset pages; see context catalogs and selection rules. Resolution is deliberately finite: workspace rule admission, rule conditions, and flat scalar metadata all have explicit ceilings so adding contexts cannot turn a processing request into an unbounded database scan or string-matching workload.
When adding a context field:
- define its semantics and default in the protobuf contract;
- validate it at the API boundary;
- prove the runtime consumes it;
- expose it from the provider or segmentor capability descriptor;
- add an API and UI round-trip test.
Do not add configuration-shaped fields that the processing pipeline ignores.
For practical workflows, see use processing contexts. For catalog extensions, see add a transcription model, add a segmentation model, and add a system context.