set_script_decisions
Select the Script Decisions provider (jev, Decisions API, or off) for one script and control which question lists switch on, so CM_decisions calls run with saved provider keys.
Instructions
Choose the Script Decisions provider for one script on this device: jev, openai-decisions (Decisions API), or off. Once a provider is chosen, the script's CM_decisions calls run without asking and are billed to the person's saved key for that provider, so choose one only when the person wants it. sets switches On exactly the question lists it names, by the hashes get_script_decisions returns for this scriptId, and every other list Off. Without sets, unchanged code keeps its On/Off choices and changed code switches every list On. Choosing a provider again also resumes a script the loop guard paused for repeating the same input (pausedReason loop_repeat).
Choosing jev or openai-decisions needs the person to have turned on Script Decisions under Full access in Customaise Settings, Agent permissions; only they can, in the extension. Switching a script off is always allowed. These stay with the person: provider keys, this device's Allow Script Decisions switch, daily limits, pausing this device, a script paused for a runaway loop (loop_runaway), and scripts shared with them. When the error type is person_required, tell the person the next step the message names and do not retry. Other refusals carry type rejected, not_found, auth_required or invalid_argument, with the precise reason in code. After service_unavailable or a timeout the outcome is uncertain: read the state with get_script_decisions before trying again. Returns the script's state as get_script_decisions does for one script. Needs extension 1.4.0 or later.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sets | No | Hashes of the question lists to switch On, from get_script_decisions with this scriptId; every other list goes Off. Only with jev or openai-decisions. Omit to keep the current choices for unchanged code. | |
| provider | Yes | jev, openai-decisions (Decisions API), or off to switch the script provider off. | |
| scriptId | Yes | The script ID, from list_scripts or get_script_decisions. |