Skip to content

Commit 5fa7e68

Browse files
Dharshika-11SteveSandersonMSCopilot
authored
Support reasoningEffort: max (#2228)
* feat: support reasoningEffort 'max' in SDK types and docs * Fix Java formatting Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3ce64a4 commit 5fa7e68

14 files changed

Lines changed: 24 additions & 20 deletions

File tree

dotnet/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Create a new conversation session.
123123

124124
- `SessionId` - Custom session ID
125125
- `Model` - Model to use ("gpt-5", "claude-sonnet-4.5", etc.)
126-
- `ReasoningEffort` - Reasoning effort level for models that support it ("low", "medium", "high", "xhigh"). Use `ListModelsAsync()` to check which models support this option.
126+
- `ReasoningEffort` - Reasoning effort level for models that support it ("low", "medium", "high", "xhigh", "max"). Use `ListModelsAsync()` to check which models support this option.
127127
- `Tools` - Custom tool declarations exposed to the CLI. Declarations without an invocable `AIFunction` are left pending for manual resolution.
128128
- `SystemMessage` - System message customization
129129
- `AvailableTools` - List of tool names to allow

dotnet/src/Session.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1790,7 +1790,7 @@ public async Task AbortAsync(CancellationToken cancellationToken = default)
17901790
/// The new model takes effect for the next message. Conversation history is preserved.
17911791
/// </summary>
17921792
/// <param name="model">Model ID to switch to (e.g., "gpt-5.4").</param>
1793-
/// <param name="reasoningEffort">Reasoning effort level (e.g., "low", "medium", "high", "xhigh").</param>
1793+
/// <param name="reasoningEffort">Reasoning effort level (e.g., "low", "medium", "high", "xhigh", "max").</param>
17941794
/// <param name="modelCapabilities">Per-property overrides for model capabilities, deep-merged over runtime defaults.</param>
17951795
/// <param name="cancellationToken">Optional cancellation token.</param>
17961796
/// <example>

dotnet/src/Types.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3110,7 +3110,7 @@ protected SessionConfigBase(SessionConfigBase? other)
31103110

31113111
/// <summary>
31123112
/// Reasoning effort level for models that support it.
3113-
/// Valid values: "low", "medium", "high", "xhigh".
3113+
/// Valid values: "low", "medium", "high", "xhigh", "max".
31143114
/// Only applies to models where capabilities.supports.reasoningEffort is true.
31153115
/// </summary>
31163116
public string? ReasoningEffort { get; set; }

go/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ Event types: `SessionLifecycleCreated`, `SessionLifecycleDeleted`, `SessionLifec
210210
**SessionConfig:**
211211

212212
- `Model` (string): Model to use ("gpt-5", "claude-sonnet-4.5", etc.). **Required when using custom provider.**
213-
- `ReasoningEffort` (string): Reasoning effort level for models that support it ("low", "medium", "high", "xhigh"). Use `ListModels()` to check which models support this option.
213+
- `ReasoningEffort` (string): Reasoning effort level for models that support it ("low", "medium", "high", "xhigh", "max"). Use `ListModels()` to check which models support this option.
214214
- `SessionID` (string): Custom session ID
215215
- `Tools` ([]Tool): Custom tools exposed to the CLI
216216
- `SystemMessage` (\*SystemMessageConfig): System message configuration. Supports three modes:

go/session.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1769,7 +1769,7 @@ func (s *Session) Abort(ctx context.Context) error {
17691769

17701770
// SetModelOptions configures optional parameters for SetModel.
17711771
type SetModelOptions struct {
1772-
// ReasoningEffort sets the reasoning effort level for the new model (e.g., "low", "medium", "high", "xhigh").
1772+
// ReasoningEffort sets the reasoning effort level for the new model (e.g., "low", "medium", "high", "xhigh", "max").
17731773
ReasoningEffort *string
17741774
// ReasoningSummary sets the reasoning summary mode for the new model.
17751775
// Use ReasoningSummaryNone to suppress summary output regardless of whether reasoning is enabled.

go/types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@ type SessionConfig struct {
11631163
// Model to use for this session
11641164
Model string
11651165
// ReasoningEffort level for models that support it.
1166-
// Valid values: "low", "medium", "high", "xhigh"
1166+
// Valid values: "low", "medium", "high", "xhigh", "max"
11671167
// Only applies to models where capabilities.supports.reasoningEffort is true.
11681168
ReasoningEffort string
11691169
// ReasoningSummary mode for models that support configurable reasoning summaries.
@@ -1721,7 +1721,7 @@ type ResumeSessionConfig struct {
17211721
// Only non-nil fields are applied over the runtime-resolved capabilities.
17221722
ModelCapabilities *rpc.ModelCapabilitiesOverride
17231723
// ReasoningEffort level for models that support it.
1724-
// Valid values: "low", "medium", "high", "xhigh"
1724+
// Valid values: "low", "medium", "high", "xhigh", "max"
17251725
ReasoningEffort string
17261726
// ReasoningSummary mode for models that support configurable reasoning summaries.
17271727
// Use ReasoningSummaryNone to suppress summary output regardless of whether reasoning is enabled.

java/src/main/java/com/github/copilot/CopilotSession.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,7 +1972,8 @@ public CompletableFuture<Void> abort() {
19721972
* the model ID to switch to (e.g., {@code "gpt-5.4"})
19731973
* @param reasoningEffort
19741974
* reasoning effort level (e.g., {@code "low"}, {@code "medium"},
1975-
* {@code "high"}, {@code "xhigh"}); {@code null} to use default
1975+
* {@code "high"}, {@code "xhigh"}, {@code "max"}); {@code null} to
1976+
* use default
19761977
* @return a future that completes when the model switch is acknowledged
19771978
* @throws IllegalStateException
19781979
* if this session has been terminated
@@ -2003,7 +2004,8 @@ public CompletableFuture<Void> setModel(String model, String reasoningEffort) {
20032004
* the model ID to switch to (e.g., {@code "gpt-5.4"})
20042005
* @param reasoningEffort
20052006
* reasoning effort level (e.g., {@code "low"}, {@code "medium"},
2006-
* {@code "high"}, {@code "xhigh"}); {@code null} to use default
2007+
* {@code "high"}, {@code "xhigh"}, {@code "max"}); {@code null} to
2008+
* use default
20072009
* @param modelCapabilities
20082010
* per-property overrides for model capabilities; {@code null} to use
20092011
* runtime defaults

java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,8 @@ public ResumeSessionConfig clearManageScheduleEnabled() {
685685
/**
686686
* Gets the reasoning effort level.
687687
*
688-
* @return the reasoning effort level ("low", "medium", "high", or "xhigh")
688+
* @return the reasoning effort level ("low", "medium", "high", "xhigh", or
689+
* "max")
689690
*/
690691
public String getReasoningEffort() {
691692
return reasoningEffort;
@@ -694,7 +695,7 @@ public String getReasoningEffort() {
694695
/**
695696
* Sets the reasoning effort level for models that support it.
696697
* <p>
697-
* Valid values: "low", "medium", "high", "xhigh".
698+
* Valid values: "low", "medium", "high", "xhigh", "max".
698699
*
699700
* @param reasoningEffort
700701
* the reasoning effort level

java/src/main/java/com/github/copilot/rpc/SessionConfig.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ public SessionConfig setModel(String model) {
180180
/**
181181
* Gets the reasoning effort level.
182182
*
183-
* @return the reasoning effort level ("low", "medium", "high", or "xhigh")
183+
* @return the reasoning effort level ("low", "medium", "high", "xhigh", or
184+
* "max")
184185
*/
185186
public String getReasoningEffort() {
186187
return reasoningEffort;
@@ -189,8 +190,8 @@ public String getReasoningEffort() {
189190
/**
190191
* Sets the reasoning effort level for models that support it.
191192
* <p>
192-
* Valid values: "low", "medium", "high", "xhigh". Only applies to models where
193-
* {@code capabilities.supports.reasoningEffort} is true.
193+
* Valid values: "low", "medium", "high", "xhigh", "max". Only applies to models
194+
* where {@code capabilities.supports.reasoningEffort} is true.
194195
*
195196
* @param reasoningEffort
196197
* the reasoning effort level

nodejs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Create a new conversation session.
131131

132132
- `sessionId?: string` - Custom session ID.
133133
- `model?: string` - Model to use ("gpt-5", "claude-sonnet-4.5", etc.). **Required when using custom provider.**
134-
- `reasoningEffort?: "low" | "medium" | "high" | "xhigh"` - Reasoning effort level for models that support it. Use `listModels()` to check which models support this option.
134+
- `reasoningEffort?: "low" | "medium" | "high" | "xhigh" | "max"` - Reasoning effort level for models that support it. Use `listModels()` to check which models support this option.
135135
- `tools?: Tool[]` - Custom tools exposed to the CLI. Tools without `handler` are declaration-only and must be resolved via pending tool-call RPCs.
136136
- `systemMessage?: SystemMessageConfig` - System message customization (see below)
137137
- `infiniteSessions?: InfiniteSessionConfig` - Configure automatic context compaction (see below)

0 commit comments

Comments
 (0)