crestapps/crestapps.agentskills/crestapps-core-openai
Claude Code and agent skill by crestapps/crestapps.agentskills
- community
Checking that the SKILL.md file is still in the repository.
Skill for using OpenAI and OpenAI-compatible endpoints in CrestApps.Core 2.0. Covers AddOpenAI and AddCoreAIOpenAI registration, connections under CrestApps AI Connections with ApiKey, Endpoint and the ChatApi setting (Auto, ChatCompletions, Responses) that sends reasoning requests with tools to the Responses API, configured deployments that declare model capabilities through Features and Parameters instead of the removed Purpose or Type, connection-declared deployment names, deployment slots r…
Install
npx vskill@latest install crestapps/crestapps.agentskills/crestapps-core-openaiSKILL.md
The same SKILL.md was published earlier as crestapps/crestapps.agentskills/crestapps-core-openai.
CrestApps.Core OpenAI
The CrestApps.Core.AI.OpenAI package connects CrestApps.Core to api.openai.com and to any server that speaks the OpenAI API. The connection holds credentials and the endpoint; each deployment names a model and declares what that model can do.
Guidelines
- Register only the providers the host uses. OpenAI is the simplest first provider because it needs only an API key.
- Put the API key, endpoint and
ChatApion the connection. Put the model name and its capabilities on the deployment. - Every configured deployment must declare its model capabilities (
Features). A deployment entry with no features and no legacyPurpose/Typeis skipped at startup with the warning "declares no model capabilities". - Pick deployments through slots (
AIDeploymentSlotNames) andIAIDeploymentManager.ResolveSlotAsync(...). Never hard-code a provider client in business code. - Use
crestapps-core-ai-runtimefor the provider-agnostic runtime,crestapps-core-chatfor completion loops, andcrestapps-core-realtime-voicefor voice sessions.
Registration
AddAISuite(...) already calls AddCoreServices(), AddCoreAIServices() and AddCoreAIOrchestration(). Without the builder, register them yourself:
AddCoreAIOpenAI() registers:
| Service | Implementation | |
|---|---|---|
IAIClientProvider | OpenAIClientProvider (chat, embeddings, images, speech-to-text, text-to-speech, realtime) | |
IAICompletionClient for "OpenAI" | ProviderAICompletionClient<OpenAIClientMarker> | |
IAIProviderConnectionHandler | OpenAIConnectionHandler (unprotects a stored OpenAIConnectionMetadata.ApiKey) | |
| Connection source and deployment provider | Client name OpenAIConstants.ClientName ("OpenAI") |
Connection and Deployments
Connections are read from CrestApps:AI:Connections (or CrestApps:AI:Providers:OpenAI:Connections) and deployments from CrestApps:AI:Deployments. A configured deployment is read-only in the admin UI.
Nameis the lookup name;ModelNameis the model sent to OpenAI and falls back toName.FeaturesandParameterson the entry are shorthand forProperties:AIDeploymentMetadata:FeaturesandProperties:AIDeploymentMetadata:Parameters. Both forms merge, and the shorthand keeps environment variable names short enough for Azure App Service (CrestApps__AI__Deployments__0__Features__0=textGeneration).textGenerationis opt-out only for a deployment with no metadata at all. OnceFeaturesis declared, listtextGenerationfor every text model. A speech-to-speech-only model declaresrealtimeand omitstextGeneration.- Declare
toolCallingandstreamingon chat models. WithouttoolCallingevery tool is stripped from the request; withoutstreaminga streaming call is completed as one response. - Feature names are the
AIDeploymentFeatureNamesconstants:textGeneration,toolCalling,structuredOutputs,streaming,reasoning,imageInput,imageOutput,audioInput,audioOutput,videoInput,videoOutput,realtime,textEmbedding,speechToText,textToSpeech.
Deployments declared on the connection
A connection can name its models directly instead. Each name becomes a read-only deployment with fixed capabilities:
| Connection key | Capabilities declared | |
|---|---|---|
ChatDeploymentName (or DeploymentName) | textGeneration, toolCalling, streaming | |
UtilityDeploymentName | textGeneration, streaming | |
EmbeddingDeploymentName | textEmbedding | |
ImagesDeploymentName | imageOutput | |
SpeechToTextDeploymentName | speechToText | |
TextToSpeechDeploymentName | textToSpeech |
Use the explicit Deployments list when a model needs reasoning, imageInput, realtime, or parameters.
Slots and Site Defaults
A slot is what the installation uses a deployment for. The built-in slots are chat, utility, embedding, image, vision, speechToText, textToSpeech and realtime. Fill a slot default through DefaultAIDeploymentSettings, then resolve it:
Resolution order is the explicit name, the slot's site default, the fallback slot (only utility falls back to chat), and finally the first deployment that declares the slot's capability. GetAllBySlotAsync(slotName) lists every candidate, which is what settings pickers use. ResolveSlotOrThrowAsync(...) throws instead of returning null.
Chat API and Reasoning Models
Reasoning models such as gpt-6-luna reject function tools combined with a reasoning effort on /v1/chat/completions. The connection's ChatApi setting (OpenAIChatApis) decides where such a request goes:
ChatApi | Behavior | |
|---|---|---|
Auto (default) | On OpenAI's own endpoint (no Endpoint, api.openai.com, or a regional host such as eu.api.openai.com), a request with function tools and a reasoning effort other than None goes to the Responses API. Any other endpoint uses Chat Completions only. | |
ChatCompletions | Every request uses Chat Completions. | |
Responses | Tools plus reasoning go to /v1/responses on any endpoint. Use it for compatible servers such as OpenRouter or xAI. |
Values are case-insensitive; an unknown value logs a warning and acts as Auto. Responses requests are sent with store: false. A reasoning effort reaches the provider only when the deployment declares reasoning and the reasoningEffort parameter; without the parameter no effort is sent and Chat Completions rejects the tools. A host configured only from environment variables can set Parameters:reasoningEffort:DefaultValue=None for models that refuse tools unless the effort is none.
Speech and Realtime
- Text-to-speech (
IAIClientFactory.CreateTextToSpeechClientAsync) streams forgpt-4o-mini-tts;tts-1andtts-1-hdanswer in one piece.ISpeechVoiceResolverreturnsOpenAITextToSpeechVoices.For(model): thirteen voices forgpt-4o-mini-tts, nine fortts-1/tts-1-hd. - OpenAI produces raw PCM only at 24 kHz. Ask for
pcmorPcm<rate>;Pcm24000passes through and any other rate (Pcm8000,Pcm16000) is requested at 24 kHz and resampled while streaming, so OpenAI can be the speaking leg of a cascaded realtime deployment at any output rate. TextToSpeechOptions.Speedis clamped to 0.25 to 4. A speaking style passed as theTextToSpeechOptionsProperties.Instructionsadditional property is sent asinstructions, except totts-1andtts-1-hd.- The 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. Seecrestapps-core-speech-voices. - Realtime uses
OpenAIRealtimeClientfromMicrosoft.Extensions.AI.OpenAI. Declare therealtimefeature so the deployment fills therealtimeslot. Voices come fromIRealtimeVoiceResolverand areOpenAIRealtimeVoices.All(alloy,ash,ballad,cedar,coral,echo,marin,sage,shimmer,verse). With no voice chosen the provider's own default voice is used. - Realtime sessions transcribe the user with a speech-to-text deployment on the same provider (for example
gpt-4o-transcribe); add one or the user's turns are not transcribed. Seecrestapps-core-realtime-voice.
OpenAI-Compatible Servers
Set Endpoint to the server's base URL (for example Groq, Mistral, Together AI, Fireworks, DeepSeek, OpenRouter, vLLM, LocalAI). Declare only the features the hosted model really has; many servers lack tool calling, structured outputs, or /v1/responses. For Anthropic's native API prefer crestapps-core-claude-orchestrator.
Troubleshooting
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/CrestApps.AgentSkills/crestapps-core/crestapps-core-openai/SKILL.md
Popularity
- Repository stars
- 13
- Repository forks
- 4
- 7-day trend score
- 5
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/crestapps/crestapps.agentskills/crestapps-core-openai)