Ai Provider ​
| Workflow | Type | Description |
|---|---|---|
| ai-provider.delete | Atomic | 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. |
| ai-provider.disable | Atomic | 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. |
| ai-provider.enable | Atomic | 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. |
| ai-provider.set-default | Atomic | Atomically promotes one AIProviderConfig to be the organization's default AI provider, demoting any previously-default config in the same transaction |
| ai-provider.setup | Atomic | Attach a CloudConnection to an organisation as an AI provider configuration, validating AI-capability and persisting via data.ai-provider.persist |
