aither_copilot/constant.rs
1//! Constants for GitHub Copilot API integration.
2
3/// Base URL for GitHub Copilot API.
4pub const COPILOT_BASE_URL: &str = "https://api.githubcopilot.com";
5
6/// GitHub OAuth device authorization endpoint.
7pub const GITHUB_DEVICE_CODE_URL: &str = "https://github.com/login/device/code";
8
9/// GitHub OAuth token endpoint.
10pub const GITHUB_TOKEN_URL: &str = "https://github.com/login/oauth/access_token";
11
12/// GitHub API endpoint to exchange OAuth token for Copilot session token.
13pub const COPILOT_TOKEN_URL: &str = "https://api.github.com/copilot_internal/v2/token";
14
15/// OAuth client ID for GitHub Copilot (VS Code's client ID).
16pub const COPILOT_CLIENT_ID: &str = "Iv1.b507a08c87ecfe98";
17
18/// Default model for chat completions.
19///
20/// GitHub designated GPT-5.3-Codex the base and long-term-support model on
21/// 2026-03-18: it is what Copilot falls back to when no other model is enabled,
22/// which makes it the one identifier most likely to resolve for any given
23/// account. Models here come and go on GitHub's schedule, not this crate's, so
24/// the default tracks the LTS designation rather than the newest release.
25pub const DEFAULT_MODEL: &str = GPT5_3_CODEX;
26
27// Models GitHub Copilot currently serves. Availability varies by plan and by
28// enterprise policy, so a constant here means GitHub lists the model, not that
29// a given account can reach it.
30
31/// GPT-5.3-Codex — the base and long-term-support model.
32pub const GPT5_3_CODEX: &str = "gpt-5.3-codex";
33/// GPT-5.6 Sol — frontier capability.
34pub const GPT5_6_SOL: &str = "gpt-5.6-sol";
35/// GPT-5.6 Terra — strong performance at lower cost.
36pub const GPT5_6_TERRA: &str = "gpt-5.6-terra";
37/// GPT-5.6 Luna — efficient, for high-volume work.
38pub const GPT5_6_LUNA: &str = "gpt-5.6-luna";
39/// GPT-5.5.
40pub const GPT5_5: &str = "gpt-5.5";
41/// GPT-5.4.
42pub const GPT5_4: &str = "gpt-5.4";
43/// GPT-5.4 mini.
44pub const GPT5_4_MINI: &str = "gpt-5.4-mini";
45/// GPT-5 mini.
46pub const GPT5_MINI: &str = "gpt-5-mini";
47
48/// Claude Opus 5.
49pub const CLAUDE_OPUS_5: &str = "claude-opus-5";
50/// Claude Sonnet 5.
51pub const CLAUDE_SONNET_5: &str = "claude-sonnet-5";
52/// Claude Fable 5.
53pub const CLAUDE_FABLE_5: &str = "claude-fable-5";
54/// Claude Opus 4.8.
55pub const CLAUDE_OPUS_4_8: &str = "claude-opus-4-8";
56/// Claude Opus 4.7.
57pub const CLAUDE_OPUS_4_7: &str = "claude-opus-4-7";
58/// Claude Haiku 4.5.
59pub const CLAUDE_HAIKU_4_5: &str = "claude-haiku-4-5";
60
61/// Editor version header value (identifies as VS Code).
62pub const EDITOR_VERSION: &str = "vscode/1.96.0";
63
64/// Copilot integration ID header value.
65pub const COPILOT_INTEGRATION_ID: &str = "vscode-chat";