Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/auth/byok.md
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ import { CopilotClient } from "@github/copilot-sdk";

const client = new CopilotClient();
const session = await client.createSession({
model: "gpt-4.1",
model: "gpt-5.4",
provider: {
type: "azure",
baseUrl: "https://my-resource.openai.azure.com",
Expand Down Expand Up @@ -560,7 +560,7 @@ import { CopilotClient } from "@github/copilot-sdk";

const client = new CopilotClient();
const session = await client.createSession({
model: "gpt-4.1",
model: "gpt-5.4",
provider: {
type: "openai",
baseUrl: "https://your-resource.openai.azure.com/openai/v1/",
Expand Down
14 changes: 7 additions & 7 deletions docs/features/custom-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const client = new CopilotClient();
await client.start();

const session = await client.createSession({
model: "gpt-4.1",
model: "gpt-5.4",
customAgents: [
{
name: "researcher",
Expand Down Expand Up @@ -71,7 +71,7 @@ await client.start()

session = await client.create_session(
on_permission_request=lambda req, inv: PermissionDecisionApproveOnce(),
model="gpt-4.1",
model="gpt-5.4",
custom_agents=[
{
"name": "researcher",
Expand Down Expand Up @@ -112,7 +112,7 @@ func main() {
client.Start(ctx)

session, _ := client.CreateSession(ctx, &copilot.SessionConfig{
Model: "gpt-4.1",
Model: "gpt-5.4",
CustomAgents: []copilot.CustomAgentConfig{
{
Name: "researcher",
Expand Down Expand Up @@ -144,7 +144,7 @@ client := copilot.NewClient(nil)
client.Start(ctx)

session, _ := client.CreateSession(ctx, &copilot.SessionConfig{
Model: "gpt-4.1",
Model: "gpt-5.4",
CustomAgents: []copilot.CustomAgentConfig{
{
Name: "researcher",
Expand Down Expand Up @@ -179,7 +179,7 @@ using GitHub.Copilot.Rpc;
await using var client = new CopilotClient();
await using var session = await client.CreateSessionAsync(new SessionConfig
{
Model = "gpt-4.1",
Model = "gpt-5.4",
CustomAgents = new List<CustomAgentConfig>
{
new()
Expand Down Expand Up @@ -219,7 +219,7 @@ try (var client = new CopilotClient()) {

var session = client.createSession(
new SessionConfig()
.setModel("gpt-4.1")
.setModel("gpt-5.4")
.setCustomAgents(List.of(
new CustomAgentConfig()
.setName("researcher")
Expand Down Expand Up @@ -529,7 +529,7 @@ func main() {
client.Start(ctx)

session, _ := client.CreateSession(ctx, &copilot.SessionConfig{
Model: "gpt-4.1",
Model: "gpt-5.4",
OnPermissionRequest: func(req copilot.PermissionRequest, inv copilot.PermissionInvocation) (rpc.PermissionDecision, error) {
return &rpc.PermissionDecisionApproveOnce{}, nil
},
Expand Down
24 changes: 12 additions & 12 deletions docs/features/image-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const client = new CopilotClient();
await client.start();

const session = await client.createSession({
model: "gpt-4.1",
model: "gpt-5.4",
onPermissionRequest: async () => ({ kind: "approve-once" }),
});

Expand Down Expand Up @@ -75,7 +75,7 @@ await client.start()

session = await client.create_session(
on_permission_request=lambda req, inv: PermissionDecisionApproveOnce(),
model="gpt-4.1",
model="gpt-5.4",
)

await session.send(
Expand Down Expand Up @@ -110,7 +110,7 @@ func main() {
client.Start(ctx)

session, _ := client.CreateSession(ctx, &copilot.SessionConfig{
Model: "gpt-4.1",
Model: "gpt-5.4",
OnPermissionRequest: func(req copilot.PermissionRequest, inv copilot.PermissionInvocation) (rpc.PermissionDecision, error) {
return &rpc.PermissionDecisionApproveOnce{}, nil
},
Expand All @@ -136,7 +136,7 @@ client := copilot.NewClient(nil)
client.Start(ctx)

session, _ := client.CreateSession(ctx, &copilot.SessionConfig{
Model: "gpt-4.1",
Model: "gpt-5.4",
OnPermissionRequest: func(req copilot.PermissionRequest, inv copilot.PermissionInvocation) (rpc.PermissionDecision, error) {
return &rpc.PermissionDecisionApproveOnce{}, nil
},
Expand Down Expand Up @@ -171,7 +171,7 @@ public static class ImageInputExample
await using var client = new CopilotClient();
await using var session = await client.CreateSessionAsync(new SessionConfig
{
Model = "gpt-4.1",
Model = "gpt-5.4",
OnPermissionRequest = (req, inv) =>
Task.FromResult(PermissionDecision.ApproveOnce()),
});
Expand Down Expand Up @@ -200,7 +200,7 @@ using GitHub.Copilot.Rpc;
await using var client = new CopilotClient();
await using var session = await client.CreateSessionAsync(new SessionConfig
{
Model = "gpt-4.1",
Model = "gpt-5.4",
OnPermissionRequest = (req, inv) =>
Task.FromResult(PermissionDecision.ApproveOnce()),
});
Expand Down Expand Up @@ -234,7 +234,7 @@ try (var client = new CopilotClient()) {

var session = client.createSession(
new SessionConfig()
.setModel("gpt-4.1")
.setModel("gpt-5.4")
.setOnPermissionRequest(PermissionHandler.APPROVE_ALL)
).get();

Expand Down Expand Up @@ -263,7 +263,7 @@ const client = new CopilotClient();
await client.start();

const session = await client.createSession({
model: "gpt-4.1",
model: "gpt-5.4",
onPermissionRequest: async () => ({ kind: "approve-once" }),
});

Expand Down Expand Up @@ -294,7 +294,7 @@ await client.start()

session = await client.create_session(
on_permission_request=lambda req, inv: PermissionDecisionApproveOnce(),
model="gpt-4.1",
model="gpt-5.4",
)

base64_image_data = "..." # your base64-encoded image
Expand Down Expand Up @@ -332,7 +332,7 @@ func main() {
client.Start(ctx)

session, _ := client.CreateSession(ctx, &copilot.SessionConfig{
Model: "gpt-4.1",
Model: "gpt-5.4",
OnPermissionRequest: func(req copilot.PermissionRequest, inv copilot.PermissionInvocation) (rpc.PermissionDecision, error) {
return &rpc.PermissionDecisionApproveOnce{}, nil
},
Expand Down Expand Up @@ -387,7 +387,7 @@ public static class BlobAttachmentExample
await using var client = new CopilotClient();
await using var session = await client.CreateSessionAsync(new SessionConfig
{
Model = "gpt-4.1",
Model = "gpt-5.4",
OnPermissionRequest = (req, inv) =>
Task.FromResult(PermissionDecision.ApproveOnce()),
});
Expand Down Expand Up @@ -442,7 +442,7 @@ try (var client = new CopilotClient()) {

var session = client.createSession(
new SessionConfig()
.setModel("gpt-4.1")
.setModel("gpt-5.4")
.setOnPermissionRequest(PermissionHandler.APPROVE_ALL)
).get();

Expand Down
10 changes: 5 additions & 5 deletions docs/features/skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { CopilotClient } from "@github/copilot-sdk";

const client = new CopilotClient();
const session = await client.createSession({
model: "gpt-4.1",
model: "gpt-5.4",
skillDirectories: [
"./skills/code-review",
"./skills/documentation",
Expand All @@ -50,7 +50,7 @@ async def main():

session = await client.create_session(
on_permission_request=lambda req, inv: PermissionDecisionApproveOnce(),
model="gpt-4.1",
model="gpt-5.4",
skill_directories=[
"./skills/code-review",
"./skills/documentation",
Expand Down Expand Up @@ -87,7 +87,7 @@ func main() {
defer client.Stop()

session, err := client.CreateSession(ctx, &copilot.SessionConfig{
Model: "gpt-4.1",
Model: "gpt-5.4",
SkillDirectories: []string{
"./skills/code-review",
"./skills/documentation",
Expand Down Expand Up @@ -122,7 +122,7 @@ using GitHub.Copilot.Rpc;
await using var client = new CopilotClient();
await using var session = await client.CreateSessionAsync(new SessionConfig
{
Model = "gpt-4.1",
Model = "gpt-5.4",
SkillDirectories = new List<string>
{
"./skills/code-review",
Expand Down Expand Up @@ -154,7 +154,7 @@ try (var client = new CopilotClient()) {

var session = client.createSession(
new SessionConfig()
.setModel("gpt-4.1")
.setModel("gpt-5.4")
.setSkillDirectories(List.of(
"./skills/code-review",
"./skills/documentation"
Expand Down
24 changes: 12 additions & 12 deletions docs/features/steering-and-queueing.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const client = new CopilotClient();
await client.start();

const session = await client.createSession({
model: "gpt-4.1",
model: "gpt-5.4",
onPermissionRequest: async () => ({ kind: "approve-once" }),
});

Expand Down Expand Up @@ -77,7 +77,7 @@ async def main():

session = await client.create_session(
on_permission_request=lambda req, inv: PermissionDecisionApproveOnce(),
model="gpt-4.1",
model="gpt-5.4",
)

# Start a long-running task
Expand Down Expand Up @@ -118,7 +118,7 @@ func main() {
defer client.Stop()

session, err := client.CreateSession(ctx, &copilot.SessionConfig{
Model: "gpt-4.1",
Model: "gpt-5.4",
OnPermissionRequest: func(req copilot.PermissionRequest, inv copilot.PermissionInvocation) (rpc.PermissionDecision, error) {
return &rpc.PermissionDecisionApproveOnce{}, nil
},
Expand Down Expand Up @@ -158,7 +158,7 @@ using GitHub.Copilot.Rpc;
await using var client = new CopilotClient();
await using var session = await client.CreateSessionAsync(new SessionConfig
{
Model = "gpt-4.1",
Model = "gpt-5.4",
OnPermissionRequest = (req, inv) =>
Task.FromResult(PermissionDecision.ApproveOnce()),
});
Expand Down Expand Up @@ -191,7 +191,7 @@ try (var client = new CopilotClient()) {

var session = client.createSession(
new SessionConfig()
.setModel("gpt-4.1")
.setModel("gpt-5.4")
.setOnPermissionRequest(PermissionHandler.APPROVE_ALL)
).get();

Expand Down Expand Up @@ -234,7 +234,7 @@ const client = new CopilotClient();
await client.start();

const session = await client.createSession({
model: "gpt-4.1",
model: "gpt-5.4",
onPermissionRequest: async () => ({ kind: "approve-once" }),
});

Expand Down Expand Up @@ -269,7 +269,7 @@ async def main():

session = await client.create_session(
on_permission_request=lambda req, inv: PermissionDecisionApproveOnce(),
model="gpt-4.1",
model="gpt-5.4",
)

# Send an initial task
Expand Down Expand Up @@ -311,7 +311,7 @@ func main() {
client.Start(ctx)

session, _ := client.CreateSession(ctx, &copilot.SessionConfig{
Model: "gpt-4.1",
Model: "gpt-5.4",
OnPermissionRequest: func(req copilot.PermissionRequest, inv copilot.PermissionInvocation) (rpc.PermissionDecision, error) {
return &rpc.PermissionDecisionApproveOnce{}, nil
},
Expand Down Expand Up @@ -371,7 +371,7 @@ public static class QueueingExample
await using var client = new CopilotClient();
await using var session = await client.CreateSessionAsync(new SessionConfig
{
Model = "gpt-4.1",
Model = "gpt-5.4",
OnPermissionRequest = (req, inv) =>
Task.FromResult(PermissionDecision.ApproveOnce()),
});
Expand Down Expand Up @@ -434,7 +434,7 @@ try (var client = new CopilotClient()) {

var session = client.createSession(
new SessionConfig()
.setModel("gpt-4.1")
.setModel("gpt-5.4")
.setOnPermissionRequest(PermissionHandler.APPROVE_ALL)
).get();

Expand Down Expand Up @@ -475,7 +475,7 @@ You can use both patterns together in a single session. Steering affects the cur

```typescript
const session = await client.createSession({
model: "gpt-4.1",
model: "gpt-5.4",
onPermissionRequest: async () => ({ kind: "approve-once" }),
});

Expand Down Expand Up @@ -503,7 +503,7 @@ await session.send({
```python
session = await client.create_session(
on_permission_request=lambda req, inv: PermissionDecisionApproveOnce(),
model="gpt-4.1",
model="gpt-5.4",
)

# Start a task
Expand Down
4 changes: 2 additions & 2 deletions docs/features/streaming-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func main() {
client := copilot.NewClient(nil)

session, _ := client.CreateSession(ctx, &copilot.SessionConfig{
Model: "gpt-4.1",
Model: "gpt-5.4",
Streaming: copilot.Bool(true),
OnPermissionRequest: func(req copilot.PermissionRequest, inv copilot.PermissionInvocation) (rpc.PermissionDecision, error) {
return &rpc.PermissionDecisionApproveOnce{}, nil
Expand Down Expand Up @@ -306,7 +306,7 @@ Ephemeral. Token usage and cost information for an individual API call.

| Data Field | Type | Required | Description |
|------------|------|----------|-------------|
| `model` | `string` | ✅ | Model identifier (e.g., `"gpt-4.1"`) |
| `model` | `string` | ✅ | Model identifier (e.g., `"gpt-5.4"`) |
| `inputTokens` | `number` | | Input tokens consumed |
| `outputTokens` | `number` | | Output tokens produced |
| `cacheReadTokens` | `number` | | Tokens read from prompt cache |
Expand Down
Loading
Loading