copilot

package
v8.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package copilot exposes Copilot authentication and model discovery to SDK consumers.

Index

Constants

Provider identifies GitHub Copilot credentials.

Variables

This section is empty.

Functions

func FetchModels

func FetchModels(ctx context.Context, client *http.Client, base, token string) (json.RawMessage, error)

FetchModels reads the model catalog for the selected Copilot account.

func TrustedAPI

func TrustedAPI(base string) bool

TrustedAPI reports whether the endpoint can receive a Copilot credential.

Types

type DeviceCode

type DeviceCode = internalcopilot.DeviceCode

DeviceCode contains the data required to complete a device authorization.

func StartDeviceFlow

func StartDeviceFlow(ctx context.Context, client *http.Client) (DeviceCode, error)

StartDeviceFlow starts GitHub device authorization.

type HTTPError

type HTTPError = internalcopilot.HTTPError

HTTPError reports the status returned by an upstream request.

type Token

type Token = internalcopilot.Token

Token contains a short-lived Copilot credential and its API endpoint.

func Exchange

func Exchange(ctx context.Context, client *http.Client, githubToken string) (Token, error)

Exchange obtains a short-lived Copilot token from a GitHub credential.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL