Skip to content

GitHub Copilot provider ([ai.github]) fails with github_models_retirement_brownout — appears to hit retired GitHub Models endpoint instead of Copilot Chat API #10726

Description

@Giansass

Describe the bug

Description

The [ai.github] AI provider (documented as "GitHub Copilot" in the LLM Providers guide) fails on every request with an error referencing "GitHub Models" retirement — regardless of which model ID is configured.

GitHub Models (the separate marketplace product at models.github.ai) was fully retired on July 30, 2026 (see GitHub's changelog). GitHub Copilot Chat (api.githubcopilot.com) is a different, still-active product and continues to work fine in other clients (VS Code, OpenCode, Copilot CLI) with the same OAuth token.

This suggests the [ai.github] provider in marimo is calling the retired GitHub Models endpoint rather than the Copilot Chat Completions API (https://api.githubcopilot.com), despite being documented and labeled as "GitHub Copilot."

Steps to reproduce

  1. Obtain a GitHub Copilot OAuth token (gho_...), e.g. via gh auth login (web browser flow) + gh auth token. Confirmed working for Copilot Chat via other clients (e.g. OpenCode) with the same token.
  2. Configure marimo.toml:
   [ai.models]
   chat_model = "github/claude-sonnet-5"

   [ai.github]
   api_key = "gho_..."
  1. Open the AI chat panel in the marimo editor and send any message.

Expected behavior

The request is sent to https://api.githubcopilot.com/chat/completions and returns a completion from Claude Sonnet 5 (assuming it's enabled on the account/plan), matching the behavior of other Copilot Chat clients using the same token.

Actual behavior

Every request fails with:

status_code: 410, model_name: claude-sonnet-5, body: {'code': 'github_models_retirement_brownout', 'message': 'GitHub Models is temporarily unavailable as part of a scheduled retirement brownout.'}

This happens regardless of the model ID used (tested with both a GitHub Models-style nested ID like deepseek/deepseek-r1-0528 and a Copilot-style flat ID like claude-sonnet-5), which suggests the base URL/endpoint is hardcoded rather than derived from the model prefix.

Environment

  • marimo version: 0.24.0
  • OS: macOS (26.4.1)
  • Python version: 3.12.13

Suggested fix

Update the [ai.github] provider implementation to target https://api.githubcopilot.com (the Copilot Chat Completions API) instead of the retired GitHub Models endpoint (models.github.ai / models.inference.ai.azure.com), so the documented "GitHub Copilot" provider actually reaches Copilot rather than the now-defunct GitHub Models service.

Will you submit a PR?

  • Yes

Environment

  • marimo version: 0.24.0
  • OS: macOS (26.4.1)
  • Python version: 3.12.13

Code to reproduce

  1. Obtain a GitHub Copilot OAuth token (gho_...), e.g. via gh auth login (web browser flow) + gh auth token. Confirmed working for Copilot Chat via other clients (e.g. OpenCode) with the same token.
  2. Configure marimo.toml:
   [ai.models]
   chat_model = "github/claude-sonnet-5"

   [ai.github]
   api_key = "gho_..."
  1. Open the AI chat panel in the marimo editor and send any message.

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions