Skip to content
Proud to collaborate with Microsoft for Startups

ai-provider.disable ​

Disables an AI provider configuration (sets enabled=False). Refuses to disable the last enabled default — caller must promote another config first. Idempotent: already-disabled configs complete with disabled=False and no DB mutation.

Workflow for disabling 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 disable
actorstringNo—Actor initiating the disable (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 disable
was_defaultbooleanNo—True if this config was the org default before disable
disabledbooleanNo—True if state changed from enabled to disabled; False if already disabled
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—executeDisable request received; executing immediately
completedNoYesYes—AI provider config disabled (or was already disabled)
failedNoYesNo—Disable 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_DISABLE_LAST_DEFAULTCannot disable AI provider config {config_uuid}: it is the only enabled default for this organization. Promote another config first.

API Usage ​

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

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