FabricFabric
Decision Models

Set Up a Decision Model

Connect Jev (TypeSafe AI, OpenRouter, Vercel AI Gateway), Cloudflare Clef (Workers AI or AI Gateway), a local Laya server or your own endpoint.

All providers are set up in the same place: Settings → AI → Decision model (Jev). Switch on Enable decision model, pick a Provider, fill in what it asks for, and press Test. Keys are stored encrypted in Fabric's local credential vault.

Leave Model empty to use the provider's default; type a model id to pin one.

Jev

Jev is TypeSafe AI's decision model. Three providers serve it:

ProviderKeyDefault model
TypeSafe AI (direct)An API key from TypeSafe AI.jev-1.13.0
OpenRouterChoose Use key from … to reuse an OpenRouter connection you already have in Fabric, or paste a key.typesafe/jev-1.13
Vercel AI GatewayChoose Use key from … to reuse a Vercel AI Gateway connection, or paste a key.typesafe-ai/jev

If you already use OpenRouter or Vercel AI Gateway in Fabric, those are the quickest: there is nothing new to sign up for.

Cloudflare Clef

Clef is Cloudflare's decision model on Workers AI. It answers the same questions as Jev, with a 64K-token context.

ModelMedian latencyUse it for
clef (default)~210 msThe most accurate answers.
clef-flash~40 msChecks on every tool call — the best choice for Guarded mode.

Through Workers AI

  1. In the Cloudflare dashboard, copy your Account ID (on the account home page, or in the URL after dash.cloudflare.com/).
  2. Create an API token at My Profile → API Tokens → Create Token with the Workers AI: Read permission (enough to run models).
  3. In Fabric, choose Cloudflare Workers AI (Clef) and enter:
    • Base URL: https://api.cloudflare.com/client/v4/accounts/<account id>
    • API key: the token.
    • Model: leave empty for clef, or type clef-flash.
  4. Press Test.

Through AI Gateway

Use this when you want decision calls in your gateway's logs, analytics, caching and rate limits.

  1. In the Cloudflare dashboard, open AI → AI Gateway, create or open a gateway, and copy its endpoint from API (https://gateway.ai.cloudflare.com/v1/<account id>/<gateway id>).
  2. Create one API token with AI Gateway: Run and Workers AI: Read. For an authenticated gateway the same token covers both.
  3. In Fabric, choose Cloudflare AI Gateway (Clef) and enter the gateway URL as Base URL and the token as API key.
  4. Press Test.

Laya (local, free)

Laya is an open-source (Apache 2.0) decision model that runs on your own machine. Nothing you send leaves your computer.

  1. Install and start the server:

    pip install "laya[serve]" && laya-serve

    It listens on http://127.0.0.1:8000.

  2. In Fabric, choose Laya (local, open source). The Local server row shows whether it is running and which models are loaded; press Re-check after starting it.

  3. Leave Model empty (auto sends English text to the English model and everything else to the multilingual one), or pin english, multilingual or typed-decisions.

  4. If you started the server with LAYA_API_KEY, enter the same value as the key.

Laya accepts up to about 48 KB of text per question.

Custom server

Choose Custom (Jev-compatible server) for a self-hosted or other compatible endpoint. Enter its Base URL (Fabric appends /v1/systemone), and a key if the server needs one.

Testing and troubleshooting

Test sends one fixed yes/no question and shows the model that answered and how long it took.

You seeDo this
401 / 403The key is wrong or lacks permission. For Cloudflare, check the token has Workers AI: Read (and AI Gateway: Run for the gateway route).
404Check the Base URL: the account id (and gateway id) must be exactly as in the dashboard.
Not reachable (Laya)Start laya-serve, then Re-check.
Slow answersPick a faster model (clef-flash) or a nearer provider. Fabric never waits long: a feature that gets no answer in time behaves as if it were off.

Each feature's line under Advanced settings shows its failures over the last 7 days, so you can see whether the model is answering.

On this page