Skip to content

Operations ​

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

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.
[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 chunkRetain items whose Noul probability clears a threshold.

Policy and utility operations ​

OperationAliasProvider callsPurpose
[Policy] Applyapply-policy0Convert answers to ACCEPT, REVIEW, or REJECT.
[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 before a billed call.

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.

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, and TOO_MANY_OPTIONS
  • 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.

Released under the MIT License.