Support GitHub Copilot accounts on GitHub Enterprise Cloud data-residency hosts

Aperta
#9,169 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Start by reading src/oauth/github-copilot.ts, especially the device authorization, token exchange, user lookup, and validateCopilotApiBaseUrl() and resolveCopilotApiBaseUrl() paths named in the issue. Then trace where provider credentials and cached account or model data are stored. Done means a configured enterprise tenant uses tenant-specific authentication and inference endpoints, validates endpoint ownership, avoids public endpoint fallback on routing failure, and preserves the standard GitHub.com flow.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

account-pool enhancement
What are you trying to accomplish?

Use the GitHub Copilot provider with an enterprise-managed account hosted on a GitHub Enterprise Cloud data-residency tenant, such as octocorp.ghe.com, and select its permitted models in Codex.

What prevents this today?

The current github-copilot OAuth implementation appears to assume GitHub.com:

  • Device authorization, token exchange, and user lookup use hard-coded github.com or api.github.com URLs.
  • validateCopilotApiBaseUrl() accepts githubcopilot.com hosts, but rejects a tenant-specific inference host such as copilot-api.octocorp.ghe.com.
  • When an inference host is rejected, resolveCopilotApiBaseUrl() falls back to the public Copilot endpoint.

This assessment is based on the current development-branch source; I have not tested OpenCodex itself against the enterprise account.

What should OpenCodex do?

Allow a user to configure their GitHub Enterprise Cloud data-residency hostname for the Copilot provider, and use the appropriate tenant-specific authentication, account and inference endpoints.

For enterprise accounts, please validate that returned inference endpoints belong to the configured tenant and avoid silently falling back to the public endpoint when tenant routing fails. Keep credentials and cached account or model data associated with the selected host.

Additional context

The account’s tenant-specific Copilot endpoint has been tested independently with model discovery and streaming and non-streaming tool calls. A related implementation for another router is available in duolahypercho/codex-router#1018, although its authentication approach differs.

The standard GitHub.com Copilot flow should continue to work unchanged.

Lingua principale
TypeScript
Stelle
16.9k
Fork
1.3k
Merge medio
1g 4h
PR unite (30g)
814

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lidge-jun/opencodex

Tutte le issue di lidge-jun/opencodex

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.