Skip to content

feat(providers): support GitHub Enterprise Copilot auth#1509

Merged
Aaronontheweb merged 1 commit into
netclaw-dev:devfrom
Aaronontheweb:feature/minimal-ghe-copilot-support
Jun 26, 2026
Merged

feat(providers): support GitHub Enterprise Copilot auth#1509
Aaronontheweb merged 1 commit into
netclaw-dev:devfrom
Aaronontheweb:feature/minimal-ghe-copilot-support

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Summary

  • add minimal GitHub Copilot auth host resolution for GitHub Enterprise via provider VendorOptions
  • route device OAuth, OAuth refresh, and Copilot token exchange through persisted GitHubHost/GitHubApiBase values
  • keep Copilot chat/model traffic on ProviderEntry.Endpoint and keep public GitHub Copilot configs on public endpoints unless explicitly configured
  • update config/spec/provider operations docs and add regression coverage

Refs #1456
Supersedes/replaces the approach from #1491 with a smaller config surface.

Tests

  • dotnet restore Netclaw.slnx
  • dotnet build Netclaw.slnx --no-restore
  • dotnet test src/Netclaw.Daemon.Tests/Netclaw.Daemon.Tests.csproj --no-build
  • dotnet test src/Netclaw.Cli.Tests/Netclaw.Cli.Tests.csproj --no-build
  • dotnet test src/Netclaw.Configuration.Tests/Netclaw.Configuration.Tests.csproj --no-build
  • pwsh ./scripts/Add-FileHeaders.ps1 -Verify
  • dotnet slopwatch analyze (existing SW004 timing warnings only)
  • openspec validate netclaw-model-providers --type spec

Resolve GitHub OAuth and Copilot token exchange endpoints from persisted provider vendor options while keeping public GitHub Copilot entries on public endpoints by default.

Refs netclaw-dev#1456

Co-authored-by: Proxicon <[email protected]>
@Aaronontheweb Aaronontheweb added the providers Provider integrations and capability detection across OpenAI-compatible backends. label Jun 26, 2026
@Aaronontheweb

Copy link
Copy Markdown
Collaborator Author

Website documentation follow-up: netclaw-dev/netclaw-website#76

@Aaronontheweb Aaronontheweb left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - need to do the TUI follow-up in a new PR

TimeProvider? timeProvider = null,
ProviderOAuthTokenRefreshService? tokenRefreshService = null)
{
private static readonly Uri TokenEndpoint =

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

making this configurable was the bulk of this change.

public sealed class GitHubCopilotAuthResolverTests
{
[Fact]
public void Resolve_DefaultEntry_IgnoresAmbientGitHubHostEnvironment()

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

continue;
}

if (args[i] is "--github-host" && i + 1 < args.Length)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new CLI options for adding github enterprise auth via a single-shot command rather than the TUI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

providers Provider integrations and capability detection across OpenAI-compatible backends.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant