lua-cli 3.49.1 → 3.49.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -619,7 +619,8 @@ lua decisions [command] [name] [version] [options]
619
619
  - `--force` - Skip the confirmation (`publish`, `delete`)
620
620
  - `--state <json>` - `run`: the state to decide on
621
621
  - `--message <text>` - `run`: sent as `{ message: <text> }`; an empty or blank message is a usage error (exit 2)
622
- - `--provider <jev|openai|auto>` - `run`: override the version's provider
622
+ - `--provider <jev|openai|openrouter|auto>` - `run`: override the version's provider
623
+ - `--model <id>` - `run`: override the version's model; an OpenRouter id such as `liquid/d1` runs on OpenRouter (see [Decisions](api/Decisions.md#other-decision-models-through-openrouter))
623
624
  - `--min-confidence <n>` - `run`: override the version's `minConfidence` (0 to 1)
624
625
 
625
626
  **Example:**
package/docs/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # lua-cli v3.49.1
1
+ # lua-cli v3.49.2
2
2
 
3
- Welcome to the comprehensive API documentation for lua-cli v3.49.1. This guide covers every API, class, and function exported by the package.
3
+ Welcome to the comprehensive API documentation for lua-cli v3.49.2. This guide covers every API, class, and function exported by the package.
4
4
 
5
5
  ## 📚 Documentation Index
6
6
 
@@ -263,7 +263,7 @@ Each API doc includes:
263
263
 
264
264
  ---
265
265
 
266
- **Version:** 3.49.1
266
+ **Version:** 3.49.2
267
267
  **Last Updated:** October 2026
268
268
 
269
269
  ---
@@ -120,13 +120,13 @@ Question names and option labels are at most 64 characters. Any name works, incl
120
120
  interface DecisionResult {
121
121
  decisionId: string;
122
122
  answers: { [questionName: string]: DecisionAnswer };
123
- provider: 'jev' | 'openai';
123
+ provider: 'jev' | 'openai' | 'openrouter';
124
124
  model: string;
125
125
  rule: 'pinned' | 'images' | 'region' | 'zero_retention' | 'default' | 'fallback';
126
126
  usage: { inputTokens: number | null };
127
127
  durationMs: number;
128
128
  cached: boolean;
129
- fallback?: { from: 'jev' | 'openai'; reason: string };
129
+ fallback?: { from: 'jev' | 'openai' | 'openrouter'; reason: string };
130
130
  }
131
131
  ```
132
132
 
@@ -254,20 +254,56 @@ Under `lua test` and through the HTTP API, `decision_timeout`, `decision_unavail
254
254
 
255
255
  ## Options
256
256
 
257
- | Option | Values | Default | Description |
258
- | --------------- | ------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
259
- | `provider` | `'auto'`, `'jev'`, `'openai'` | `'auto'` | Which provider answers, where `auto` lets the platform pick. |
260
- | `model` | a model id of that provider | provider's | The exact model to use, which must belong to the chosen provider. |
261
- | `fallback` | `'jev'`, `'openai'`, `'none'` | other one | The provider to try when the first one fails, or `none` to never fall back, and a pinned `provider` never falls back unless you set this. |
262
- | `region` | `'eu'` | none | Routes the call to OpenAI's EU endpoint. |
263
- | `zeroRetention` | `true`, `false` | `false` | Routes the call to OpenAI only, and no retention flag is sent with the request. |
264
- | `minConfidence` | 0 to 1 | `0.7` | Below this confidence a choice or score answer carries `uncertain: true`. |
265
- | `timeoutMs` | 100 to 15000 | `3000` | How long the whole call may take, fallback included, before it fails with a timeout, and a value outside the range is clamped to it. |
266
- | `cache` | `{ ttlSeconds }` | none | Reuses the answer to an identical request for this many seconds. |
267
- | `logState` | `'summary'`, `'full'`, `'none'` | `'summary'` | How much of the state is kept in the decision log. |
257
+ | Option | Values | Default | Description |
258
+ | --------------- | --------------------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
259
+ | `provider` | `'auto'`, `'jev'`, `'openai'`, `'openrouter'` | `'auto'` | Which provider answers, where `auto` lets the platform pick between Jev and OpenAI. `openrouter` needs a `model`. |
260
+ | `model` | a model id of that provider | provider's | The exact model to use. `jev-*` runs on Jev, `gpt-*` on OpenAI, and a `vendor/model` id runs on OpenRouter (see below). |
261
+ | `fallback` | `'jev'`, `'openai'`, `'none'` | other one | The provider to try when the first one fails, or `none` to never fall back, and a pinned `provider` never falls back unless you set this. |
262
+ | `region` | `'eu'` | none | Routes the call to OpenAI's EU endpoint. |
263
+ | `zeroRetention` | `true`, `false` | `false` | Routes the call to OpenAI only, and no retention flag is sent with the request. |
264
+ | `minConfidence` | 0 to 1 | `0.7` | Below this confidence a choice or score answer carries `uncertain: true`. |
265
+ | `timeoutMs` | 100 to 15000 | `3000` | How long the whole call may take, fallback included, before it fails with a timeout, and a value outside the range is clamped to it. |
266
+ | `cache` | `{ ttlSeconds }` | none | Reuses the answer to an identical request for this many seconds. |
267
+ | `logState` | `'summary'`, `'full'`, `'none'` | `'summary'` | How much of the state is kept in the decision log. |
268
268
 
269
269
  A pinned `provider` overrides the images, `region` and `zeroRetention` rules.
270
270
 
271
+ ### Other decision models, through OpenRouter
272
+
273
+ Beyond Jev and OpenAI, you can run a decision on any of the models below by setting `model` to its id. These models are served through OpenRouter, so the result reports `provider: 'openrouter'`.
274
+
275
+ ```typescript
276
+ const r = await Decisions.ask({
277
+ state: { message: input.text },
278
+ questions: { refund: Decisions.odds('Is the customer asking for a refund?') },
279
+ model: 'liquid/d1',
280
+ });
281
+ ```
282
+
283
+ Requests and answers have the same shape for every model, and the result's `model` names the exact model version that answered. `auto` never picks one of these models, and `fallback` cannot name one. A call on one of them falls back to Jev or OpenAI when you set `fallback`. Jev and OpenAI are not reached this way: `typesafe/...` and `openai/...` ids fail with `decision_invalid`, so use `provider: 'jev'` or `'openai'`. Any other `vendor/model` id is accepted locally and checked when the call is made: a misspelt or unknown id fails with `decision_rejected` and the message names it, so check `model` against the list below before you ship.
284
+
285
+ Available models, October 2026:
286
+
287
+ | Model id | Input | Context | Typical latency\* | Notes |
288
+ | --------------------------------------- | ------------ | ------- | ----------------- | ---------------------------------------------------------------------- |
289
+ | `perplexity/pplx-decider-v1.1-27b` | text, images | 262k | 240 ms | Recommended |
290
+ | `liquid/d1` | text | 65k | 270 ms | Recommended |
291
+ | `microsoft/microsoft-decision-1` | text | 32k | 280 ms | Recommended |
292
+ | `cloudflare/clef-flash` | text, images | 65k | 330 ms | Recommended |
293
+ | `inception/mercury-decide` | text | 65k | 340 ms | Recommended |
294
+ | `togethercomputer/tev1-4b-experimental` | text | 32k | 270 ms | Recommended. At most 20 options per question and 32 questions per call |
295
+ | `cloudflare/clef` | text, images | 65k | 360 ms | Recommended |
296
+ | `upstage/solar-decide-flash` | text | 524k | 1 s | At most 26 options per question |
297
+ | `upstage/solar-decide` | text | 524k | 1 to 7 s | At most 26 options per question. Often slower than the default timeout |
298
+ | `jaredpalmer/kev-4b` | text | 8k | 1.6 s | |
299
+ | `nace-ai/drex-v1.5` | text | 131k | 480 ms | |
300
+
301
+ \* Median response time in Lua's internal benchmarks, October 2026. Jev answers in about 230 ms on the same calls.
302
+
303
+ Not available, because they keep request data and Lua only runs decisions on models that do not: `openai/gpt-6-luna-decisions` (use `provider: 'openai'`), `cloudflare/clef-omni`, `respan/span-01`, `respan/span-01-lite`, `inception/mercury-decide:free`. A model's own limit, such as too many options, fails with `decision_rejected` and the model's message.
304
+
305
+ The Input column is what each vendor lists. Images are sent to every model, and a model listed as text-only may still read them or may ignore them, so pick a model that lists images when an answer depends on one.
306
+
271
307
  ## Related APIs
272
308
 
273
309
  - [LuaDecision](./LuaDecision.md) declares a named, versioned decision that `Decisions.run` runs.
@@ -24,7 +24,7 @@ type LuaDecisionConfig = {
24
24
  name: string;
25
25
  description?: string;
26
26
  questions: Record<string, OddsQuestion | ChoiceQuestion | ScoreQuestion>;
27
- provider?: 'auto' | 'jev' | 'openai';
27
+ provider?: 'auto' | 'jev' | 'openai' | 'openrouter';
28
28
  model?: string;
29
29
  fallback?: 'jev' | 'openai' | 'none';
30
30
  region?: 'eu';
@@ -99,7 +99,7 @@ Each lua-core pod caches the current version. A promote, a publish, a rename or
99
99
 
100
100
  `lua decisions` lists the named decisions on the agent with their current version. `lua decisions versions triage` shows each version newest first, with its questions, provider and `minConfidence`.
101
101
 
102
- `lua decisions run triage --message 'I want a refund'` runs the current version and prints one line per answer, then the provider, rule, model, duration, tokens and fallback. Pass `--state '<json>'` to decide on structured state instead, and `--provider` or `--min-confidence` to override the version's options for that run.
102
+ `lua decisions run triage --message 'I want a refund'` runs the current version and prints one line per answer, then the provider, rule, model, duration, tokens and fallback. Pass `--state '<json>'` to decide on structured state instead, and `--provider`, `--model` or `--min-confidence` to override the version's options for that run. `--model liquid/d1` runs it on that model; see the model list in [Decisions](Decisions.md#other-decision-models-through-openrouter).
103
103
 
104
104
  The first push of a decision writes 1.0.1, as for every versioned primitive: a push bumps the version in `lua.skill.yaml` (1.0.0 for a new entry) before it writes.
105
105
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lua-cli",
3
- "version": "3.49.1",
3
+ "version": "3.49.2",
4
4
  "description": "Build, test, and deploy AI agents with custom tools, webhooks, and scheduled jobs. Features LuaAgent unified configuration, streaming chat, and batch deployment.",
5
5
  "readmeFilename": "README.md",
6
6
  "main": "dist/api-exports.js",
@@ -20,7 +20,7 @@
20
20
  "inquirer": "^12.9.6",
21
21
  "stripe": "^17.5.0",
22
22
  "js-yaml": "^4.1.0",
23
- "lua-cli": "^3.49.1",
23
+ "lua-cli": "^3.49.2",
24
24
  "openai": "^5.23.0",
25
25
  "uuid": "^13.0.0",
26
26
  "zod": "^3.24.1"