Docs
CommunityJev Integrations & Adapters
TypeSafe Adapter for TanStack AI
TanStack AI's TypeSafe adapter covers evaluate only and talks to TypeSafe over fetch, wiring jev-latest into decide() with choice, score, and boolean question helpers and a required TYPESAFE_API_KEY.
- Format
- Docs
- Reading time
- 2 min
- Published by
- Community
- Author
- TanStack
- Last verified
- Oct 2026
- Languages
- TypeScript
- Capabilities
- Requires API key
Highlights
- Install @tanstack/ai and @tanstack/ai-typesafe; the adapter covers evaluate only, talks to TypeSafe over fetch, and no TypeSafe SDK is involved.
- decide() takes a decider, a state, and questions built with choice, score, and boolean helpers, and returns value, probability, confidence, and meta.usage.
- Two documented models: jev-latest, the current stable alias, and jev-1.13.0, a pinned release; other TypeSafe model ids can be passed as strings.
- The adapter reads TYPESAFE_API_KEY from the environment; createTypesafeDecider accepts an explicit key and posts to /v1/systemone on the chosen base.
- baseURL and defaultHeaders route every request through a gateway; baseUrl and headers are aliases, and the long forms win when both are set.
Watch out
Vendor documentation that states no licence and includes no accuracy, pricing, or rate-limit data. It covers the evaluate pathway only, requires a TypeSafe API key from typesafe.ai, and its proxy example uses Cloudflare AI Gateway headers, so other gateways depend on their own header handling.
Questions about this entry
Short answers drawn from the linked project or page.
Evaluate only. It talks to TypeSafe over fetch with no TypeSafe SDK, and you pass typesafeDecider to decide() alongside a state and questions built with the choice, score, and boolean helpers from @tanstack/ai.
Add @tanstack/ai and @tanstack/ai-typesafe with your package manager, set TYPESAFE_API_KEY in the environment, then call decide with adapter typesafeDecider(jev-latest); the adapter reads the key itself and POSTs to /v1/systemone.
The docs list jev-latest, the current stable Jev alias, and jev-1.13.0, a pinned Jev release. You can also pass other TypeSafe model ids as strings to typesafeDecider.
Use createTypesafeDecider(model, apiKey, config), for example createTypesafeDecider(jev-latest, process.env.MY_TYPESAFE_KEY). Config accepts baseURL, defaultHeaders, a fetch override, and a timeout in milliseconds.
For each question, value, probability, and confidence, so the ticket example logs result.queue.value, result.queue.probability, and result.queue.confidence; result.meta.usage carries the request usage. Abort and middleware are covered in the evaluate guide.
Yes. Set baseURL and defaultHeaders and every request goes through the gateway; baseUrl and headers are aliases of the same options, and if both forms are set, baseURL and defaultHeaders win. The example sends a cf-aig-authorization header.
No licence, pricing, rate limits, or accuracy data, and no generation or chat pathway beyond evaluate. The adapter defaults to https://api.typesafe.ai, and getting a key means signing up at typesafe.ai.
From the Jev guides
Original write-ups on what this entry is for.
From the Jev AI model community
Posts from builders shipping with Jev right now.