| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Demonstrates routing GitHubCopilotAgent requests through a custom OpenAI-compatible endpoint via SessionConfig.Provider instead of the default GitHub Copilot backend.
There was a problem hiding this comment.
Adds a new .NET sample demonstrating GitHub Copilot SDK BYOK (Bring Your Own Key) usage via SessionConfig.Provider, so developers can route agent requests through their own OpenAI-compatible endpoint rather than the default GitHub Copilot backend.
Changes:
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file| File | Description |
|---|---|
| dotnet/samples/02-agents/AgentProviders/README.md | Adds the BYOK sample entry to the AgentProviders index. |
| dotnet/samples/02-agents/AgentProviders/github-copilot/Agent_With_GitHubCopilot_BYOK/README.md | Documents how to run/configure the BYOK Copilot provider sample. |
| dotnet/samples/02-agents/AgentProviders/github-copilot/Agent_With_GitHubCopilot_BYOK/Program.cs | Implements the BYOK session/provider configuration and streaming run loop. |
| dotnet/samples/02-agents/AgentProviders/github-copilot/Agent_With_GitHubCopilot_BYOK/Agent_With_GitHubCopilot_BYOK.csproj | Adds the new sample project referencing Copilot SDK + AF Copilot adapter project. |
| dotnet/eng/verify-samples/AgentsSamples.cs | Registers the new sample for verification with required/optional env vars. |
| dotnet/agent-framework-dotnet.slnx | Includes the new sample project in the solution. |
Sorry, something went wrong.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ith_GitHubCopilot_BYOK/README.md Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
…ith_GitHubCopilot_BYOK/README.md Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
- Make the provider type configurable via BYOK_PROVIDER_TYPE (default "openai") instead of hardcoding "openai", since the sample already documents Azure/Anthropic support. - Stop calling the endpoint "OpenAI-compatible" everywhere; Anthropic isn't OpenAI-wire- compatible, so reword to "your own endpoint" and list the actual supported providers. - Move the "About BYOK" explainer to the top of the README so the term is introduced before it's used, and finish applying the WireApi/ModelId comment suggestions. - Reword the AgentProviders/README.md entry to match (not OpenAI-specific).
|
Thanks for the review, Roger Barreto (@rogerbarreto)! All the feedback is addressed:
Mirrored the same fixes into the Python sample (#7336) for consistency. Please take another look when you get a chance. Thanks! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Motivation & Context
GitHub Copilot supports BYOK (Bring Your Own Key — https://docs.github.com/en/copilot/how-tos/copilot-sdk/auth/byok), letting requests be routed through a custom OpenAI/Azure/Anthropic-compatible endpoint instead of the default GitHub Copilot backend. SessionConfig.Provider is already passed straight through by GitHubCopilotAgent (see CopyResumeSessionConfig), but there was no sample demonstrating the scenario end-to-end.
Description & Review Guide
Related Issue
Fixes #
Contribution Checklist