Skip to content
Proud to collaborate with Microsoft for Startups

ai-provider.delete ​

Permanently deletes an AI provider configuration. Refuses to delete an enabled config — disable it first (the DB guarantees the org default is always enabled, so the default is transitively protected). Built for cleaning up configs orphaned by connection soft-delete.

Workflow for permanently deleting 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 delete permanently
actorstringNo—Actor initiating the delete (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 delete
deletedbooleanNo—True when the row was deleted in this run
default_modelstringNo—The deleted config's default model, echoed for the audit trail
was_orphanedbooleanNo—True when the config's cloud connection was missing or soft-deleted
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—executeDelete request received; executing immediately
completedNoYesYes—AI provider config deleted
failedNoYesNo—Delete 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_DELETE_ENABLED_CONFIGCannot delete AI provider config {config_uuid}: it is enabled. Disable it first (ai-provider.disable).

API Usage ​

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

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