Wires Azure OpenAI and Azure AI Speech into CrestApps.Core 2.0. Covers registration, authentication (ApiKey, ManagedIdentity, DefaultAzureCredential), deployment configuration, speech-to-text/text-to-speech, realtime WebSocket, and troubleshooting common errors.
Ships in crestapps-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The CrestApps.Core.AI.OpenAI.Azure package connects CrestApps.Core to Azure OpenAI (client name "Azure") and to Azure AI Speech (client name "AzureSpeech"). Use it for enterprise workloads that need regional data residency, managed identity, or private networking.
AuthenticationType on an Azure connection. When it is empty the provider uses DefaultAzureCredential, even if an ApiKey is present.Features. An entry with no features and no legacy Purpose/Type is skipped with the warning "declares no model capabilities".IAIDeploymentManager.ResolveSlotAsync(AIDeploymentSlotNames.X, ...).crestapps-core-openai for the shared ChatApi, feature, and slot details, and crestapps-core-realtime-voice for voice sessions.using CrestApps.Core.AI.OpenAI.Azure;
builder.Services.AddCrestAppsCore(crestApps => crestApps
.AddAISuite(ai => ai
.AddAzureOpenAI()
)
);
Without the suite builder, register the core and orchestration services too; AddCoreAIAzureOpenAI() alone adds only the provider:
builder.Services
.AddCoreAIServices()
.AddCoreAIOrchestration()
.AddCoreAIAzureOpenAI();
AddCoreAIAzureOpenAI() registers AzureOpenAIClientProvider (chat, embeddings, images, speech-to-text, realtime), AzureSpeechClientProvider (Azure AI Speech speech-to-text and text-to-speech), AzureOpenAIConnectionHandler, the AzureOpenAICompletionClient completion client for "Azure", AzureClientOptions bound from CrestApps:AI:AzureClient, and two deployment providers: "Azure" and the contained-connection "AzureSpeech".
{
"CrestApps": {
"AI": {
"Connections": [
{
"Name": "azure-production",
"ClientName": "Azure",
"Endpoint": "https://my-resource.openai.azure.com/",
"AuthenticationType": "ApiKey",
"ApiKey": "your-api-key"
},
{
"Name": "azure-managed",
"ClientName": "Azure",
"Endpoint": "https://my-resource.openai.azure.com/",
"AuthenticationType": "ManagedIdentity",
"IdentityId": "user-assigned-client-id"
}
]
}
}
}
AuthenticationType | Credential used |
|---|---|
Default or empty | DefaultAzureCredential (environment, workload identity, managed identity, Azure CLI, Visual Studio) |
ApiKey | ApiKeyCredential(ApiKey) |
ManagedIdentity | ManagedIdentityCredential, system-assigned when IdentityId is empty, otherwise the user-assigned client ID |
For managed identity, grant the hosting identity the Cognitive Services OpenAI User role on the resource. "AzureOpenAI" is accepted as an alias of the "Azure" client name.
CrestApps:AI:AzureClient binds AzureClientOptions for every Azure OpenAI connection:
{
"CrestApps": {
"AI": {
"AzureClient": {
"EnableDefaultRetryPolicy": true,
"MaxRetryAttempts": 5,
"RateLimitRetryDelay": "00:00:01",
"BackoffType": "Exponential",
"UseJitter": true,
"MaxRetryDelay": "00:00:32",
"NetworkTimeout": null,
"EnableLogging": false,
"EnableMessageLogging": false,
"EnableMessageContentLogging": false
}
}
}
}
retry-after-ms, then x-ms-retry-after-ms, then Retry-After (seconds or an HTTP date), never longer than MaxRetryDelay; without one it uses the backoff.NetworkTimeout limits each try of a request; null keeps the SDK default of 100 seconds. A host that answers people can set a shorter value.UseDefaultResilience() (see crestapps-core-resilience), so under throttling one call can make up to (MaxRetryAttempts + 1) x (MaxRateLimitRetries + 1) requests. Keep MaxRetryAttempts low (1 or 2) in a host that answers people.HttpClient AzureOpenAIConstants.HttpClientName ("CrestApps.AzureOpenAI"). Configure a client of that name after registering the provider (for example AddHttpClient(name).ConfigurePrimaryHttpMessageHandler(...) with a ConnectCallback that checks each connection's address, AllowAutoRedirect = false, UseCookies = false and a PooledConnectionLifetime) to choose the transport; see crestapps-core-ai-runtime. SDK clients are cached per container in AIProviderClientCache, keyed with a hash of the API key.{
"CrestApps": {
"AI": {
"Deployments": [
{
"ClientName": "Azure",
"ConnectionName": "azure-production",
"Name": "gpt-4o",
"ModelName": "my-gpt-4o-deployment",
"Features": [ "textGeneration", "toolCalling", "streaming", "imageInput" ]
},
{
"ClientName": "Azure",
"ConnectionName": "azure-production",
"Name": "gpt-5-reasoning",
"ModelName": "gpt-5",
"Features": [ "textGeneration", "toolCalling", "streaming", "reasoning" ],
"Parameters": {
"reasoningEffort": { "DefaultValue": "None" }
}
},
{
"ClientName": "Azure",
"ConnectionName": "azure-production",
"Name": "text-embedding-3-large",
"Features": [ "textEmbedding" ]
},
{
"ClientName": "Azure",
"ConnectionName": "azure-production",
"Name": "gpt-4o-transcribe",
"Features": [ "speechToText" ]
},
{
"ClientName": "Azure",
"ConnectionName": "azure-production",
"Name": "gpt-realtime",
"Features": [ "realtime" ]
},
{
"ClientName": "AzureSpeech",
"Name": "azure-tts",
"Endpoint": "https://eastus.tts.speech.microsoft.com",
"AuthenticationType": "ApiKey",
"ApiKey": "your-speech-key",
"Features": [ "textToSpeech" ]
},
{
"ClientName": "AzureSpeech",
"Name": "azure-stt",
"Endpoint": "https://eastus.stt.speech.microsoft.com",
"AuthenticationType": "ApiKey",
"ApiKey": "your-speech-key",
"Features": [ "speechToText" ]
}
]
}
}
}
ModelName is the Azure deployment name used in the request URL; it does not have to match the model. It falls back to Name.AzureSpeech deployments carry their own connection: top-level Endpoint, AuthenticationType, ApiKey and IdentityId become deployment properties, so no ConnectionName is needed.toolCalling and streaming on chat deployments; undeclared features are enforced away (tools stripped, streaming completed as one response).ChatDeploymentName, UtilityDeploymentName, EmbeddingDeploymentName, ImagesDeploymentName, SpeechToTextDeploymentName or TextToSpeechDeploymentName; each becomes a read-only deployment with fixed capabilities (chat gets textGeneration, toolCalling and streaming).Fill slot defaults with DefaultAIDeploymentSettings (DefaultChatDeploymentName, DefaultUtilityDeploymentName, DefaultEmbeddingDeploymentName, DefaultImageDeploymentName, DefaultVisionDeploymentName, DefaultSpeechToTextDeploymentName, DefaultTextToSpeechDeploymentName, DefaultRealtimeDeploymentName) and resolve them:
using CrestApps.Core.AI.Clients;
using CrestApps.Core.AI.Deployments;
using CrestApps.Core.AI.Models;
using Microsoft.Extensions.AI;
namespace MyApp.Services;
#pragma warning disable MEAI001 // Microsoft.Extensions.AI speech APIs are evaluation-only.
public sealed class SpeechSynthesisService
{
private readonly IAIDeploymentManager _deploymentManager;
private readonly IAIClientFactory _clientFactory;
public SpeechSynthesisService(IAIDeploymentManager deploymentManager, IAIClientFactory clientFactory)
{
_deploymentManager = deploymentManager;
_clientFactory = clientFactory;
}
public async Task<TextToSpeechResponse> SpeakAsync(string text, string voice, CancellationToken cancellationToken = default)
{
var deployment = await _deploymentManager.ResolveSlotOrThrowAsync(AIDeploymentSlotNames.TextToSpeech);
var client = await _clientFactory.CreateTextToSpeechClientAsync(deployment);
return await client.GetAudioAsync(
text,
new TextToSpeechOptions
{
VoiceId = voice,
AudioFormat = "Pcm24000",
Speed = 1.1f,
},
cancellationToken);
}
}
#pragma warning restore MEAI001
AzureSpeechServiceTextToSpeechClient honors TextToSpeechOptions.AudioFormat and reports the matching media type. Names are case-insensitive: Pcm8000, Pcm16000, Pcm24000, Pcm48000 (raw PCM, audio/L16), Riff8000 through Riff48000 (WAV), Mp3, Mp3_16000, Mp3_24000, Mp3_48000, or a Speech SDK format name. MP3 at 16 kHz is the default. Raw PCM is what lets Azure Speech be the speaking leg of a cascaded realtime deployment. TextToSpeechOptions.Speed is applied as SSML prosody rate within 0.5 to 2 when a voice is named. Azure Speech has no realtime client, so it cannot be a cascade's speech-to-text leg.
The AzureSpeech text-to-speech client is wrapped in SpeechMarkupTextToSpeechClient, so neutral speech markup (<break time="500ms"/>, <spell>AB12</spell>) is rendered as plain punctuation and spaced letters instead of being read aloud (see crestapps-core-speech-voices). The "Azure" (Azure OpenAI) provider has no text-to-speech client; use AzureSpeech, OpenAI, ElevenLabs or Cartesia for the speaking leg.
None goes to /openai/v1/responses (with store: false); every other request stays on Chat Completions. Set the connection's ChatApi to ChatCompletions to turn this off, for example in a region without the Responses API. The routing uses a temporary built-in client (CrestApps.Core.AI.OpenAI.Azure.Responses) because the pinned Azure.AI.OpenAI SDK throws MissingMethodException on its own Responses client.reasoning and reasoningEffort. None is sent as "none"; ExtraHigh is clamped to High with a log entry.FunctionCallContent and FunctionResultContent, pause for approval-required tools in AG-UI runs (also CompleteAsync without streaming, which a streaming request falls back to when the deployment does not declare streaming), resume approved calls, offer AG-UI client tool declarations, and send replayed tool calls and results back to the service (see crestapps-core-ag-ui).AIToolInvocation.CallIdContextKey in AIFunctionArguments.Context and ends the turn when AIToolLoop.ShouldEndTurn says so (a tool asked, or an agent paused for an approval)./openai/v1/realtime through a temporary WebSocket transport (CrestApps.Core.AI.OpenAI.Azure.Realtime) that supports API keys and Microsoft Entra ID. Voices are OpenAIRealtimeVoices.All. Add a speech-to-text deployment (for example gpt-4o-transcribe) on the same Azure provider so the user's realtime turns are transcribed.CredentialUnavailableException or 401 with an API key configured: AuthenticationType is missing, so DefaultAzureCredential was used. Set "AuthenticationType": "ApiKey".DeploymentNotFound: the ModelName does not exist on the resource the connection points at. Failed completions log the deployment name, model name, connection name, and endpoint host.unsupported_value for reasoning effort: declare the allowed reasoningEffort values the model accepts and pick a valid default.CrestApps:AI:Connections and CrestApps:AI:Providers:Azure:Connections): the first wins and the second is logged as a warning.MaxRetryAttempts or set NetworkTimeout.AzureOpenAIClientProvider and AzureOpenAICompletionClient take an IHttpClientFactory and an AIProviderClientCache; classes resolved from the container need no change.CompleteAsync without streaming now pauses on approval-required tools instead of running them."Type": "Chat" / "Purpose": "Chat" with Features. Legacy Purpose, Capability and Type values still load, but the projection is narrow: Chat or Utility becomes textGeneration only (not when realtime is declared), and Embedding, Image, Vision, SpeechToText and TextToSpeech become textEmbedding, imageOutput, imageInput, speechToText and textToSpeech. A 1.x chat entry therefore loses tool calling and streaming until toolCalling and streaming are declared.ResolveOrDefaultAsync(AIDeploymentPurpose.X, ...) with ResolveSlotAsync(AIDeploymentSlotNames.X, ...) and GetByPurposeAsync/GetAllByPurposeAsync with GetAllBySlotAsync.AzureOpenAICompletionClient now takes an IAIClientFactory constructor argument; code that constructs it directly must pass one.realtime; ChatMode.Realtime and AIProfile.RealtimeDeploymentName are removed.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/crestapps-core:crestapps-core-azure-openaifrom crestapps-core
npx claudepluginhub crestapps/crestapps.agentskills --plugin crestapps-core51 skills in this plugin
/crestapps-core-a2aSkill for Agent-to-Agent (A2A) protocol support in CrestApps.Core on the A2A 1.0 SDK. Covers AddA2AClient and AddCoreAIA2AClient with Entity Framework Core or YesSql connection stores, A2AConnection and A2AConnectionMetadata authentication, AIProfileA2AMetadata, the agent card cache and A2AToolRegistryProvider, the listAvailableAgents, findAgentForTask and findToolsForTask tools, building an A2A host with IAgentHandler, A2AServer, ITaskStore and MapA2A, A2A 1.0 agent cards with supportedInterfaces published at /.well-known/agent-card.json, A2AHostOptions authentication and ExposeAgentsAsSkill, system agents exposed through the host, and upgrading from the 0.3 SDK./crestapps-core-ag-uiSkill for running the CrestApps.Core 2.0 AI chat as an AG-UI agent. Covers the CrestApps.Core.AI.AGUI package (AGUIRunEventWriter, AGUIRunRequest, AGUIJson), AIChatHubCore.RunAgent over SignalR and MapAGUIChat with Server-Sent Events, the RunAgentInput members and streamed events, tool approvals with RequireApproval or an approval tool kind, ApprovalRequiredAIFunction, interrupts and resume, approvals inside agents, page context with crestAppsAGUI.registerContextProvider, shared state with registerStateProvider and update_shared_state, frontend tools, stored tool calls (ChatTurnToolActivity), runs that continue on the next page, AGUIChatOptions.DisconnectedRunTimeout, the protocol and sendPageContext chat options, and the AICompletionContextKeys and ChatResponseHandlerContext members. Use it when showing tool calls in the chat, asking a person before a tool runs, sharing page state with the agent, connecting CopilotKit or another AG-UI client, or troubleshooting approvals and continued runs.Other plugins' skills for the same job