Skip to content

Commit a0b15a0

Browse files
authored
Merge remote-tracking branch 'origin/main' into frg/e2e-only-snapshots
2 parents 7a9112c + c39a129 commit a0b15a0

20 files changed

Lines changed: 213 additions & 114 deletions

.github/workflows/dotnet-sdk-tests.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@ on:
88
- 'nodejs/package.json'
99
- '.github/workflows/dotnet-sdk-tests.yml'
1010
- '.github/actions/setup-copilot/**'
11-
paths-ignore:
12-
- '**/*.md'
13-
- '**/LICENSE*'
14-
- '**/.gitignore'
15-
- '**/.editorconfig'
16-
- '**/*.png'
17-
- '**/*.jpg'
18-
- '**/*.jpeg'
19-
- '**/*.gif'
20-
- '**/*.svg'
11+
- '!**/*.md'
12+
- '!**/LICENSE*'
13+
- '!**/.gitignore'
14+
- '!**/.editorconfig'
15+
- '!**/*.png'
16+
- '!**/*.jpg'
17+
- '!**/*.jpeg'
18+
- '!**/*.gif'
19+
- '!**/*.svg'
2120
workflow_dispatch:
2221
merge_group:
2322

.github/workflows/go-sdk-tests.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@ on:
88
- 'nodejs/package.json'
99
- '.github/workflows/go-sdk-tests.yml'
1010
- '.github/actions/setup-copilot/**'
11-
paths-ignore:
12-
- '**/*.md'
13-
- '**/LICENSE*'
14-
- '**/.gitignore'
15-
- '**/.editorconfig'
16-
- '**/*.png'
17-
- '**/*.jpg'
18-
- '**/*.jpeg'
19-
- '**/*.gif'
20-
- '**/*.svg'
11+
- '!**/*.md'
12+
- '!**/LICENSE*'
13+
- '!**/.gitignore'
14+
- '!**/.editorconfig'
15+
- '!**/*.png'
16+
- '!**/*.jpg'
17+
- '!**/*.jpeg'
18+
- '!**/*.gif'
19+
- '!**/*.svg'
2120
workflow_dispatch:
2221
merge_group:
2322

.github/workflows/nodejs-sdk-tests.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@ on:
1010
- 'test/**'
1111
- '.github/workflows/nodejs-sdk-tests.yml'
1212
- '.github/actions/setup-copilot/**'
13-
paths-ignore:
14-
- '**/*.md'
15-
- '**/LICENSE*'
16-
- '**/.gitignore'
17-
- '**/.editorconfig'
18-
- '**/*.png'
19-
- '**/*.jpg'
20-
- '**/*.jpeg'
21-
- '**/*.gif'
22-
- '**/*.svg'
13+
- '!**/*.md'
14+
- '!**/LICENSE*'
15+
- '!**/.gitignore'
16+
- '!**/.editorconfig'
17+
- '!**/*.png'
18+
- '!**/*.jpg'
19+
- '!**/*.jpeg'
20+
- '!**/*.gif'
21+
- '!**/*.svg'
2322
workflow_dispatch:
2423
merge_group:
2524

.github/workflows/python-sdk-tests.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ on:
1111
- 'nodejs/package.json'
1212
- '.github/workflows/python-sdk-tests.yml'
1313
- '.github/actions/setup-copilot/**'
14-
paths-ignore:
15-
- '**/*.md'
16-
- '**/LICENSE*'
17-
- '**/.gitignore'
18-
- '**/.editorconfig'
19-
- '**/*.png'
20-
- '**/*.jpg'
21-
- '**/*.jpeg'
22-
- '**/*.gif'
23-
- '**/*.svg'
14+
- '!**/*.md'
15+
- '!**/LICENSE*'
16+
- '!**/.gitignore'
17+
- '!**/.editorconfig'
18+
- '!**/*.png'
19+
- '!**/*.jpg'
20+
- '!**/*.jpeg'
21+
- '!**/*.gif'
22+
- '!**/*.svg'
2423
workflow_dispatch:
2524
merge_group:
2625

dotnet/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Create a new conversation session.
9393

9494
- `SessionId` - Custom session ID
9595
- `Model` - Model to use ("gpt-5", "claude-sonnet-4.5", etc.)
96+
- `ReasoningEffort` - Reasoning effort level for models that support it ("low", "medium", "high", "xhigh"). Use `ListModelsAsync()` to check which models support this option.
9697
- `Tools` - Custom tools exposed to the CLI
9798
- `SystemMessage` - System message customization
9899
- `AvailableTools` - List of tool names to allow

dotnet/src/Client.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ public async Task<CopilotSession> CreateSessionAsync(SessionConfig? config = nul
347347
var request = new CreateSessionRequest(
348348
config?.Model,
349349
config?.SessionId,
350+
config?.ReasoningEffort,
350351
config?.Tools?.Select(ToolDefinition.FromAIFunction).ToList(),
351352
config?.SystemMessage,
352353
config?.AvailableTools,
@@ -428,6 +429,7 @@ public async Task<CopilotSession> ResumeSessionAsync(string sessionId, ResumeSes
428429

429430
var request = new ResumeSessionRequest(
430431
sessionId,
432+
config?.ReasoningEffort,
431433
config?.Tools?.Select(ToolDefinition.FromAIFunction).ToList(),
432434
config?.Provider,
433435
config?.OnPermissionRequest != null ? true : null,
@@ -1090,6 +1092,7 @@ public static string Escape(string arg)
10901092
internal record CreateSessionRequest(
10911093
string? Model,
10921094
string? SessionId,
1095+
string? ReasoningEffort,
10931096
List<ToolDefinition>? Tools,
10941097
SystemMessageConfig? SystemMessage,
10951098
List<string>? AvailableTools,
@@ -1122,6 +1125,7 @@ internal record CreateSessionResponse(
11221125

11231126
internal record ResumeSessionRequest(
11241127
string SessionId,
1128+
string? ReasoningEffort,
11251129
List<ToolDefinition>? Tools,
11261130
ProviderConfig? Provider,
11271131
bool? RequestPermission,

dotnet/src/Types.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,13 @@ public class SessionConfig
692692
public string? SessionId { get; set; }
693693
public string? Model { get; set; }
694694

695+
/// <summary>
696+
/// Reasoning effort level for models that support it.
697+
/// Valid values: "low", "medium", "high", "xhigh".
698+
/// Only applies to models where capabilities.supports.reasoningEffort is true.
699+
/// </summary>
700+
public string? ReasoningEffort { get; set; }
701+
695702
/// <summary>
696703
/// Override the default configuration directory location.
697704
/// When specified, the session will use this directory for storing config and state.
@@ -766,6 +773,12 @@ public class ResumeSessionConfig
766773
public ICollection<AIFunction>? Tools { get; set; }
767774
public ProviderConfig? Provider { get; set; }
768775

776+
/// <summary>
777+
/// Reasoning effort level for models that support it.
778+
/// Valid values: "low", "medium", "high", "xhigh".
779+
/// </summary>
780+
public string? ReasoningEffort { get; set; }
781+
769782
/// <summary>
770783
/// Handler for permission requests from the server.
771784
/// When provided, the server will call this handler to request permission for operations.
@@ -930,6 +943,12 @@ public class ModelSupports
930943
{
931944
[JsonPropertyName("vision")]
932945
public bool Vision { get; set; }
946+
947+
/// <summary>
948+
/// Whether this model supports reasoning effort configuration.
949+
/// </summary>
950+
[JsonPropertyName("reasoningEffort")]
951+
public bool ReasoningEffort { get; set; }
933952
}
934953

935954
/// <summary>
@@ -989,6 +1008,14 @@ public class ModelInfo
9891008
/// <summary>Billing information</summary>
9901009
[JsonPropertyName("billing")]
9911010
public ModelBilling? Billing { get; set; }
1011+
1012+
/// <summary>Supported reasoning effort levels (only present if model supports reasoning effort)</summary>
1013+
[JsonPropertyName("supportedReasoningEfforts")]
1014+
public List<string>? SupportedReasoningEfforts { get; set; }
1015+
1016+
/// <summary>Default reasoning effort level (only present if model supports reasoning effort)</summary>
1017+
[JsonPropertyName("defaultReasoningEffort")]
1018+
public string? DefaultReasoningEffort { get; set; }
9921019
}
9931020

9941021
/// <summary>

go/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ func main() {
102102
**SessionConfig:**
103103

104104
- `Model` (string): Model to use ("gpt-5", "claude-sonnet-4.5", etc.). **Required when using custom provider.**
105+
- `ReasoningEffort` (string): Reasoning effort level for models that support it ("low", "medium", "high", "xhigh"). Use `ListModels()` to check which models support this option.
105106
- `SessionID` (string): Custom session ID
106107
- `Tools` ([]Tool): Custom tools exposed to the CLI
107108
- `SystemMessage` (\*SystemMessageConfig): System message configuration
@@ -114,6 +115,7 @@ func main() {
114115
**ResumeSessionConfig:**
115116

116117
- `Tools` ([]Tool): Tools to expose when resuming
118+
- `ReasoningEffort` (string): Reasoning effort level for models that support it
117119
- `Provider` (\*ProviderConfig): Custom API provider configuration (BYOK). See [Custom Providers](#custom-providers) section.
118120
- `Streaming` (bool): Enable streaming delta events
119121

go/client.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,9 @@ func (c *Client) CreateSession(config *SessionConfig) (*Session, error) {
461461
if config.SessionID != "" {
462462
params["sessionId"] = config.SessionID
463463
}
464+
if config.ReasoningEffort != "" {
465+
params["reasoningEffort"] = config.ReasoningEffort
466+
}
464467
if len(config.Tools) > 0 {
465468
toolDefs := make([]map[string]interface{}, 0, len(config.Tools))
466469
for _, tool := range config.Tools {
@@ -670,6 +673,9 @@ func (c *Client) ResumeSessionWithOptions(sessionID string, config *ResumeSessio
670673
}
671674

672675
if config != nil {
676+
if config.ReasoningEffort != "" {
677+
params["reasoningEffort"] = config.ReasoningEffort
678+
}
673679
if len(config.Tools) > 0 {
674680
toolDefs := make([]map[string]interface{}, 0, len(config.Tools))
675681
for _, tool := range config.Tools {

go/types.go

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,10 @@ type SessionConfig struct {
322322
SessionID string
323323
// Model to use for this session
324324
Model string
325+
// ReasoningEffort level for models that support it.
326+
// Valid values: "low", "medium", "high", "xhigh"
327+
// Only applies to models where capabilities.supports.reasoningEffort is true.
328+
ReasoningEffort string
325329
// ConfigDir overrides the default configuration directory location.
326330
// When specified, the session will use this directory for storing config and state.
327331
ConfigDir string
@@ -399,6 +403,9 @@ type ResumeSessionConfig struct {
399403
Tools []Tool
400404
// Provider configures a custom model provider
401405
Provider *ProviderConfig
406+
// ReasoningEffort level for models that support it.
407+
// Valid values: "low", "medium", "high", "xhigh"
408+
ReasoningEffort string
402409
// OnPermissionRequest is a handler for permission requests from the server
403410
OnPermissionRequest PermissionHandler
404411
// OnUserInputRequest is a handler for user input requests from the agent (enables ask_user tool)
@@ -523,7 +530,8 @@ type ModelLimits struct {
523530

524531
// ModelSupports contains model support flags
525532
type ModelSupports struct {
526-
Vision bool `json:"vision"`
533+
Vision bool `json:"vision"`
534+
ReasoningEffort bool `json:"reasoningEffort"`
527535
}
528536

529537
// ModelCapabilities contains model capabilities and limits
@@ -545,11 +553,13 @@ type ModelBilling struct {
545553

546554
// ModelInfo contains information about an available model
547555
type ModelInfo struct {
548-
ID string `json:"id"`
549-
Name string `json:"name"`
550-
Capabilities ModelCapabilities `json:"capabilities"`
551-
Policy *ModelPolicy `json:"policy,omitempty"`
552-
Billing *ModelBilling `json:"billing,omitempty"`
556+
ID string `json:"id"`
557+
Name string `json:"name"`
558+
Capabilities ModelCapabilities `json:"capabilities"`
559+
Policy *ModelPolicy `json:"policy,omitempty"`
560+
Billing *ModelBilling `json:"billing,omitempty"`
561+
SupportedReasoningEfforts []string `json:"supportedReasoningEfforts,omitempty"`
562+
DefaultReasoningEffort string `json:"defaultReasoningEffort,omitempty"`
553563
}
554564

555565
// GetModelsResponse is the response from models.list

0 commit comments

Comments
 (0)