Skip to main content

Overview

TypeSafe is a specialized decision provider serving the jev family of System One judgment models. A decision request carries a state (what to evaluate) and a map of named questions; the response carries one typed answer per question. Bifrost performs conversions including:
  • Model ID mapping - Uses provider model identifier directly (jev-1.13.0, jev-latest, jev-preview)
  • Question conversion - Maps Bifrost decision kinds (noul, choice, score) to TypeSafe’s native System One question types 1:1
  • Answer normalization - Native noul/choice/score value fields normalize to a unified value, with confidence, probabilities, and legend metadata preserved
  • Usage normalization - input_tokens/output_tokens map to Bifrost’s prompt_tokens/completion_tokens (TypeSafe bills input tokens only)
  • Strict validation - Unsupported kinds, missing instructions, and malformed criteria are rejected locally with a 400 rather than silently approximated

Supported Operations

Unsupported Operations (❌): Chat Completions, Responses API, Text Completions, Embeddings, and every other operation return UnsupportedOperationError - TypeSafe serves judgment models only.Model listing: TypeSafe documents no upstream models endpoint. Bifrost serves the jev catalog from its model datasheet, including pricing and context length.

Setup & Configuration

Configure TypeSafe as a provider with a bearer API key:

Decisions API

POST /v1/decisions evaluates state against named questions. Each question has a kind, instructions (string or structured data), and kind-specific criteria:
Response:

Field Mapping Reference

Complete mapping between Bifrost’s /v1/decisions contract and TypeSafe’s native /v1/systemone API.

Request

Criteria by kind

In the converted request, validated criteria values pass through to TypeSafe unchanged - descriptions are never rewritten. The conversion path re-encodes JSON, so whitespace and object-key ordering can differ; raw-request passthrough bypasses conversion and preserves the original request bytes.

Response

Every requested question must produce an answer of its declared kind; a missing answer, a kind mismatch, or a missing value fails the request rather than returning partial results.

Errors

Requests rejected by Bifrost’s own validation (see tables above) return 400 with caller_invalid_request before any upstream call is made.

Native Integration

Bifrost also exposes TypeSafe’s native API 1:1 under the /typesafe prefix, for clients written against TypeSafe directly: The native route accepts bare model IDs (jev-1.13.0) exactly as TypeSafe does, and additionally accepts typesafe/-prefixed IDs.
Success responses are shape-compatible with TypeSafe’s own API - identical byte-for-byte only on the raw-response passthrough path, otherwise rebuilt and re-encoded (native shape preserved, exact JSON byte ordering not guaranteed). Error responses use TypeSafe’s native {"detail": {"error_type", "message"}} shape with upstream status codes preserved. Requests rejected by Bifrost’s local validation return 400 where TypeSafe’s own validation would return 422.

Model Naming

Responses always report the resolved versioned model. TypeSafe bills input tokens only; the jev pricing, 64k context window, and rate limits are documented at docs.typesafe.ai/models.