Jev knowledge base·verified Sep 22, 2026

jev on cloudflare workers ai

Use Cloudflare’s typesafe/jev Workers AI model with its native request envelope, credentials, context limit and provider-specific operations.

the short answer

Cloudflare Workers AI lists Jev under model ID typesafe/jev. From a Worker, call env.AI.run("typesafe/jev", { state, questions }); through HTTP, post to the account Workers AI run endpoint with model typesafe/jev and the Jev payload under input. Treat Cloudflare credentials, pricing, context, quotas, errors and data path as provider-specific rather than copying TypeSafe direct-API assumptions.

Cloudflare model ID
typesafe/jev
Workers binding
env.AI.run
HTTP envelope
model plus nested input
Listed context
32,000 tokens on September 22, 2026
Classification
Third-party model

Cloudflare Is a Serving Route, Not a Different Jev Primitive System

Cloudflare’s model page describes the same state and Noul, Choice and Score question shapes, but wraps them in Workers AI’s runtime and HTTP conventions. The model ID is typesafe/jev, not TypeSafe’s direct jev-1.13.0 identifier. Provider model names and resolved upstream versions are separate fields that should not be conflated in logs.

The listing calls Jev a third-party model and points to TypeSafe’s legal and model pages. Review both providers’ current terms and the Cloudflare dashboard price before production; TypeSafe’s direct price and rate limits do not automatically apply.

Choose the Workers Binding or REST Boundary Deliberately

Both Cloudflare paths reach the same listed typesafe/jev route, but they expose different credential and deployment boundaries. Keep the semantic request in provider-neutral application types and map it at one adapter. This makes it possible to compare or replace routes without rewriting evaluation logic.

PathAuthentication boundaryGood fitPortability cost
Workers bindingCloudflare binding available as env.AIApplication logic already runs in a WorkerCloudflare runtime API appears in application code
Workers AI RESTAccount ID plus scoped Cloudflare API tokenServer or service outside WorkersCloudflare URL and response envelope
TypeSafe direct APITypeSafe API keyReference implementation or direct relationshipDifferent endpoint, model ID and top-level payload

Workers Binding Example

This request form follows Cloudflare’s published model page as checked September 22, 2026. Bind Workers AI to env.AI through the project’s Cloudflare configuration. Do not place the direct TypeSafe key in the Worker merely to use this binding; Cloudflare owns authentication and account configuration for its route.

export default {
  async fetch(_request, env) {
    const response = await env.AI.run("typesafe/jev", {
      state: "Help! My payouts have been failing for 3 days.",
      questions: {
        is_urgent: {
          type: "noul",
          instructions: "Does this convey urgency?",
          criteria: {
            true: "Explicitly time-sensitive",
            false: "No urgency expressed",
          },
        },
      },
    });

    return Response.json(response);
  },
};

Cloudflare HTTP Envelope Differs from TypeSafe Direct HTTP

The direct TypeSafe endpoint accepts state, model and questions at the top level; Cloudflare’s generic run endpoint places Jev’s state and questions inside input. Copying one payload into the other is not portable. Validate Cloudflare’s response envelope against its published schema before reading the nested Jev result.

curl "https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run" \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "typesafe/jev",
    "input": {
      "state": "Help! My payouts have been failing for 3 days.",
      "questions": {
        "is_urgent": {
          "type": "noul",
          "instructions": "Does this convey urgency?"
        }
      }
    }
      }'

Normalize the Transport Without Flattening Jev Semantics

The types and helper are an application architecture sketch; only the env.AI.run("typesafe/jev", { state, questions }) invocation is the documented Cloudflare surface. Build the validator from the current provider schema and preserve the native response for debugging under the project’s data policy.

Do not normalize a missing or malformed answer into false, an empty Choice or score zero. Those are plausible semantic values and would hide a provider failure as a model decision. Return a separate no-result status to the application.

type JevRequest = {
  state: string | Record<string, unknown>;
  questions: Record<string, unknown>;
};

type ProviderResult = {
  provider: "cloudflare";
  routeId: "typesafe/jev";
  requestedAt: string;
  latencyMs: number;
  attempts: number;
  nativeResponse: unknown;
  answers: Record<string, unknown>;
};

async function runThroughCloudflare(ai: Ai, request: JevRequest) {
  const started = performance.now();
  const nativeResponse = await ai.run("typesafe/jev", request);
  return normalizeAndValidate(nativeResponse, performance.now() - started);
}

Re-Evaluate Provider-Specific Behavior

Provider parity is a hypothesis. Run the same labeled fixtures through direct TypeSafe and Cloudflare if portability matters, compare full distributions, and measure latency from the actual Worker region. A schema match does not establish identical operational behavior.

DimensionCloudflare check
AuthenticationCloudflare API token or Workers binding
Model identitytypesafe/jev; record any returned upstream version if exposed
ContextListing says 32,000 tokens; reconcile with TypeSafe’s separate direct limits
PricingUse current Cloudflare dashboard, not TypeSafe direct price
Quota/errorsWorkers AI account limits and response envelope
Data pathCloudflare and referenced TypeSafe terms for the deployed arrangement

Record Both Route Identity and Model Identity

This is an application log schema, not a Cloudflare response. Cloudflare’s route ID identifies the provider surface; it should not be rewritten as proof that a particular TypeSafe version ran unless the response or current provider documentation exposes that version. Thresholds calibrated on a known direct model may need a fresh provider-specific study.

{
  "provider": "cloudflare-workers-ai",
  "provider_route": "typesafe/jev",
  "upstream_model": "<record only when exposed>",
  "question_version": "urgency-v3",
  "projection_version": "ticket-state-v2",
  "response_status": "scored",
  "attempts": 1,
  "latency_ms": 184,
  "native_response_ref": "secure://eval/9f2"
}

Production Architecture

An adapter makes provider differences explicit and lets tests replay the same application request against multiple transports. Keep fallback behavior in the application, not hidden inside provider switching. See the broader Jev platform comparison and HTTP contract.

01ApplicationConstructs versioned state and typed questions.
02Cloudflare adapterAdds model ID, input envelope, credentials and deadline.
03Workers AIServes the third-party Jev model and returns provider response.
04NormalizerValidates typed answers and records provider/model provenance.
05Decision layerApplies calibrated thresholds, permissions and fallback.
Keep provider details at the adapter boundary.

Treat Cloudflare Failures as Provider Outcomes

Provider failure and model uncertainty have different owners and remediation. A timeout says no result arrived; it does not say the condition is false. Bound the complete request deadline, make retries visible and include their cost and latency. The errors and retries guide supplies the general failure budget.

FailureRecordApplication behavior
Authentication or authorizationHTTP/provider code and request IDStop; do not retry with another credential automatically
Rate limit or capacityAttempt, backoff hint and elapsed budgetRetry only within the caller’s deadline or use declared fallback
Timeout or network interruptionUnknown completion plus latencyDo not convert to a semantic negative result
Schema-invalid responseRedacted native payload and adapter versionQuarantine result and alert
Valid Jev uncertaintyComplete distribution and question IDApply calibrated review or fallback band

Run a Provider Parity Study Before Switching Traffic

A successful request proves connectivity, not behavioral parity. Compare at the action boundary: how many cases move from allow to review or review to decline, and which labeled errors change? The regression-testing guide defines the fixture manifest and calibration defines probability comparison.

  1. Freeze Choice, Score and Noul fixtures with independent labels and full expected answer sets.
  2. Send equivalent semantic state and questions through direct TypeSafe and Cloudflare adapters.
  3. Record route IDs, any resolved model metadata, distributions, errors, latency and usage.
  4. Compare paired answers, probability movement, calibration and action-band changes.
  5. Load-test representative state lengths and concurrency within current provider limits.
  6. Fit route-specific thresholds if required; canary and retain the previous route as rollback.

Verification Checklist

Cloudflare publishes separate setup, pricing and platform-limit pages. Capture their review dates in the deployment record because catalog presence, pricing and account limits can change independently. Re-run the checklist after a route, Worker runtime or model update.

  • Confirm typesafe/jev still appears in Cloudflare’s model catalog and inspect the schema links.
  • Check dashboard pricing, account quotas and regional availability.
  • Run a credentialed smoke test and store a redacted response fixture.
  • Replay labeled semantic tests and compare with the previously approved provider.
  • Inject timeout, quota and malformed-response paths before enabling an action.

FAQ

What is the Cloudflare Jev model ID?

Cloudflare lists typesafe/jev as of September 22, 2026. Verify the live catalog before deployment.

Is Cloudflare’s payload the same as TypeSafe’s direct API?

No. Cloudflare’s HTTP run endpoint uses a provider envelope with model and nested input.

Does TypeSafe direct pricing apply on Cloudflare?

No. Check Cloudflare’s current dashboard pricing and account terms for this route.

Does Cloudflare make Jev an eval platform?

It supplies model access. Your application or an evaluation platform still owns datasets, trace linkage, labels, metrics and review.

Sources

Checked against the sources below on September 22, 2026. Model versions, prices and limits change.

  1. Cloudflare Workers AI: TypeSafe Jev
  2. Cloudflare Workers AI: Workers binding setup
  3. Cloudflare Workers AI: REST API setup
  4. Cloudflare Workers AI: Pricing
  5. Cloudflare Workers AI: Limits
  6. TypeSafe AI docs: HTTP API reference
  7. TypeSafe AI docs: Models
  8. TypeSafe AI docs: Primitives
  9. TypeSafe AI docs: Jev 1.13 jaggedness