Skip to main content

Settings

Description

Settings contains runtime and editor settings that can be passed into graph execution. It is intentionally optional-heavy: callers only provide the values needed by the nodes and plugins they run.

RunGraphOptions extends Settings, so these fields are passed at the top level of a graph run options object.

Definition

export interface Settings<PluginSettings = Record<string, Record<string, unknown>>> {
recordingPlaybackLatency?: number;
defaultNodeColors?: boolean;
openNodeSettingsOnCreate?: boolean;
pluginSettings?: PluginSettings;
pluginEnv?: {
[key: string]: string | undefined;
};
openAiKey?: string;
openAiOrganization?: string;
openAiEndpoint?: string;
chatNodeTimeout?: number;
chatNodeHeaders?: Record<string, string>;
throttleChatNode?: number;
}

Properties

recordingPlaybackLatency

Type: number

Delay between recorded chat messages during playback, in milliseconds.

defaultNodeColors

Type: boolean

When enabled in the editor, newly added supported nodes receive predefined colors.

openNodeSettingsOnCreate

Type: boolean

When enabled in the editor, creating a node opens its settings panel immediately.

pluginSettings

Type: Record<string, Record<string, unknown>>

Settings owned by plugins.

pluginEnv

Type: Record<string, string | undefined>

Environment-like values made available to plugins. In @valerypopoff/rivet2-node, if pluginEnv is unset, Rivet fills plugin-declared environment values from process.env.

openAiKey

Type: string

Legacy/shared OpenAI key used by legacy Chat and OpenAI-backed execution paths. LLM Chat can also use provider-specific settings or an API Key input port depending on its API key source.

openAiOrganization

Type: string

Optional OpenAI organization ID for OpenAI-backed calls.

openAiEndpoint

Type: string

Optional endpoint override for legacy OpenAI-compatible Chat behavior.

chatNodeTimeout

Type: number

Timeout in milliseconds for legacy Chat node calls.

chatNodeHeaders

Type: Record<string, string>

Headers applied to legacy Chat node calls.

throttleChatNode

Type: number

Throttle delay for streaming legacy Chat node data into Rivet.

Usage

Settings fields are merged directly into RunGraphOptions:

const options: RunGraphOptions = {
graph: 'Main',
openAiKey: process.env.OPENAI_API_KEY,
pluginEnv: {
ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY,
},
};

When using the Node package, unset OpenAI defaults are filled from OPENAI_API_KEY, OPENAI_ORG_ID, and OPENAI_ENDPOINT when possible.

See Also