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
8 changes: 4 additions & 4 deletions dotnet/src/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1775,15 +1775,15 @@ public async Task AbortAsync(CancellationToken cancellationToken = default)
/// Changes the model for this session.
/// The new model takes effect for the next message. Conversation history is preserved.
/// </summary>
/// <param name="model">Model ID to switch to (e.g., "gpt-4.1").</param>
/// <param name="model">Model ID to switch to (e.g., "gpt-5.4").</param>
/// <param name="reasoningEffort">Reasoning effort level (e.g., "low", "medium", "high", "xhigh").</param>
/// <param name="modelCapabilities">Per-property overrides for model capabilities, deep-merged over runtime defaults.</param>
/// <param name="cancellationToken">Optional cancellation token.</param>
/// <example>
/// <code>
/// await session.SetModelAsync("gpt-4.1");
/// await session.SetModelAsync("gpt-5.4");
/// await session.SetModelAsync("claude-sonnet-4.6", "high");
/// await session.SetModelAsync("gpt-4.1", new SetModelOptions { ContextTier = ContextTier.LongContext });
/// await session.SetModelAsync("gpt-5.4", new SetModelOptions { ContextTier = ContextTier.LongContext });
/// </code>
/// </example>
public Task SetModelAsync(string model, string? reasoningEffort, ModelCapabilitiesOverride? modelCapabilities = null, CancellationToken cancellationToken = default)
Expand All @@ -1802,7 +1802,7 @@ public Task SetModelAsync(string model, string? reasoningEffort, ModelCapabiliti
/// Changes the model for this session.
/// The new model takes effect for the next message. Conversation history is preserved.
/// </summary>
/// <param name="model">Model ID to switch to (e.g., "gpt-4.1").</param>
/// <param name="model">Model ID to switch to (e.g., "gpt-5.4").</param>
/// <param name="options">Settings for the new model.</param>
/// <param name="cancellationToken">Optional cancellation token.</param>
public async Task SetModelAsync(string model, SetModelOptions options, CancellationToken cancellationToken = default)
Expand Down
2 changes: 1 addition & 1 deletion go/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1752,7 +1752,7 @@ type SetModelOptions struct {
//
// Example:
//
// if err := session.SetModel(context.Background(), "gpt-4.1", nil); err != nil {
// if err := session.SetModel(context.Background(), "gpt-5.4", nil); err != nil {
// log.Printf("Failed to set model: %v", err)
// }
// if err := session.SetModel(context.Background(), "claude-sonnet-4.6", &SetModelOptions{ReasoningEffort: new("high")}); err != nil {
Expand Down
12 changes: 6 additions & 6 deletions java/src/main/java/com/github/copilot/CopilotSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -1945,12 +1945,12 @@ public CompletableFuture<Void> abort() {
* preserved.
*
* <pre>{@code
* session.setModel("gpt-4.1").get();
* session.setModel("gpt-5.4").get();
* session.setModel("claude-sonnet-4.6", "high").get();
* }</pre>
*
* @param model
* the model ID to switch to (e.g., {@code "gpt-4.1"})
* the model ID to switch to (e.g., {@code "gpt-5.4"})
* @param reasoningEffort
* reasoning effort level (e.g., {@code "low"}, {@code "medium"},
* {@code "high"}, {@code "xhigh"}); {@code null} to use default
Expand Down Expand Up @@ -1980,7 +1980,7 @@ public CompletableFuture<Void> setModel(String model, String reasoningEffort) {
* }</pre>
*
* @param model
* the model ID to switch to (e.g., {@code "gpt-4.1"})
* the model ID to switch to (e.g., {@code "gpt-5.4"})
* @param reasoningEffort
* reasoning effort level (e.g., {@code "low"}, {@code "medium"},
* {@code "high"}, {@code "xhigh"}); {@code null} to use default
Expand All @@ -2005,7 +2005,7 @@ public CompletableFuture<Void> setModel(String model, String reasoningEffort,
* preserved.
*
* @param model
* the model ID to switch to (e.g., {@code "gpt-4.1"})
* the model ID to switch to (e.g., {@code "gpt-5.4"})
* @param reasoningEffort
* reasoning effort level; {@code null} to use default
* @param reasoningSummary
Expand Down Expand Up @@ -2053,11 +2053,11 @@ public CompletableFuture<Void> setModel(String model, String reasoningEffort, St
* preserved.
*
* <pre>{@code
* session.setModel("gpt-4.1").get();
* session.setModel("gpt-5.4").get();
* }</pre>
*
* @param model
* the model ID to switch to (e.g., {@code "gpt-4.1"})
* the model ID to switch to (e.g., {@code "gpt-5.4"})
* @return a future that completes when the model switch is acknowledged
* @throws IllegalStateException
* if this session has been terminated
Expand Down
2 changes: 1 addition & 1 deletion java/src/main/java/com/github/copilot/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* try (var client = new CopilotClient()) {
* client.start().get();
*
* var session = client.createSession(new SessionConfig().setModel("gpt-4.1")).get();
* var session = client.createSession(new SessionConfig().setModel("gpt-5.4")).get();
*
* session.on(AssistantMessageEvent.class, msg -> {
* System.out.println(msg.getData().content());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
* <h2>Usage Example</h2>
*
* <pre>{@code
* var config = new SessionConfig().setModel("gpt-4.1").setStreaming(true)
* var config = new SessionConfig().setModel("gpt-5.4").setStreaming(true)
* .setSystemMessage(new SystemMessageConfig().setMode(SystemMessageMode.APPEND)
* .setContent("Be concise in your responses."))
* .setTools(List.of(ToolDefinition.create("my_tool", "Description", schema, handler)));
Expand Down
2 changes: 1 addition & 1 deletion nodejs/src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,7 @@ export class CopilotSession {
*
* @example
* ```typescript
* await session.setModel("gpt-4.1");
* await session.setModel("gpt-5.4");
* await session.setModel("claude-sonnet-4.6", { reasoningEffort: "high" });
* ```
*/
Expand Down
4 changes: 2 additions & 2 deletions python/copilot/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -2892,7 +2892,7 @@ async def set_model(
is preserved.

Args:
model: Model ID to switch to (e.g., "gpt-4.1", "claude-sonnet-4").
model: Model ID to switch to (e.g., "gpt-5.4", "claude-sonnet-4").
reasoning_effort: Optional reasoning effort level for the new model
(e.g., "low", "medium", "high", "xhigh").
reasoning_summary: Optional reasoning summary mode for supported
Expand All @@ -2906,7 +2906,7 @@ async def set_model(
Exception: If the session has been destroyed or the connection fails.

Example:
>>> await session.set_model("gpt-4.1")
>>> await session.set_model("gpt-5.4")
>>> await session.set_model("claude-sonnet-4.6", reasoning_effort="high")
"""
rpc_caps = None
Expand Down