Skip to content

Pre-triage with Jev

This recipe uses Jev, TypeSafe’s decision model, to answer a cheap yes, no or unknown question about each incoming item, so only the items that need it go to a large model.

Jev is not a chat model. You send a state (the facts, as JSON) and typed questions, and get answers. Question types:

  • noul: yes, no or unknown, for example “Is this ticket urgent?”
  • choice: one option out of a list
  • score: a number

You call it on OpenPike’s /v1/systemone endpoint with the same virtual key as your other requests. Its requests show in Logs and count toward the plan, and request-per-minute loop limits apply to them; spend budgets do not, because Jev is not priced in OpenPike yet.

Add a TypeSafe key on the Providers page, and use typesafe/jev-1.13.0. If TypeSafe’s API is not open to you yet, add an OpenRouter key instead and use openrouter/typesafe/jev-1.13; OpenRouter serves the same endpoint. See TypeSafe (Jev).

triage.sh
curl https://api.openpike.dev/v1/systemone \
-H "Authorization: Bearer $OPENPIKE_API_KEY" \
-H "Content-Type: application/json" \
-H "x-openpike-tags: agent=triage" \
-d '{
"model": "typesafe/jev-1.13.0",
"state": {"ticket": "Customer reports the checkout page returns a 500 error for all users."},
"questions": [{"id": "urgent", "type": "noul", "question": "Is this ticket urgent?"}]
}'
  • Yes: send the ticket to your large model, page someone, or both.
  • No: put it in the normal queue, no large-model call.
  • Unknown: treat it as yes, or ask a follow-up question with more of the ticket in state.

Tag the requests, as in the example, with agent=triage. Agents then shows how many decisions you made; Jev is not priced in OpenPike yet, so its requests show no cost.

OpenPike has not tested TypeSafe’s API live yet; check the first responses in Logs.