Skip to content

Add GitHub Copilot and Gemini OAuth support to coding-agent #84

Description

@badlogic

Implement full GitHub Copilot integration in coding-agent, including:

  1. Generate GitHub Copilot models in @mariozechner/pi-ai

    • Update packages/ai/scripts/generate-models.ts to add github-copilot provider
    • Filter available models, exclude deprecated ones
    • Set API to openai-completions, add static headers
    • Update KnownProvider type
  2. Implement device flow OAuth in packages/coding-agent

    • Create src/oauth/github-copilot.ts with loginGitHubCopilot() and refreshGitHubCopilotToken()
    • Update src/oauth/index.ts and src/model-config.ts to handle github-copilot
  3. Add GitHub Copilot to TUI

    • Update src/tui/oauth-selector.ts to add github-copilot provider and show device flow UI
    • Update src/tui/tui-renderer.ts to show Copilot models
    • Update src/main.ts to add github-copilot to default providers
  4. Test end-to-end

    • Login via TUI, select Copilot model, test chat and tool calls
    • Verify usage/cost tracking works

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions