You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convert headings to sentence case across all SDK docs
Convert 402 headings from title case to sentence case across 31
markdown files to align with docs.github.com style conventions.
Proper nouns (GitHub, Copilot, OAuth, Azure, MCP, etc.) and code
identifiers (SessionConfig, TelemetryConfig, etc.) are preserved.
Ampersands replaced with 'and'. No code snippet contents modified.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/auth/byok.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
# BYOK (Bring Your Own Key)
1
+
# BYOK (bring your own key)
2
2
3
3
BYOK allows you to use the Copilot SDK with your own API keys from model providers, bypassing GitHub Copilot authentication. This is useful for enterprise deployments, custom model hosting, or when you want direct billing with your model provider.
4
4
5
-
## Supported Providers
5
+
## Supported providers
6
6
7
7
| Provider | Type Value | Notes |
8
8
|----------|------------|-------|
@@ -13,7 +13,7 @@ BYOK allows you to use the Copilot SDK with your own API keys from model provide
13
13
| Microsoft Foundry Local |`"openai"`| Run AI models locally on your device via OpenAI-compatible API |
14
14
| Other OpenAI-compatible |`"openai"`| vLLM, LiteLLM, etc. |
15
15
16
-
## Quick Start: Azure AI Foundry
16
+
## Quick start: Azure AI Foundry
17
17
18
18
Azure AI Foundry (formerly Azure OpenAI) is a common BYOK deployment target for enterprises. Here's a complete example:
19
19
@@ -196,9 +196,9 @@ client.stop().get();
196
196
197
197
</details>
198
198
199
-
## Provider Configuration Reference
199
+
## Provider configuration reference
200
200
201
-
### ProviderConfig Fields
201
+
### ProviderConfig fields
202
202
203
203
| Field | Type | Description |
204
204
|-------|------|-------------|
@@ -209,14 +209,14 @@ client.stop().get();
209
209
|`wireApi` / `wire_api`|`"completions"`\|`"responses"`| API format (default: `"completions"`) |
210
210
|`azure.apiVersion` / `azure.api_version`| string | Azure API version (default: `"2024-10-21"`) |
211
211
212
-
### Wire API Format
212
+
### Wire API format
213
213
214
214
The `wireApi` setting determines which OpenAI API format to use:
215
215
216
216
-**`"completions"`** (default) - Chat Completions API (`/chat/completions`). Use for most models.
217
217
-**`"responses"`** - Responses API. Use for GPT-5 series models that support the newer responses format.
218
218
219
-
### Type-Specific Notes
219
+
### Type-specific notes
220
220
221
221
**OpenAI (`type: "openai"`)**
222
222
- Works with OpenAI API and any OpenAI-compatible endpoint
@@ -231,9 +231,9 @@ The `wireApi` setting determines which OpenAI API format to use:
231
231
- For direct Anthropic API access
232
232
- Uses Claude-specific API format
233
233
234
-
## Example Configurations
234
+
## Example configurations
235
235
236
-
### OpenAI Direct
236
+
### OpenAI direct
237
237
238
238
```typescript
239
239
provider: {
@@ -243,7 +243,7 @@ provider: {
243
243
}
244
244
```
245
245
246
-
### Azure OpenAI (Native Azure Endpoint)
246
+
### Azure OpenAI (native Azure endpoint)
247
247
248
248
Use `type: "azure"` for endpoints at `*.openai.azure.com`:
249
249
@@ -258,7 +258,7 @@ provider: {
258
258
}
259
259
```
260
260
261
-
### Azure AI Foundry (OpenAI-Compatible Endpoint)
261
+
### Azure AI Foundry (OpenAI-compatible endpoint)
262
262
263
263
For Azure AI Foundry deployments with `/openai/v1/` endpoints, use `type: "openai"`:
264
264
@@ -271,7 +271,7 @@ provider: {
271
271
}
272
272
```
273
273
274
-
### Ollama (Local)
274
+
### Ollama (local)
275
275
276
276
```typescript
277
277
provider: {
@@ -322,7 +322,7 @@ provider: {
322
322
}
323
323
```
324
324
325
-
### Bearer Token Authentication
325
+
### Bearer token authentication
326
326
327
327
Some providers require bearer token authentication instead of API keys:
328
328
@@ -336,7 +336,7 @@ provider: {
336
336
337
337
> **Note:** The `bearerToken` option accepts a **static token string** only. The SDK does not refresh this token automatically. If your token expires, requests will fail and you'll need to create a new session with a fresh token.
338
338
339
-
## Custom Model Listing
339
+
## Custom model listing
340
340
341
341
When using BYOK, the CLI server may not know which models your provider supports. You can supply a custom `onListModels` handler at the client level so that `client.listModels()` returns your provider's models in the standard `ModelInfo` format. This lets downstream consumers discover available models without querying the CLI.
342
342
@@ -473,13 +473,13 @@ Results are cached after the first call, just like the default behavior. The han
Copy file name to clipboardExpand all lines: docs/auth/index.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
The GitHub Copilot SDK supports multiple authentication methods to fit different use cases. Choose the method that best matches your deployment scenario.
4
4
5
-
## Authentication Methods
5
+
## Authentication methods
6
6
7
7
| Method | Use Case | Copilot Subscription Required |
|[BYOK (Bring Your Own Key)](./byok.md)| Using your own API keys (Azure AI Foundry, OpenAI, etc.) | No |
13
13
14
-
## GitHub Signed-in User
14
+
## GitHub signed-in user
15
15
16
16
This is the default authentication method when running the Copilot CLI interactively. Users authenticate via GitHub OAuth device flow, and the SDK uses their stored credentials.
17
17
@@ -231,7 +231,7 @@ client.start().get();
231
231
- SaaS applications building on top of Copilot
232
232
- Any multi-user application where you need to make requests on behalf of different users
233
233
234
-
## Environment Variables
234
+
## Environment variables
235
235
236
236
For automation, CI/CD pipelines, and server-to-server scenarios, you can authenticate using environment variables.
237
237
@@ -279,7 +279,7 @@ await client.start()
279
279
- Server-side applications with service accounts
280
280
- Development when you don't want to use interactive login
281
281
282
-
## BYOK (Bring Your Own Key)
282
+
## BYOK (bring your own key)
283
283
284
284
BYOK allows you to use your own API keys from model providers like Azure AI Foundry, OpenAI, or Anthropic. This bypasses GitHub Copilot authentication entirely.
285
285
@@ -295,7 +295,7 @@ BYOK allows you to use your own API keys from model providers like Azure AI Foun
295
295
- Limitations and considerations
296
296
- Complete code examples
297
297
298
-
## Authentication Priority
298
+
## Authentication priority
299
299
300
300
When multiple authentication methods are available, the SDK uses them in this priority order:
301
301
@@ -306,7 +306,7 @@ When multiple authentication methods are available, the SDK uses them in this pr
306
306
5.**Stored OAuth credentials** - From previous `copilot` CLI login
307
307
6.**GitHub CLI** - `gh auth` credentials
308
308
309
-
## Disabling Auto-Login
309
+
## Disabling auto-login
310
310
311
311
To prevent the SDK from automatically using stored credentials or `gh` CLI auth, use the `useLoggedInUser: false` option:
312
312
@@ -395,7 +395,7 @@ client.start().get();
395
395
396
396
</details>
397
397
398
-
## Next Steps
398
+
## Next steps
399
399
400
400
-[BYOK Documentation](./byok.md) - Learn how to use your own API keys
401
401
-[Getting Started Guide](../getting-started.md) - Build your first Copilot-powered app
0 commit comments