Skip to content

Commit 522ff2c

Browse files
sunbryeCopilotscottaddie
authored
Fix docs formatting for docs.github.com publishing (model name, lists, table cell) (#1800)
* Change model from gpt-4.1 to auto in getting-started examples gpt-4.1 is deprecated. Update all code examples to use 'auto' for automatic model selection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: fix formatting that breaks docs.github.com publishing The docs/ content is synced to docs.github.com (via github/docs-internal), where it must meet that platform's style rules. Two recurring issues were being reintroduced and fixed by hand on every sync: * Unordered lists must use asterisks (*) not hyphens (-) on docs.github.com. Converted prose bullets in features/fleet-mode.md, features/hooks.md, and hooks/post-tool-use.md (code blocks and frontmatter left untouched). * Every table cell must have a value. Filled the empty AZURE_TOKEN_CREDENTIALS Example cell in setup/azure-managed-identity.md with ManagedIdentityCredential (matches the row's description and this page's Azure scenario). Note: intentionally-blank cells that represent structure (optional 'Required' columns in property tables, section-grouping rows in troubleshooting/ compatibility.md, and the corner cell of the setup/scaling.md comparison matrix) were left as-is. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com>
1 parent 2fd2f99 commit 522ff2c

5 files changed

Lines changed: 67 additions & 67 deletions

File tree

docs/features/fleet-mode.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ Fleet mode is useful when the work can be decomposed before execution and each u
88

99
Good fits include:
1010

11-
- Multi-file refactors where each worker owns a file, package, or language SDK.
12-
- Batch reviews where each worker checks a separate diff, module, or alert group.
13-
- Parallel research across independent repositories, services, or feature areas.
14-
- Documentation refreshes where each worker owns a page or topic.
15-
- Migration tasks where each worker can validate its own slice and report back.
11+
* Multi-file refactors where each worker owns a file, package, or language SDK.
12+
* Batch reviews where each worker checks a separate diff, module, or alert group.
13+
* Parallel research across independent repositories, services, or feature areas.
14+
* Documentation refreshes where each worker owns a page or topic.
15+
* Migration tasks where each worker can validate its own slice and report back.
1616

1717
Avoid fleet mode for:
1818

19-
- Sequential tasks where step 2 needs the concrete output from step 1.
20-
- Tightly coupled edits where workers would contend for the same files.
21-
- Small tasks that one synchronous sub-agent or the parent agent can finish quickly.
22-
- Tasks that require continuous shared reasoning rather than clear ownership.
19+
* Sequential tasks where step 2 needs the concrete output from step 1.
20+
* Tightly coupled edits where workers would contend for the same files.
21+
* Small tasks that one synchronous sub-agent or the parent agent can finish quickly.
22+
* Tasks that require continuous shared reasoning rather than clear ownership.
2323

2424
Fleet mode works best when the parent session can create clear units of work, assign one owner per unit, and define what each worker must return.
2525

@@ -321,29 +321,29 @@ Keep plugin-provided sub-agent types narrow and descriptive so the orchestrator
321321

322322
## Best practices
323323

324-
- Decompose the work into independent units before starting fleet mode.
325-
- Minimize dependencies between todos; dependencies reduce parallelism.
326-
- Give each todo a durable ID, a clear title, and a complete description.
327-
- Make each sub-agent own exactly one todo at a time.
328-
- Use background sub-agents for truly parallel work.
329-
- Use synchronous sub-agent calls for serialized steps or validation gates.
330-
- Provide each sub-agent with complete context; sub-agents are stateless across calls.
331-
- Include file paths, commands, expected outputs, and constraints in each worker prompt.
332-
- Do not dispatch a single background sub-agent; prefer a synchronous call or batch multiple workers in parallel.
333-
- Avoid assigning overlapping files to different workers unless the parent agent will reconcile conflicts explicitly.
334-
- Require every worker to report what it changed, how it validated the change, and what remains blocked.
335-
- Have the parent agent verify the combined result after workers finish.
324+
* Decompose the work into independent units before starting fleet mode.
325+
* Minimize dependencies between todos; dependencies reduce parallelism.
326+
* Give each todo a durable ID, a clear title, and a complete description.
327+
* Make each sub-agent own exactly one todo at a time.
328+
* Use background sub-agents for truly parallel work.
329+
* Use synchronous sub-agent calls for serialized steps or validation gates.
330+
* Provide each sub-agent with complete context; sub-agents are stateless across calls.
331+
* Include file paths, commands, expected outputs, and constraints in each worker prompt.
332+
* Do not dispatch a single background sub-agent; prefer a synchronous call or batch multiple workers in parallel.
333+
* Avoid assigning overlapping files to different workers unless the parent agent will reconcile conflicts explicitly.
334+
* Require every worker to report what it changed, how it validated the change, and what remains blocked.
335+
* Have the parent agent verify the combined result after workers finish.
336336

337337
## Limitations and open questions
338338

339-
- Fleet mode is exposed through generated session RPC bindings and is marked experimental in several SDKs.
340-
- The SQL todos pattern is the canonical coordination model in the runtime guidance, but whether it is a stable extensibility contract for SDK consumers is still an open question.
341-
- `subagentStart` and `subagentStop` are runtime hook names; this branch exposes sub-agent lifecycle to SDK consumers through the generic session event stream, not dedicated hook callbacks.
342-
- Plugin sub-agent registration is configured at the runtime layer through `--plugin-dir`; no SDK-level plugin registration helper was verified on this branch.
343-
- Java native typed bindings for `session.fleet.start` were not found in the Java SDK source on this branch.
344-
- Fleet mode does not remove the need for parent-agent review. Parallel workers can produce inconsistent assumptions that the orchestrator must reconcile.
339+
* Fleet mode is exposed through generated session RPC bindings and is marked experimental in several SDKs.
340+
* The SQL todos pattern is the canonical coordination model in the runtime guidance, but whether it is a stable extensibility contract for SDK consumers is still an open question.
341+
* `subagentStart` and `subagentStop` are runtime hook names; this branch exposes sub-agent lifecycle to SDK consumers through the generic session event stream, not dedicated hook callbacks.
342+
* Plugin sub-agent registration is configured at the runtime layer through `--plugin-dir`; no SDK-level plugin registration helper was verified on this branch.
343+
* Java native typed bindings for `session.fleet.start` were not found in the Java SDK source on this branch.
344+
* Fleet mode does not remove the need for parent-agent review. Parallel workers can produce inconsistent assumptions that the orchestrator must reconcile.
345345

346346
## See also
347347

348-
- [Custom agents and sub-agent orchestration](custom-agents.md)
349-
- [Hooks](hooks.md)
348+
* [Custom agents and sub-agent orchestration](custom-agents.md)
349+
* [Hooks](hooks.md)

docs/features/hooks.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,16 +1051,16 @@ const session = await client.createSession({
10511051

10521052
For full type definitions, input/output field tables, and additional examples for every hook, see the API reference:
10531053

1054-
- [Hooks Overview](../hooks/hooks-overview.md)
1055-
- [Pre-Tool Use](../hooks/pre-tool-use.md)
1056-
- [Post-Tool Use](../hooks/post-tool-use.md)
1057-
- [User Prompt Submitted](../hooks/user-prompt-submitted.md)
1058-
- [Session Lifecycle](../hooks/session-lifecycle.md)
1059-
- [Error Handling](../hooks/error-handling.md)
1054+
* [Hooks Overview](../hooks/hooks-overview.md)
1055+
* [Pre-Tool Use](../hooks/pre-tool-use.md)
1056+
* [Post-Tool Use](../hooks/post-tool-use.md)
1057+
* [User Prompt Submitted](../hooks/user-prompt-submitted.md)
1058+
* [Session Lifecycle](../hooks/session-lifecycle.md)
1059+
* [Error Handling](../hooks/error-handling.md)
10601060

10611061
## See also
10621062

1063-
- [Getting Started](../getting-started.md)
1064-
- [Custom Agents & Sub-Agent Orchestration](./custom-agents.md)
1065-
- [Streaming Session Events](./streaming-events.md)
1066-
- [Debugging Guide](../troubleshooting/debugging.md)
1063+
* [Getting Started](../getting-started.md)
1064+
* [Custom Agents & Sub-Agent Orchestration](./custom-agents.md)
1065+
* [Streaming Session Events](./streaming-events.md)
1066+
* [Debugging Guide](../troubleshooting/debugging.md)

docs/getting-started.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Create `index.ts`:
150150
import { CopilotClient } from "@github/copilot-sdk";
151151

152152
const client = new CopilotClient();
153-
const session = await client.createSession({ model: "gpt-5.4" });
153+
const session = await client.createSession({ model: "auto" });
154154

155155
const response = await session.sendAndWait({ prompt: "What is 2 + 2?" });
156156
console.log(response?.data.content);
@@ -181,7 +181,7 @@ async def main():
181181
client = CopilotClient()
182182
await client.start()
183183

184-
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="gpt-5.4")
184+
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="auto")
185185
response = await session.send_and_wait("What is 2 + 2?")
186186
print(response.data.content)
187187

@@ -223,7 +223,7 @@ func main() {
223223
}
224224
defer client.Stop()
225225

226-
session, err := client.CreateSession(ctx, &copilot.SessionConfig{Model: "gpt-5.4"})
226+
session, err := client.CreateSession(ctx, &copilot.SessionConfig{Model: "auto"})
227227
if err != nil {
228228
log.Fatal(err)
229229
}
@@ -304,7 +304,7 @@ using GitHub.Copilot;
304304
await using var client = new CopilotClient();
305305
await using var session = await client.CreateSessionAsync(new SessionConfig
306306
{
307-
Model = "gpt-5.4",
307+
Model = "auto",
308308
OnPermissionRequest = PermissionHandler.ApproveAll
309309
});
310310

@@ -337,7 +337,7 @@ public class HelloCopilot {
337337

338338
var session = client.createSession(
339339
new SessionConfig()
340-
.setModel("gpt-5.4")
340+
.setModel("auto")
341341
.setOnPermissionRequest(PermissionHandler.APPROVE_ALL)
342342
).get();
343343

@@ -383,7 +383,7 @@ import { CopilotClient } from "@github/copilot-sdk";
383383

384384
const client = new CopilotClient();
385385
const session = await client.createSession({
386-
model: "gpt-5.4",
386+
model: "auto",
387387
streaming: true,
388388
});
389389

@@ -419,7 +419,7 @@ async def main():
419419
client = CopilotClient()
420420
await client.start()
421421

422-
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="gpt-5.4", streaming=True)
422+
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="auto", streaming=True)
423423

424424
# Listen for response chunks
425425
def handle_event(event):
@@ -466,7 +466,7 @@ func main() {
466466
defer client.Stop()
467467

468468
session, err := client.CreateSession(ctx, &copilot.SessionConfig{
469-
Model: "gpt-5.4",
469+
Model: "auto",
470470
Streaming: copilot.Bool(true),
471471
})
472472
if err != nil {
@@ -562,7 +562,7 @@ using GitHub.Copilot;
562562
await using var client = new CopilotClient();
563563
await using var session = await client.CreateSessionAsync(new SessionConfig
564564
{
565-
Model = "gpt-5.4",
565+
Model = "auto",
566566
OnPermissionRequest = PermissionHandler.ApproveAll,
567567
Streaming = true,
568568
});
@@ -602,7 +602,7 @@ public class HelloCopilot {
602602

603603
var session = client.createSession(
604604
new SessionConfig()
605-
.setModel("gpt-5.4")
605+
.setModel("auto")
606606
.setStreaming(true)
607607
.setOnPermissionRequest(PermissionHandler.APPROVE_ALL)
608608
).get();
@@ -912,7 +912,7 @@ const getWeather = defineTool("get_weather", {
912912

913913
const client = new CopilotClient();
914914
const session = await client.createSession({
915-
model: "gpt-5.4",
915+
model: "auto",
916916
streaming: true,
917917
tools: [getWeather],
918918
});
@@ -968,7 +968,7 @@ async def main():
968968
client = CopilotClient()
969969
await client.start()
970970

971-
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="gpt-5.4", streaming=True, tools=[get_weather])
971+
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="auto", streaming=True, tools=[get_weather])
972972

973973
def handle_event(event):
974974
if event.type == SessionEventType.ASSISTANT_MESSAGE_DELTA:
@@ -1045,7 +1045,7 @@ func main() {
10451045
defer client.Stop()
10461046

10471047
session, err := client.CreateSession(ctx, &copilot.SessionConfig{
1048-
Model: "gpt-5.4",
1048+
Model: "auto",
10491049
Streaming: copilot.Bool(true),
10501050
Tools: []copilot.Tool{getWeather},
10511051
})
@@ -1185,7 +1185,7 @@ var getWeather = CopilotTool.DefineTool(
11851185

11861186
await using var session = await client.CreateSessionAsync(new SessionConfig
11871187
{
1188-
Model = "gpt-5.4",
1188+
Model = "auto",
11891189
OnPermissionRequest = PermissionHandler.ApproveAll,
11901190
Streaming = true,
11911191
Tools = [getWeather],
@@ -1259,7 +1259,7 @@ public class HelloCopilot {
12591259

12601260
var session = client.createSession(
12611261
new SessionConfig()
1262-
.setModel("gpt-5.4")
1262+
.setModel("auto")
12631263
.setStreaming(true)
12641264
.setTools(List.of(getWeather))
12651265
.setOnPermissionRequest(PermissionHandler.APPROVE_ALL)
@@ -1316,7 +1316,7 @@ const getWeather = defineTool("get_weather", {
13161316

13171317
const client = new CopilotClient();
13181318
const session = await client.createSession({
1319-
model: "gpt-5.4",
1319+
model: "auto",
13201320
streaming: true,
13211321
tools: [getWeather],
13221322
});
@@ -1389,7 +1389,7 @@ async def main():
13891389
client = CopilotClient()
13901390
await client.start()
13911391

1392-
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="gpt-5.4", streaming=True, tools=[get_weather])
1392+
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="auto", streaming=True, tools=[get_weather])
13931393

13941394
def handle_event(event):
13951395
if event.type == SessionEventType.ASSISTANT_MESSAGE_DELTA:
@@ -1482,7 +1482,7 @@ func main() {
14821482
defer client.Stop()
14831483

14841484
session, err := client.CreateSession(ctx, &copilot.SessionConfig{
1485-
Model: "gpt-5.4",
1485+
Model: "auto",
14861486
Streaming: copilot.Bool(true),
14871487
Tools: []copilot.Tool{getWeather},
14881488
})
@@ -1671,7 +1671,7 @@ var getWeather = CopilotTool.DefineTool(
16711671
await using var client = new CopilotClient();
16721672
await using var session = await client.CreateSessionAsync(new SessionConfig
16731673
{
1674-
Model = "gpt-5.4",
1674+
Model = "auto",
16751675
OnPermissionRequest = PermissionHandler.ApproveAll,
16761676
Streaming = true,
16771677
Tools = [getWeather]
@@ -1765,7 +1765,7 @@ public class WeatherAssistant {
17651765

17661766
var session = client.createSession(
17671767
new SessionConfig()
1768-
.setModel("gpt-5.4")
1768+
.setModel("auto")
17691769
.setStreaming(true)
17701770
.setOnPermissionRequest(request ->
17711771
CompletableFuture.completedFuture(PermissionDecision.allow())

docs/hooks/post-tool-use.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
The `onPostToolUse` hook is called **after** a tool executes **successfully**. Use it to:
44

5-
- Transform or filter tool results
6-
- Log tool execution for auditing
7-
- Add context based on results
8-
- Suppress results from the conversation
5+
* Transform or filter tool results
6+
* Log tool execution for auditing
7+
* Add context based on results
8+
* Suppress results from the conversation
99

1010
> **Failure variant**`onPostToolUse` only fires for successful tool executions. To observe **failed** tool calls, register `onPostToolUseFailure` (`on_post_tool_use_failure` in Python, `OnPostToolUseFailure` in Go/.NET, `on_post_tool_use_failure` in Rust). The handler receives `{ sessionId, toolName, toolArgs, error, timestamp, workingDirectory }` — the `error` field is a string extracted from the tool's failure result — and may return `{ additionalContext: string }` to inject extra guidance for the model (e.g. retry hints). See the [hooks overview](./hooks-overview.md) for the full list.
1111
> <a id="failure-variant"></a>
@@ -507,6 +507,6 @@ const session = await client.createSession({
507507

508508
## See also
509509

510-
- [Hooks Overview](./README.md)
511-
- [Pre-Tool Use Hook](./pre-tool-use.md)
512-
- [Error Handling Hook](./error-handling.md)
510+
* [Hooks Overview](./README.md)
511+
* [Pre-Tool Use Hook](./pre-tool-use.md)
512+
* [Error Handling Hook](./error-handling.md)

docs/setup/azure-managed-identity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ class ManagedIdentityCopilotAgent:
240240

241241
| Variable | Description | Example |
242242
|----------|-------------|---------|
243-
| `AZURE_TOKEN_CREDENTIALS` | When running in **Azure**, set it to `ManagedIdentityCredential`. When running **locally**, set it to either `dev` or a developer tool credential name, such as `AzureCliCredential`. | |
243+
| `AZURE_TOKEN_CREDENTIALS` | When running in **Azure**, set it to `ManagedIdentityCredential`. When running **locally**, set it to either `dev` or a developer tool credential name, such as `AzureCliCredential`. | `ManagedIdentityCredential` |
244244
| `FOUNDRY_RESOURCE_URL` | Your Microsoft Foundry resource URL | `https://<my-resource>.openai.azure.com` |
245245

246246
No API key environment variable is needed—authentication is handled by `DefaultAzureCredential`, which automatically supports:

0 commit comments

Comments
 (0)