Skip to main content

Crate tokn_provider_copilot

Crate tokn_provider_copilot 

Source

Re-exports§

pub use tokn_catalogue as catalogue;
pub use github_copilot::*;

Modules§

auth
ProviderAuth impl for github-copilot.
config
error
Provider-layer errors.
github_copilot
GitHub Copilot provider.
headers
import
Local-environment credential importers for github-copilot.
models
oauth
GitHub OAuth Device Flow for the Copilot client_id.
provider
token
user
/copilot_internal/user — per-user plan + per-feature quota snapshots.
util

Structs§

EndpointRule
Per-provider declarative rule mapping a model id glob pattern to the set of endpoints that model is allowed to be served on.
HeaderPatchCtx
ProviderInfo
RequestCtx
TemplateVars
Correlation metadata extracted from a single inbound HTTP request.

Enums§

AuthKind
Endpoint

Constants§

COPILOT_ACCESS_TOKEN_URL
COPILOT_BASE_URL
COPILOT_DEVICE_CODE_URL
COPILOT_TOKEN_EXCHANGE_URL
COPILOT_USER_INFO_URL
ID_GITHUB_COPILOT

Statics§

DEFAULT_ENDPOINTS
Endpoints Copilot serves; mirrored on DESCRIPTOR.endpoints and used to populate ProviderInfo::default_endpoints.
DESCRIPTOR
MODEL_ENDPOINT_RULES
Per-model endpoint rules. Mirrors what the official Copilot CLI / VSCode plugin route — Copilot ships new ids continuously and /models does not annotate per-endpoint support, so we pattern-match the id.

Traits§

Provider

Functions§

build
matches_url
validate

Type Aliases§

Result