LLM answers
Let a model answer for a route — Dcision calls OpenRouter or Vercel AI Gateway with your workspace's own key, the route's prompt as the system message and the state as input.
An LLM destination generates the answer for a route. When it fires, Dcision sends a chat request to the model you picked — the route's prompt as the system message, the state (or a template of your choice) as the user message — and returns the model's text in the response.
It is how one decision can route and answer: Jev decides that a message is about billing, and the billing prompt writes the reply.
Your key, your provider
LLM answers run on your own provider key — never on Dcision's engine key:
provider | Calls | Key |
|---|---|---|
openrouter (default) | POST https://openrouter.ai/api/v1/chat/completions | Your OpenRouter key |
vercel | POST https://ai-gateway.vercel.sh/v1/chat/completions | Your Vercel AI Gateway key |
Save the key in Settings → Engine → Provider keys — the same keys used to bring your own key for Jev; Admins and the Owner can add them. Saving a key doesn't change the engine: decisions can keep running on Dcision's engine key while their LLM destinations use yours. The provider bills the tokens to your account; Dcision doesn't charge for them, and the decision itself is billed as usual.
Configure it
{
"key": "sales_llm",
"type": "llm",
"when": { "conditions": [{ "field": "route", "on": "output", "operator": "eq", "value": "sales" }] },
"llm": {
"provider": "openrouter",
"model": "openai/gpt-5-mini",
"instructions": "You are Acme's sales team. Answer the lead in two sentences, say that a person will follow up today and never quote prices.",
"input": "{{state.message}}",
"maxTokens": 300,
"temperature": 0.3,
"timeoutMs": 15000
}
}| Field | Type | Default | Description |
|---|---|---|---|
provider | string | openrouter | openrouter or vercel. |
model | string | — | The provider's model ID, such as openai/gpt-5-mini — letters, digits and . _ : / -, up to 120 characters. The editor suggests a few. |
instructions | string | — | The route's prompt, sent as the system message: 1 to 8,000 characters, with variables. |
input | string | the whole state | The user message: up to 8,000 characters, with variables. Empty sends the state as text — a string as-is, an object or a list as JSON. |
maxTokens | integer | 512 | 16 to 2,048. |
temperature | number | 0.3 | 0 to 2. |
timeoutMs | integer | 20000 | 1,000 to 25,000: how long Dcision waits for the model. |
Prompts and inputs use the text encoding; secrets can't be used in them.
In the response
{
"key": "sales_llm",
"type": "llm",
"status": "completed",
"text": "Thanks for reaching out! Someone from our sales team will contact you today to talk about your 500 users.",
"model": "openai/gpt-5-mini",
"usage": { "input_tokens": 61, "output_tokens": 27 }
}model is the model the provider reports, and usage the tokens it counted — the provider's numbers, separate from the decision's own metrics.
When the call can't be made or fails, the entry says so and the decision still answers:
{ "key": "sales_llm", "type": "llm", "status": "failed", "error": "Add your OpenRouter key in Settings → Engine to use LLM replies." }error | Cause |
|---|---|
| Add your OpenRouter key in Settings → Engine to use LLM replies. | No key saved for the provider (the message names it). |
| OpenRouter answered 401: … | The provider refused the request; its own message follows. |
| OpenRouter returned an empty answer. | No text in the provider's answer. |
| No answer from OpenRouter within 15 s. | timeoutMs elapsed. |
| Couldn't reach OpenRouter. | A network error. |
LLM calls are made once — they aren't retried — and failures appear in the decision's Overview as failed destinations.
Latency
The caller waits for LLM answers: they run after the decision, in parallel with the other destinations that wait (agents in sync mode), so the response arrives after the slowest of them. A decision can make at most 3 such calls per execution; more are skipped with "reason": "limit".
Give your HTTP client a timeout that covers the decision's timeoutMs plus the longest destination timeoutMs — for example 5 s + 15 s + a margin. The SDKs wait 30 seconds per attempt by default. The response's metrics.latency_ms measures the decision only: it doesn't include the time spent on these calls.
In the Playground
Previews show the prompt — provider, model, the rendered instructions and message — without calling the model. Switch on Run destinations for real to get a real answer; see Testing destinations.
Data
The input — the whole state unless you set input — is sent to the provider you chose, under your account and its terms. Send only what the answer needs: "input": "{{state.message}}" instead of the whole state.
Fixed replies
Return a ready-made message — text and optional buttons, with variables — in the API response for a given result, instantly and without calling any model.
Agents
Hand a result to your own agent endpoint with the route's instructions and tools — wait for its reply in the response, or hand off in the background with retries.