1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Copilot model listing smoke test.
//!
//! This test is ignored by default and requires Copilot credentials. Run it
//! with one of the auth methods below:
//!
//! **API key:**
//! ```sh
//! GITHUB_COPILOT_API_KEY=<key> \
//! cargo test -p rig --test copilot list_models_smoke -- --ignored --nocapture
//! ```
//!
//! **GitHub personal access token:**
//! ```sh
//! COPILOT_GITHUB_ACCESS_TOKEN=<token> \
//! cargo test -p rig --test copilot list_models_smoke -- --ignored --nocapture
//! ```
//!
//! **OAuth (device code flow):** leave the env vars unset; the test will open a
//! browser prompt for authorization, or reuse a cached token from a previous run.
//! ```sh
//! cargo test -p rig --test copilot list_models_smoke -- --ignored --nocapture
//! ```
use cratewith_copilot_cassette;
use ModelListingClient;
async