data.ai-provider.get-default ​
Resolve the org's default enabled AIProviderConfig (is_default=True, enabled=True)
Resolve the org's single default AIProviderConfig (is_default=True, enabled=True).
Read-only — no DB mutations. Uses context.metadata["organization"] for the internal organization_id lookup; the public input is organization_uuid only.
Output shapes:
- Default found: no_default_set=False + ai_provider_config_uuid, connection_uuid, default_model, model_config, rate_limit_rpm, rate_limit_tpm
- No default: no_default_set=True (all other fields absent)
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-connection |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | UUID of the organization whose default AI provider is being resolved |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
no_default_set | boolean | Yes | — | True when the org has no default+enabled AI provider config |
ai_provider_config_uuid | uuid | No | — | UUID of the default AIProviderConfig row (present only when no_default_set=False) |
connection_uuid | uuid | No | — | UUID of the linked CloudConnection (present only when no_default_set=False) |
default_model | string | No | — | Default model ID (e.g. 'gpt-4o-mini') configured for this provider |
model_config | dict | No | — | Model configuration dict: temperature, max_tokens, etc. |
rate_limit_rpm | integer | No | — | Requests per minute rate limit; None means unlimited |
rate_limit_tpm | integer | No | — | Tokens per minute rate limit; None means unlimited |
failure_reason | string | No | — | Engine-stamped: human-readable failure reason |
failure_type | string | No | — | Engine-stamped: failure category |
failed_action | string | No | — | Engine-stamped: action method that raised |
failed_at_state | string | No | — | Engine-stamped: state name when the failure occurred |
failed_step | string | No | — | Engine-stamped: name of the step that failed (DAG workflows) |
failed_layer | integer | No | — | Engine-stamped: layer index that failed (DAG workflows) |
error | string | No | — | Engine-stamped: error message on the failure envelope |
error_type | string | No | — | Engine-stamped: exception class name on the failure envelope |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | complete | Resolve default AI provider config |
completed | No | Yes | Yes | — | Default AI provider resolved |
failed | No | Yes | No | — | Resolution failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | complete | completed | — |
pending | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "data.ai-provider.get-default",
"initial_data": {
"organization_uuid": "value"
}
}