Skip to content
Proud to collaborate with Microsoft for Startups

ai-provider.enable ​

Enables an AI provider configuration (sets enabled=True). Refuses to enable a config whose cloud connection is missing or soft-deleted (orphaned config). Idempotent: already-enabled configs complete with enabled=False and no DB mutation. Counterpart of ai-provider.disable.

Workflow for enabling an AIProviderConfig.

States: pending (initial, auto_advance="execute") → completed / failed any → failed

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-connection
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—UUID of the organization that owns the config
ai_provider_config_uuiduuidYes—UUID of the AIProviderConfig to enable
actorstringNo—Actor initiating the enable (for audit)

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidNo—Organization UUID echoed from input
ai_provider_config_uuiduuidNo—AI provider config UUID echoed from input
actorstringNo—Actor that initiated the enable
enabledbooleanNo—True if state changed from disabled to enabled; False if already enabled
default_modelstringNo—The config's default model, echoed for confirmation
completed_atstringNo—ISO-8601 timestamp of completion
failure_reasonstringNo—Engine-stamped human-readable failure reason
failed_at_statestringNo—Engine-stamped state name when the workflow failed
failed_stepstringNo—Engine-stamped step name (DAG path; None for atomic workflows)
failed_layerintegerNo—Engine-stamped layer index (DAG path; None for atomic workflows)
errorstringNo—Engine-stamped exception message
error_typestringNo—Engine-stamped exception class name
failure_typestringNo—Failure category
failed_actionstringNo—Action method that raised
failed_atstringNo—ISO-8601 timestamp of failure

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeEnable request received; executing immediately
completedNoYesYes—AI provider config enabled (or was already enabled)
failedNoYesNo—Enable workflow failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

Business Errors ​

CodeMessage Template
AI_PROVIDER_CONFIG_NOT_FOUNDAI provider config {config_uuid} not found in organization
CANNOT_ENABLE_ORPHANED_CONFIGCannot enable AI provider config {config_uuid}: its cloud connection is {connection_state}. Recreate the provider config against a live connection (ai-provider.setup) and delete this row (ai-provider.delete).

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "ai-provider.enable",
  "initial_data": {
    "organization_uuid": "value",
    "ai_provider_config_uuid": "value"
  }
}