Integrations / OpenRouter Router

TypeSafe Jev Router.

TypeSafe Jev Router (model slug: typesafe/jev-router) is a managed model router hosted on OpenRouter. It provides an OpenAI-compatible POST /api/v1/chat/completions endpoint that evaluates each incoming request with TypeSafe's System One decision model (Jev) to select the backing generative model and reasoning effort, returning standard completion text.

Unlike direct Jev System One inference (which returns typed discrete decisions such as Choice, Noul, or Score), Jev Router acts as an intelligent proxy: it takes chat messages, uses Jev behind the scenes to determine how to route the request across OpenRouter's model catalog, and returns the downstream model's generated prose or stream to your application.

Key Specifications

Documented attributes published by OpenRouter and TypeSafe AI for the typesafe/jev-router endpoint:

PropertySpecificationNotes
Model Identifiertypesafe/jev-routerModel slug passed to OpenRouter API payloads.
Host PlatformOpenRouterDeployed in partnership with TypeSafe AI as a hosted model endpoint.
API ProtocolPOST /api/v1/chat/completionsOpenAI Chat Completions schema with SSE streaming and tool calling.
Context Window1,000,000 tokensPublished context window on OpenRouter's model card.
Input ModalitiesAudio, File (PDF), Image, Text, VideoDocumented input modalities accepted by the endpoint.
Output ModalityTextGenerative text completion or token stream from the selected model.
Decision EngineTypeSafe Jev (System One)TypeSafe's System One model evaluates the request to pick the model and reasoning effort.
Current Pricing$0.00 / 1M prompt · $0.00 / 1M completionListed at zero cost on OpenRouter (verified October 2026; subject to change over time).
Release DateSeptember 25, 2026Official product launch on OpenRouter.

Disambiguation: Jev Router Entities

Because the phrase “Jev Router” is used across different tools, repositories, and documentation, searchers frequently encounter four distinct entities:

EntityType & LocationPrimary InterfaceWhat It ReturnsPrimary Purpose
TypeSafe Jev Router
typesafe/jev-router
(This page)
Managed cloud endpoint on OpenRouterPOST /api/v1/chat/completionsGenerative text completion from the routed downstream modelOpenAI-compatible endpoint that automatically chooses a model and reasoning effort tier across OpenRouter's catalog.
Custom Jev Routing
(Application pattern)
In-app code using @typesafe-ai/sdkPOST /v1/systemoneTyped choices (Choice), probabilities (Noul), or scores (Score)Custom branching logic to bypass LLMs for cached data, dispatch to private internal models, or escalate low-confidence queries to human review. See pattern →
Community CLI Proxy
dirien/jev-router
(@ediri/jev-router)
Independent open-source local proxy (Engin Diri)Local proxy (port 4100 UI)Proxied CLI responses from selected tiersPass-through proxy (v1.6.0) for Claude Code and OpenAI Codex CLI. Intercepts human turns and queries Jev to switch model tiers (defaults: Haiku 4.5, Sonnet 5, Opus 5.5). Unaffiliated with TypeSafe AI.
OpenRouter Auto Router
openrouter/auto
Native OpenRouter meta-modelPOST /api/v1/chat/completionsGenerative text completionRoutes requests based on trailing 7-day community spend and usage share across OpenRouter. Billed at pass-through underlying model rates with up to 2M context.
Package name note: The independent community CLI proxy by Engin Diri is published on npm under the scoped name @ediri/jev-router (GitHub: dirien/jev-router). Running the unscoped command npx jev-router resolves to a separate, earlier project by Pratyush Garg (gargpratyush/jev-router). Neither CLI proxy is affiliated with TypeSafe AI or OpenRouter's hosted typesafe/jev-router endpoint.

Documented Architecture & Behavior

OpenRouter and TypeSafe document the operational behavior of Jev Router as a multi-stage request lifecycle:

01
Request & Modality Ingestion (Up to 1M Tokens):

Requests enter OpenRouter via the standard Chat Completions endpoint. Jev Router accepts conversation history, system instructions, tool definitions, and multimodal inputs (audio, PDF documents, images, and video). The endpoint supports context lengths up to 1,000,000 tokens.

02
System One Evaluation with Jev:

Before generating text, the request is evaluated by TypeSafe's Jev model. As a System One model, Jev specializes in fast, structured decisions rather than generative token drafting.

03
Dynamic Model & Reasoning Effort Selection:

According to OpenRouter documentation, Jev Router picks the best model and reasoning effort for each request, balancing quality, speed, and cost. It leverages the broader model ecosystem and adapts dynamically as a multi-turn conversation evolves.

04
Downstream Execution & Streaming:

The prompt is forwarded to the chosen model endpoint. The resulting completion is returned as a standard JSON response or streamed chunk-by-chunk via Server-Sent Events (SSE).

Note on implementation details: TypeSafe and OpenRouter have not published the internal scoring algorithms, exact decision latency figures, or specific candidate pool thresholds used by Jev Router. While OpenRouter provides prompt caching across its platform, specific cache guarantees across dynamic model switches are not documented.

How to Use Jev Router (Runnable Examples)

Because Jev Router adheres to the standard OpenAI Chat Completions API schema, you call it by configuring your client with OpenRouter's base URL and specifying typesafe/jev-router:

cURL (HTTP POST)

POST openrouter.ai/api/v1/chat/completions

Standard HTTP request using an OpenRouter API key:

cURL (Chat Completions)
curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "HTTP-Referer: https://your-domain.com" \
  -H "X-Title: Your Application Name" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "typesafe/jev-router",
    "messages": [
      {
        "role": "user",
        "content": "Compare write amplification in LSM-trees versus B-trees for append-heavy database engines."
      }
    ]
  }'

Python (OpenAI SDK)

pip install openai

Configure the official OpenAI client with OpenRouter's base URL:

Python (openai SDK)
import os
from openai import OpenAI

# OpenRouter provides an OpenAI-compatible /v1 endpoint
client = OpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key=os.environ.get("OPENROUTER_API_KEY"),
)

response = client.chat.completions.create(
    model="typesafe/jev-router",
    messages=[
        {
            "role": "user",
            "content": "Write a Python function to safely validate and parse a JSON Web Token (JWT) with HMAC-SHA256 signature verification."
        }
    ],
    extra_headers={
        "HTTP-Referer": "https://your-domain.com",
        "X-Title": "My Application",
    }
)

# Text completion returned from the chosen downstream model
print("Response content:")
print(response.choices[0].message.content)

# The response object surfaces the resolved backing model
print(f"\nResolved backing model: {response.model}")

TypeScript / Node.js (OpenAI SDK)

npm install openai

TypeScript implementation using standard OpenAI chat completions:

TypeScript (openai SDK)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://openrouter.ai/api/v1",
  apiKey: process.env.OPENROUTER_API_KEY,
  defaultHeaders: {
    "HTTP-Referer": "https://your-domain.com",
    "X-Title": "My Application",
  },
});

async function main() {
  const completion = await client.chat.completions.create({
    model: "typesafe/jev-router",
    messages: [
      {
        role: "user",
        content: "What is the computational complexity of Dijkstra algorithm using a Fibonacci heap vs a binary heap?",
      },
    ],
  });

  // Generated text response
  console.log("Output:", completion.choices[0].message.content);

  // Inspect the backing model selected by the router
  console.log("Resolved Model:", completion.model);
}

main();

Streaming Completions

stream=True

Stream generated tokens in real time over Server-Sent Events (SSE):

Python (Streaming Execution)
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key=os.environ.get("OPENROUTER_API_KEY"),
)

stream = client.chat.completions.create(
    model="typesafe/jev-router",
    messages=[
        {"role": "user", "content": "Explain why Raft consensus requires a leader election step."}
    ],
    stream=True,
)

for chunk in stream:
    delta = chunk.choices[0].delta.content if chunk.choices else ""
    if delta:
        print(delta, end="", flush=True)

print()

Multimodal Input (Vision / Files)

Text + Images / Documents

Send structured multimodal content using standard OpenAI message parts:

cURL (Multimodal Request)
curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "typesafe/jev-router",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "Extract all line items, subtotals, and sales tax from this invoice."
          },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://upload.wikimedia.org/wikipedia/commons/0/0b/ReceiptSwiss.jpg"
            }
          }
        ]
      }
    ]
  }'

Model Attribution & Transparency

When calling typesafe/jev-router on OpenRouter, the returned completion object indicates which underlying model fulfilled the turn:

•
Response Object Attribution:

In standard non-streaming requests, the top-level response.model attribute reports the identifier of the backing model selected by the router for that generation.

•
OpenRouter Activity Dashboard:

OpenRouter's user dashboard records each generation with its resolved downstream provider, token counts, and latency metrics.

•
Aggregate Model Usage Tracker:

OpenRouter's public model page for Jev Router features a “Top models used by Jev Router” section. As of October 2026, OpenRouter reports that no aggregate usage data is available yet; as request volume accumulates, OpenRouter publishes the live aggregate mix there.

Pricing & Token Economics

Understanding the pricing of Jev Router requires distinguishing between the router endpoint and direct Jev System One evaluation:

Endpoint / ServicePublished RateStatus & Notes
Jev Router Prompt Tokens
typesafe/jev-router
$0.00 / 1M tokensCurrently listed at zero cost on OpenRouter (verified October 2026).
Jev Router Completion Tokens
typesafe/jev-router
$0.00 / 1M tokensCurrently listed at zero cost on OpenRouter (verified October 2026).
Direct Jev 1.13 Inference
typesafe/jev-1.13
$0.042 / 1M input · $0.00 outputPublished rate for direct System One decision calls on OpenRouter and TypeSafe.
Time-sensitive pricing: OpenRouter currently lists typesafe/jev-router with $0.00 prompt and completion pricing. Because catalog rates on hosted aggregators can change over time, always check OpenRouter's live model card before relying on specific rates for production budgets.

When to Use Jev Router vs. Custom Routing

Choose between the managed router endpoint and custom in-application routing based on your architectural needs:

Use TypeSafe Jev Router when:
typesafe/jev-router
  • Drop-in OpenAI compatibility: You want an automatic multi-model router without modifying your application's request architecture.
  • OpenRouter model ecosystem: You want access to models across providers (Anthropic, OpenAI, Google, Meta, DeepSeek) through a single endpoint.
  • Automatic reasoning effort: You want reasoning effort dynamically assigned per prompt rather than statically configured.
  • Standard text completions: Your workload expects generative text, code completions, or multi-turn conversational responses.
Build a Custom Jev Router when:
@typesafe-ai/sdk
  • Non-LLM execution targets: You want to route deterministic queries directly to database queries, cached answers, or microservices at zero token cost.
  • Confidence-gated human review: You need empirical confidence thresholds to route ambiguous or high-risk requests to human review.
  • Private or self-hosted models: You need to dispatch to VPC-hosted endpoints, AWS Bedrock, or internal fine-tunes not available on OpenRouter.
  • Multi-attribute classification: You want to evaluate multiple structured questions (e.g. intent, sentiment, urgency) in a single System One call. Explore guide →

Parameter Support & Capabilities

When sending requests to typesafe/jev-router, parameter handling operates across three distinct layers:

01
Gateway & Routing Controls:

Controls accepted by OpenRouter's API gateway independently of the model, such as stream, provider preferences, and attribution headers (HTTP-Referer, X-Title).

02
Declared Router Capabilities:

Parameters advertised for typesafe/jev-router on OpenRouter, including tools, tool_choice, parallel_tool_calls, reasoning_effort, response_format (structured outputs), temperature, top_p, max_tokens, and stop sequences.

03
Downstream Model Compatibility:

Because Jev Router dynamically routes requests to diverse backing models, execution of specific parameters ultimately depends on the capabilities of the selected model. Sending parameters not supported by the resolved backing model can result in an upstream HTTP 400 error.

Frequently Asked Questions

Q
What is Jev Router?

Jev Router (typesafe/jev-router) is a managed routing endpoint on OpenRouter. It runs on TypeSafe's Jev System One decision model to choose the backing model and reasoning effort for each request, returning the generated text completion through OpenRouter's OpenAI-compatible Chat Completions API.

Q
How does Jev Router differ from ordinary Jev?

Ordinary Jev (typesafe/jev-1.13) is a System One decision engine that takes structured state and questions, returning typed discrete probabilities (Choice, Noul, Score) rather than generating text. Jev Router is a chat proxy that uses Jev internally to decide which generative LLM should answer your prompt.

Q
How do I see which model Jev Router selected?

In non-streaming requests, inspect the top-level model attribute in the returned JSON response (e.g., response.model). OpenRouter populates this with the slug of the backing model that fulfilled the request. You can also view the routed model for any request in your OpenRouter Activity dashboard.

Q
Is Jev Router free?

Yes. OpenRouter currently lists prompt and completion pricing for typesafe/jev-router at zero ($0.00 / 1M tokens), verified as of October 2026. Because platform rate cards can be updated over time, verify current pricing on OpenRouter's model page.

Q
What is @ediri/jev-router on npm?

@ediri/jev-router (GitHub: dirien/jev-router) is an independent open-source local proxy created by Engin Diri. It runs locally to intercept human turns from terminal coding agents (Claude Code and OpenAI Codex CLI) and uses Jev to select between model tiers. It is unaffiliated with TypeSafe AI or OpenRouter's hosted router.

Q
Can I use Jev Router with coding tools and clients?

Any client or developer tool that supports configuring a custom OpenAI-compatible base URL (https://openrouter.ai/api/v1) and custom model identifier can send requests to typesafe/jev-router. Check your specific tool's configuration documentation for custom OpenRouter endpoint support.

Not affiliated with, endorsed by, or operated by TypeSafe AI. Vendor claims are cited and attributed.