Orchardcore ai connections

From CrestApps/CrestApps.AgentSkills · View interactive version

Orchardcore ai connections is an AI agent skill from the GitHub repository CrestApps/CrestApps.AgentSkills. Skill for managing AI provider connections in Orchard Core with the CrestApps.OrchardCore.AI.ConnectionManagement feature in CrestApps.OrchardCore 3.0. Covers the Provider Connections admin list and editor, the ManageProviderConnections permission, provider-specific connection metadata (OpenAIConnec

How to use this skill

Skill file

Orchard Core AI Connection Management

A connection stores the endpoint and credentials for one provider account. Deployments name a connection

through ConnectionName; profiles name deployments. This skill covers the connection layer only; for

deployments and capabilities see orchardcore-ai and orchardcore-ai-model-capabilities.

Guidelines

Connections** screen, the provider connection editors and the AIProviderConnections recipe step. The

step is registered only while this feature is enabled.

CrestApps.OrchardCore.AzureAIInference, CrestApps.OrchardCore.Ollama) in the web/startup project and

enable its feature.

Data protection keys must be shared across nodes and preserved across deployments, or stored keys cannot

be decrypted.

Features and providers

| Provider | Feature ID | Source / ClientName | Metadata object in Properties | Authentication |

| --- | --- | --- | --- | --- |

| OpenAI and OpenAI-compatible | CrestApps.OrchardCore.OpenAI | OpenAI | OpenAIConnectionMetadata (Endpoint, ApiKey) | API key |

| Azure OpenAI | CrestApps.OrchardCore.OpenAI.Azure | Azure | AzureConnectionMetadata (Endpoint, AuthenticationType, ApiKey, IdentityId) | Default, ManagedIdentity, ApiKey |

| Azure AI Inference (GitHub Models) | CrestApps.OrchardCore.AzureAIInference | AzureAIInference | AzureAIInferenceConnectionMetadata (same keys as Azure) | Default, ManagedIdentity, ApiKey |

| Ollama | CrestApps.OrchardCore.Ollama | Ollama | none; a plain Endpoint key | none |

| Custom LLM (WebSocket) | CrestApps.OrchardCore.AI.CustomLlm | CustomLlm | none; plain Endpoint (wss://, or https:// used as wss://) and optional ApiKey keys read through GetEndpoint() / GetApiKey() | optional API key, sent as a bearer token |

ElevenLabs, Cartesia and Azure AI Speech deployments carry their own connection (API key and endpoint on the

deployment) and need no provider connection; see orchardcore-ai-providers.

{
  "steps": [
    {
      "name": "Feature",
      "enable": [
        "CrestApps.OrchardCore.AI.ConnectionManagement",
        "CrestApps.OrchardCore.OpenAI"
      ],
      "disable": []
    }
  ]
}

Admin UI

Artificial Intelligence > Provider Connections (/Admin/ai/provider/connections) lists stored

connections in Orchard Core's AdminList (list name AIProviderConnections) with search, bulk Delete

and the List or Grid layout. Configuration-backed connections appear below in a read-only list

(AIProviderConnectionsReadOnly) without select, edit or delete. Add Connection asks for the provider

first, then shows that provider's editor. To add a column or row action, use IAdminListColumnsProvider or

a SummaryAdminGrid placement (see orchardcore-admin-lists).

A missing API key on an OpenAI connection is reported under API key (it used to show under Endpoint).

Each deployment that uses the connection can carry its prices on its Pricing card, for estimated costs in

the usage report (see orchardcore-ai-usage-analytics). Editor buttons sit in Orchard Core's sticky bottom

action bar.

Connections by recipe

The step matches an existing connection by ItemId, or by Name plus Source, and creates it otherwise.

{
  "steps": [
    {
      "name": "AIProviderConnections",
      "Connections": [
        {
          "Source": "OpenAI",
          "Name": "openai-cloud",
          "DisplayText": "OpenAI",
          "Properties": {
            "OpenAIConnectionMetadata": {
              "Endpoint": "https://api.openai.com/v1",
              "ApiKey": "{{OpenAIApiKey}}"
            }
          }
        },
        {
          "Source": "Azure",
          "Name": "azure-openai",
          "DisplayText": "Azure OpenAI (managed identity)",
          "Properties": {
            "AzureConnectionMetadata": {
              "Endpoint": "https://my-resource.openai.azure.com/",
              "AuthenticationType": "ManagedIdentity",
              "IdentityId": "optional-user-assigned-client-id"
            }
          }
        },
        {
          "Source": "AzureAIInference",
          "Name": "github-models",
          "DisplayText": "GitHub Models",
          "Properties": {
            "AzureAIInferenceConnectionMetadata": {
              "Endpoint": "https://models.inference.ai.azure.com",
              "AuthenticationType": "ApiKey",
              "ApiKey": "{{GitHubToken}}"
            }
          }
        },
        {
          "Source": "Ollama",
          "Name": "local-ollama",
          "DisplayText": "Local Ollama",
          "Properties": {
            "Endpoint": "http://localhost:11434"
          }
        }
      ]
    }
  ]
}

system-assigned identity; Default uses the Azure default credential chain.

with that service's Endpoint.

Connections in appsettings.json

{
  "OrchardCore": {
    "CrestApps": {
      "AI": {
        "Connections": [
          {
            "Name": "azure-openai",
            "ClientName": "Azure",
            "Endpoint": "https://my-resource.openai.azure.com/",
            "AuthenticationType": "ApiKey",
            "ApiKey": "<from a secret store>"
          },
          {
            "Name": "local-ollama",
            "ClientName": "Ollama",
            "Endpoint": "http://localhost:11434"
          }
        ]
      }
    }
  }
}

Configuration connections use flat keys and ClientName. Entries are addressed by index, so

OrchardCore__CrestApps__AI__Connections__0__ApiKey replaces the key of the first entry; use a high index

(for example __90__) to add a connection beside existing ones. The older CrestApps_AI:Providers shape is

still read. Both stored and configured connections appear in deployment editors.

Export connections

The AI Provider Connections deployment step (AIProviderConnectionDeploymentStep) exports all

connections (IncludeAll) or selected ones (ConnectionIds) as an AIProviderConnections recipe step.

API keys are written as empty strings, so re-enter them after import through the admin, a follow-up

recipe, or configuration.

Troubleshooting

| Symptom | Check |

| --- | --- |

| Recipe step AIProviderConnections is unknown | Enable CrestApps.OrchardCore.AI.ConnectionManagement before the step runs |

| Provider missing from Add Connection | Enable the provider feature |

| Stored key fails after redeploy or on another node | Data protection keys were not shared or persisted |

| A configuration connection cannot be edited | It is read-only by design; change configuration instead |

| A deployment cannot find its connection | ConnectionName must match the connection Name exactly |

Related skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.