picker.py 901 B

1234567891011121314151617181920
  1. """GitHub Copilot's place in the provider tables: picker row, label, group, aliases, models.dev overlay.
  2. Core reads these only through generic ``ProviderProfile`` fields (``PICKER_FIELDS``).
  3. """
  4. # Both Copilot providers fold under one "GitHub Copilot" row in the interactive pickers.
  5. PICKER_GROUP = ("copilot", "GitHub Copilot", "GitHub token API or copilot --acp process")
  6. PICKER_FIELDS = dict(
  7. display_name="GitHub Copilot",
  8. description="GitHub Copilot (Uses GITHUB_TOKEN or hermes auth add copilot)",
  9. picker_after="nvidia",
  10. picker_group=PICKER_GROUP,
  11. catalog_aliases=True,
  12. # The Copilot catalog serves OpenAI, Anthropic, Google and xAI models.
  13. aggregator=True,
  14. # models.dev lists GitHub Copilot under GITHUB_TOKEN only; Hermes also reads these two.
  15. provider_overlay={"extra_env_vars": ("COPILOT_GITHUB_TOKEN", "GH_TOKEN")},
  16. overlay_aliases=("github",),
  17. )