Skip to main content
A hosted decisions model (Jev). Construction mirrors the other simulang service models ([DecisionModel.default], [DecisionModel.byAlias]); the one entry point for work is [DecisionModel.decide].

Constructor

Returns

DecisionModel

Properties

string
required
The model identifier from provider configuration.

Methods

availableAliases()

Every decisions model alias advertised by the loaded configuration, deduplicated and sorted alphabetically.

Returns

string[]

byAlias()

Resolve a model alias against the loaded configuration. Throws if the alias is unknown.

Parameters

string
required

Returns

DecisionModel

checkAuth()

Check that provider credentials work. Throws (and logs a warning) if they do not.

decide()

Answer every named question against one state, in one request. Separate calls send and bill that state again. Each name is a property of the result (answers.urgent.probability). answers.usage is the token usage, or null. usage is reserved. A string state is text. An object or array is structured data. A Choice with one option is answered locally, at probability 1.

Parameters

string | any[] | Record<string, any>
required
Q
required

Returns

TokenUsage

default()

First decisions model advertised by the first capable provider in the loaded configuration whose credentials are currently available. Throws if no provider remains available.

Returns

DecisionModel

maxChoiceOptions()

Cap on options per Choice question: the provider’s max_choice_options, or 255.

Returns

number

maxScoreLevels()

Cap on levels per Score question: the provider’s max_score_levels, or 10.

Returns

number

openrouterJev()

Convenience shim for the bundled OpenRouter Jev alias (BYO OPENROUTER_API_KEY).

Returns

DecisionModel