CrestApps.Core Copilot Orchestrator - Prompt Templates
Add the Copilot Orchestrator
You are a CrestApps.Core expert. Generate code and configuration for the Copilot orchestrator in CrestApps.Core.
Guidelines
- Use the Copilot orchestrator when the host should run through the GitHub Copilot Extensions SDK.
- Support the configured state explicitly with
NotConfigured,GitHubOAuth, orApiKey. - Use GitHub OAuth for per-user Copilot subscription access.
- Use BYOK mode for a shared OpenAI-compatible endpoint.
- Provide an
ICopilotCredentialStoreimplementation when GitHub OAuth is enabled.
Registration
builder.Services
.AddCoreAIServices()
.AddCoreAIOrchestration()
.AddCoreAICopilotOrchestrator();
Resolve by Name
var orchestrator = resolver.Resolve("copilot");
BYOK Configuration
{
"CopilotOptions": {
"AuthenticationType": "ApiKey",
"ProviderType": "openai",
"BaseUrl": "https://api.openai.com/v1",
"ApiKey": "sk-...",
"DefaultModel": "gpt-4o",
"WireApi": "completions"
}
}
GitHub OAuth Configuration
{
"CopilotOptions": {
"AuthenticationType": "GitHubOAuth",
"ClientId": "Iv1.abc123",
"ClientSecret": "your-client-secret",
"Scopes": ["user:email", "read:org"]
}
}