Skip to content

GitHub Copilot provider: separate entries for business vs individual accounts + fix install source #2

Description

@WZHKAWF

Problem

1. Single github-copilot provider causes 403 for business users

The current GitHub Copilot provider uses a single :github-copilot entry that defaults to individual account type. Users on business plans get a 403 because:

  • The auth flow (vis providers auth github-copilot) saves "account-type":"individual" by default
  • The hardcoded base-url in VIS_PROVIDER_METADATA points to https://api.individual.githubcopilot.com
  • The config.edn generated during setup also hardcodes the individual URL

Users must manually discover they need to run vis providers auth github-copilot business — there's no obvious indication of the mismatch.

2. Proposed fix: two distinct provider entries

Instead of a single github-copilot with a hidden account-type parameter, expose two providers:

  • github-copilot-individual — base URL https://api.individual.githubcopilot.com
  • github-copilot-business — base URL https://api.business.githubcopilot.com

(Optionally a third for enterprise: github-copilot-enterprise)

This makes the choice explicit during provider setup and eliminates the class of 403 errors caused by account-type mismatch.

3. Installation picks git info from source repo instead of CWD

During installation/setup, vis appears to resolve git repository information from its own source directory (~/.vis/sourcecode/) rather than from the user's current working directory. The git context (repo name, branch, remote) should come from the CWD where the user invoked vis, not from the vis installation source.

Expected behavior

  • Provider picker shows GitHub Copilot (Business) and GitHub Copilot (Individual) as separate options
  • Auth flow for each sets the correct account-type and base-url without requiring CLI arguments
  • Git context is resolved from the user's CWD, not from ~/.vis/sourcecode/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions