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

Abierto
#9,169 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
16.9k
Forks
1.3k
Merge medio
1 d 4 h
PR fusionados (30 d)
814

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de lidge-jun/opencodex

Todos los issues de lidge-jun/opencodex

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.