Skip to content

Commit 066a69c

Browse files
sunbryeCopilotCopilot
authored
Docs normalization for the SDK -> Docs pipeline (#1208)
* 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> * Restructure index.md files for docs pipeline compatibility Move rich content out of index.md files into standalone articles: - setup/index.md → setup/choosing-a-setup-path.md - hooks/index.md → hooks/hooks-overview.md Replace all index.md files with minimal nav pages matching the docs-internal pattern (YAML-only category pages on that side). Add missing index.md files for directories that lacked them: - integrations/index.md - observability/index.md - troubleshooting/index.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Convert callout syntax to GitHub-flavored alerts Convert 27 callouts across 15 files from bold-text style (> **Note:**) to GitHub alert syntax (> [!NOTE]). Language-qualified tips (e.g., > **Tip (Python / Go):**) preserve the qualifier as bold text in the alert body. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update internal links for restructured index files Point 7 content links to their new standalone files: - auth/index.md → auth/authenticate.md - hooks/index.md → hooks/hooks-overview.md Links in docs/index.md (root nav) intentionally still point to index.md since those are category navigation links. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Convert list markers from hyphens to asterisks Convert 371 unordered list markers across 37 files from `-` to `*` to match the GitHub Docs style guide convention. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Normalize ordered list numbering to all 1. Convert 116 sequentially numbered list items across 20 files to use 1. for every item, matching the GitHub Docs style guide. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove horizontal rules used as section dividers Remove 37 horizontal rules (---) across 7 files. GitHub Docs style uses headings to separate sections, not horizontal rules. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Normalize em dash usage across all docs Convert 79 list item em dashes to colons (label: description pattern) and remove spaces around 114 mid-sentence em dashes to match the GitHub Docs style guide. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Remove bold from headings in remote-sessions.md Fix 10 headings that used bold markers (**) in heading titles and apply proper noun casing for language names. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent bf3bdea commit 066a69c

39 files changed

Lines changed: 1952 additions & 1956 deletions

docs/auth/authenticate.md

Lines changed: 402 additions & 0 deletions
Large diffs are not rendered by default.

docs/auth/byok.md

Lines changed: 45 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# BYOK (Bring Your Own Key)
1+
# BYOK (bring your own key)
22

33
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.
44

5-
## Supported Providers
5+
## Supported providers
66

77
| Provider | Type Value | Notes |
88
|----------|------------|-------|
@@ -13,7 +13,7 @@ BYOK allows you to use the Copilot SDK with your own API keys from model provide
1313
| Microsoft Foundry Local | `"openai"` | Run AI models locally on your device via OpenAI-compatible API |
1414
| Other OpenAI-compatible | `"openai"` | vLLM, LiteLLM, etc. |
1515

16-
## Quick Start: Azure AI Foundry
16+
## Quick start: Azure AI Foundry
1717

1818
Azure AI Foundry (formerly Azure OpenAI) is a common BYOK deployment target for enterprises. Here's a complete example:
1919

@@ -196,9 +196,9 @@ client.stop().get();
196196

197197
</details>
198198

199-
## Provider Configuration Reference
199+
## Provider configuration reference
200200

201-
### ProviderConfig Fields
201+
### ProviderConfig fields
202202

203203
| Field | Type | Description |
204204
|-------|------|-------------|
@@ -209,31 +209,31 @@ client.stop().get();
209209
| `wireApi` / `wire_api` | `"completions"` \| `"responses"` | API format (default: `"completions"`) |
210210
| `azure.apiVersion` / `azure.api_version` | string | Azure API version (default: `"2024-10-21"`) |
211211

212-
### Wire API Format
212+
### Wire API format
213213

214214
The `wireApi` setting determines which OpenAI API format to use:
215215

216-
- **`"completions"`** (default) - Chat Completions API (`/chat/completions`). Use for most models.
217-
- **`"responses"`** - Responses API. Use for GPT-5 series models that support the newer responses format.
216+
* **`"completions"`** (default) - Chat Completions API (`/chat/completions`). Use for most models.
217+
* **`"responses"`** - Responses API. Use for GPT-5 series models that support the newer responses format.
218218

219-
### Type-Specific Notes
219+
### Type-specific notes
220220

221221
**OpenAI (`type: "openai"`)**
222-
- Works with OpenAI API and any OpenAI-compatible endpoint
223-
- `baseUrl` should include the full path (e.g., `https://api.openai.com/v1`)
222+
* Works with OpenAI API and any OpenAI-compatible endpoint
223+
* `baseUrl` should include the full path (e.g., `https://api.openai.com/v1`)
224224

225225
**Azure (`type: "azure"`)**
226-
- Use for native Azure OpenAI endpoints
227-
- `baseUrl` should be just the host (e.g., `https://my-resource.openai.azure.com`)
228-
- Do NOT include `/openai/v1` in the URL—the SDK handles path construction
226+
* Use for native Azure OpenAI endpoints
227+
* `baseUrl` should be just the host (e.g., `https://my-resource.openai.azure.com`)
228+
* Do NOT include `/openai/v1` in the URL—the SDK handles path construction
229229

230230
**Anthropic (`type: "anthropic"`)**
231-
- For direct Anthropic API access
232-
- Uses Claude-specific API format
231+
* For direct Anthropic API access
232+
* Uses Claude-specific API format
233233

234-
## Example Configurations
234+
## Example configurations
235235

236-
### OpenAI Direct
236+
### OpenAI direct
237237

238238
```typescript
239239
provider: {
@@ -243,7 +243,7 @@ provider: {
243243
}
244244
```
245245

246-
### Azure OpenAI (Native Azure Endpoint)
246+
### Azure OpenAI (native Azure endpoint)
247247

248248
Use `type: "azure"` for endpoints at `*.openai.azure.com`:
249249

@@ -258,7 +258,7 @@ provider: {
258258
}
259259
```
260260

261-
### Azure AI Foundry (OpenAI-Compatible Endpoint)
261+
### Azure AI Foundry (OpenAI-compatible endpoint)
262262

263263
For Azure AI Foundry deployments with `/openai/v1/` endpoints, use `type: "openai"`:
264264

@@ -271,7 +271,7 @@ provider: {
271271
}
272272
```
273273

274-
### Ollama (Local)
274+
### Ollama (local)
275275

276276
```typescript
277277
provider: {
@@ -293,7 +293,8 @@ provider: {
293293
}
294294
```
295295

296-
> **Note:** Foundry Local starts on a **dynamic port** — the port is not fixed. Use `foundry service status` to confirm the port the service is currently listening on, then use that port in your `baseUrl`.
296+
> [!NOTE]
297+
> Foundry Local starts on a **dynamic port**—the port is not fixed. Use `foundry service status` to confirm the port the service is currently listening on, then use that port in your `baseUrl`.
297298
298299
To get started with Foundry Local:
299300

@@ -322,7 +323,7 @@ provider: {
322323
}
323324
```
324325

325-
### Bearer Token Authentication
326+
### Bearer token authentication
326327

327328
Some providers require bearer token authentication instead of API keys:
328329

@@ -334,9 +335,10 @@ provider: {
334335
}
335336
```
336337

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+
> [!NOTE]
339+
> 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.
338340
339-
## Custom Model Listing
341+
## Custom model listing
340342

341343
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.
342344

@@ -467,28 +469,28 @@ var client = new CopilotClient(new CopilotClientOptions()
467469

468470
</details>
469471

470-
Results are cached after the first call, just like the default behavior. The handler completely replaces the CLI's `models.list` RPCno fallback to the server occurs.
472+
Results are cached after the first call, just like the default behavior. The handler completely replaces the CLI's `models.list` RPCno fallback to the server occurs.
471473

472474
## Limitations
473475

474476
When using BYOK, be aware of these limitations:
475477

476-
### Identity Limitations
478+
### Identity limitations
477479

478480
BYOK authentication uses **static credentials only**.
479481

480482
You must use an API key or static bearer token that you manage yourself.
481483

482-
### Feature Limitations
484+
### Feature limitations
483485

484486
Some Copilot features may behave differently with BYOK:
485487

486-
- **Model availability** - Only models supported by your provider are available
487-
- **Rate limiting** - Subject to your provider's rate limits, not Copilot's
488-
- **Usage tracking** - Usage is tracked by your provider, not GitHub Copilot
489-
- **Premium requests** - Do not count against Copilot premium request quotas
488+
* **Model availability** - Only models supported by your provider are available
489+
* **Rate limiting** - Subject to your provider's rate limits, not Copilot's
490+
* **Usage tracking** - Usage is tracked by your provider, not GitHub Copilot
491+
* **Premium requests** - Do not count against Copilot premium request quotas
490492

491-
### Provider-Specific Limitations
493+
### Provider-specific limitations
492494

493495
| Provider | Limitations |
494496
|----------|-------------|
@@ -499,7 +501,7 @@ Some Copilot features may behave differently with BYOK:
499501

500502
## Troubleshooting
501503

502-
### "Model not specified" Error
504+
### "Model not specified" error
503505

504506
When using BYOK, the `model` parameter is **required**:
505507

@@ -516,7 +518,7 @@ const session = await client.createSession({
516518
});
517519
```
518520

519-
### Azure Endpoint Type Confusion
521+
### Azure endpoint type confusion
520522

521523
For Azure OpenAI endpoints (`*.openai.azure.com`), use the correct type:
522524

@@ -574,7 +576,7 @@ provider: {
574576
}
575577
```
576578

577-
### Connection Refused (Ollama)
579+
### Connection refused (Ollama)
578580

579581
Ensure Ollama is running and accessible:
580582

@@ -586,7 +588,7 @@ curl http://localhost:11434/v1/models
586588
ollama serve
587589
```
588590

589-
### Connection Refused (Foundry Local)
591+
### Connection refused (Foundry Local)
590592

591593
Foundry Local uses a dynamic port that may change between restarts. Confirm the active port:
592594

@@ -601,13 +603,13 @@ Update your `baseUrl` to match the port shown in the output. If the service is n
601603
foundry model run phi-4-mini
602604
```
603605

604-
### Authentication Failed
606+
### Authentication failed
605607

606608
1. Verify your API key is correct and not expired
607-
2. Check the `baseUrl` matches your provider's expected format
608-
3. For bearer tokens, ensure the full token is provided (not just a prefix)
609+
1. Check the `baseUrl` matches your provider's expected format
610+
1. For bearer tokens, ensure the full token is provided (not just a prefix)
609611

610-
## Next Steps
612+
## Next steps
611613

612-
- [Authentication Overview](./index.md) - Learn about all authentication methods
613-
- [Getting Started Guide](../getting-started.md) - Build your first Copilot-powered app
614+
* [Authentication Overview](./index.md) - Learn about all authentication methods
615+
* [Getting Started Guide](../getting-started.md) - Build your first Copilot-powered app

0 commit comments

Comments
 (0)