OptionalapiOptional API keys to use for this prompt execution. When provided, these keys will override the global API keys for the specified driver classes. This allows for runtime API key configuration without modifying environment variables or global settings.
OptionalcancellationOptional cancellation token to abort the prompt execution When this signal is aborted, the execution will be cancelled and any running operations will be terminated as gracefully as possible
OptionalconfigurationOptional configuration ID for environment-specific behavior
OptionalcontextUser context for authentication and permissions
OptionalCredentialWhich credentials this execution may spend. Omitted means 'Any': the run's own credentials,
then the platform's (credential bindings, the vendor's default credential, environment keys).
'RuntimeOnly' restricts it to what the caller supplied — apiKeys, or a prompt's
per-request credentialId. A model-vendor candidate whose driver class the run carries no key
for is unavailable, so selection and failover stay on the caller's own keys and a run they do not
cover fails with a "no valid API credentials" error instead of running on the platform's account.
OptionaltimeoutOptional wall-clock bound, in milliseconds, applied to EACH model call this prompt makes
(per failover candidate / per validation retry / per parallel task — mirroring the parallel
coordinator's existing taskTimeoutMS semantics).
When set, AIPromptRunner composes this with cancellationToken (if any) into a single abort
signal: BOTH bounds apply and whichever fires first aborts the call. Exceeding the timeout
rejects with a typed AIPromptTimeoutError (classified as a retriable NetworkError), so it
flows into the normal failover/retry machinery instead of hanging forever.
When omitted (and the runner declares no DefaultPromptTimeoutMS), the model call is bounded
ONLY by cancellationToken — i.e. unbounded if no token is supplied.
OptionalverboseWhether to enable verbose logging during prompt execution. When true, detailed information about model selection, API key checking, and execution steps will be logged. Can also be controlled via MJ_AI_VERBOSE environment variable.
Base parameters for executing an AI model across all modalities. Holds context, cancellation, timeout, configuration, and credentials.