Skip to content

Operations ​

The connector exposes 12 operations. Provider-backed operations call Jev through the configured route. Policy, capability, and validation operations run locally.

[Decide] Evaluate maps one-to-one to POST /{apiVersion}/systemone. The other operations are what a Mule integration needs around that call — see Why a Connector.

Decision operations ​

OperationAliasProvider callsPurpose
[Decide] Evaluateevaluate1Evaluate a complete named question set against one state.
[Decide] Ask Yes/Noask-noul1Return the yes probability for one Noul question.
[Decide] Choosechoose1Classify state into one of a fixed set of options.
[Decide] Scorescore1Grade state against ordered rubric levels.
[Decide] Locatelocate1Return the bounding box of a target in an image.
[Select] Candidateselect-candidate1Select and rank the best row from runtime candidates.

Scale operations ​

OperationAliasProvider callsPurpose
[Decide] Evaluate Batchevaluate-batchOne per unique cache missApply one question set to many states with bounded concurrency.
[Select] FilterfilterOne per chunkPartition items into kept / uncertain / dropped by Noul.

Policy and utility operations ​

OperationAliasProvider callsPurpose
[Policy] Applyapply-policy0Convert answers to ACCEPT, REVIEW, or REJECT (fails closed).
[Util] Connection Get Capabilitiesget-capabilities0Describe primary and fallback route capabilities.
[Util] Connection List Modelslist-modelsOne per supporting routeMerge model cards across the connection.
[Util] Validate Question Setvalidate-question-set0Validate questions and file policy before a billed call.

See How Decisions Work for policy bands, fail-closed behavior, filter bands, and drift expectations.

Shared request options ​

Provider-backed operations include:

OptionDefaultDescription
Model overrideConnection modelSelect a model for this call.
Include raw responsefalseAttach the provider body to attributes.rawResponse.
Use cachefalseUse the connector cache when caching is enabled globally.
StepEmptyCopy a flow label into attributes.traceEntry.step.

Images ​

Evaluate, Ask Yes/No, Choose, Score, Select Candidate, and Locate take an Images map. Each key is a reference string, and each value is a PNG or JPEG binary, for example from a File read or an HTTP body:

xml
<typesafe:images>#[{ (vars.photoRef): vars.photo }]</typesafe:images>

Write each reference somewhere in a string value of the state, instructions, or criteria (for example { "photo": vars.photoRef } and the instruction "Is there a person in photo?"). An image nothing refers to is an error. Use an opaque unique reference such as a UUID rather than a word that might appear in ordinary text.

With images, the connector sends multipart/form-data to POST /{apiVersion}/systemone. The body has a request JSON part, whose assets entries point at file parts, followed by one file part per image. It also sets TypeSafe-Danger-Zone-Images: true. Base64 text, with or without a data: prefix, is decoded first.

Before any cache lookup, budget reservation, or HTTP call, the connector checks the documented limits and raises TYPESAFE:INVALID_IMAGE on a violation:

LimitValue
FormatsPNG or JPEG (no animated PNG)
Size16 MiB per image, 32 MiB for all images
Each side280–1568 px
Total pixels78,400–2,458,624
Reference1,024 bytes each, 65,536 bytes for all

Images need a route with supportsImages (TypeSafe, compatible, or mock; see Connection Get Capabilities). Evaluate Batch and Filter do not take images. The image API is marked experimental by TypeSafe. See TypeSafe images.

Decision attributes ​

Provider-backed decision operations return metadata separately from the payload:

  • Provider, requested model, and actual model
  • Input and output token usage
  • Estimated cost and cost source
  • Latency, attempts, and failed-over routes
  • Cache-hit status
  • Question-set ID and version
  • State hash and provider request ID
  • Optional raw response
  • Audit-ready trace entry

Provider endpoints ​

  • TypeSafe, OpenRouter, Vercel, and compatible decision routes use POST /{apiVersion}/systemone (connection API version, default v1).
  • Cloudflare uses POST /client/v4/accounts/{accountId}/ai/run/{model}.
  • Model discovery uses GET /{apiVersion}/models.
  • The mock route, Apply Policy, Get Capabilities, and Validate Question Set make no HTTP request.

See TypeSafe API documentation and model-list documentation.

Errors ​

Operations can raise TYPESAFE:* errors including:

  • UNAUTHORIZED, RATE_LIMITED, OVERLOADED, TIMEOUT, and CONNECTIVITY
  • PROVIDER_VALIDATION, PROVIDER_ERROR, and INVALID_RESPONSE
  • INVALID_QUESTION_SET, INVALID_STATE, INVALID_IMAGE, and TOO_MANY_OPTIONS
  • REQUEST_TOO_LARGE (HTTP 413)
  • BATCH_TOO_LARGE, BUDGET_EXCEEDED, and UNSUPPORTED_BY_PROVIDER
  • BELOW_THRESHOLD and REJECTED

Transient connectivity, timeout, rate-limit, and overload failures can use ordered fallback routes. Validation and authorization failures do not fail over.

Site content released under the Apache License 2.0. Each asset carries its own license. RSS · llms.txt