Skip to content

Commit 5ff18ae

Browse files
committed
Fix model switch schema updates
Pass the new optional reasoning summary field through generated model switch calls so .NET and Rust compile against the updated Copilot runtime schema. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1dab4c4 commit 5ff18ae

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

dotnet/src/Session.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,7 @@ await InvokeRpcAsync<object>(
13201320
/// </example>
13211321
public async Task SetModelAsync(string model, string? reasoningEffort, ModelCapabilitiesOverride? modelCapabilities = null, CancellationToken cancellationToken = default)
13221322
{
1323-
await Rpc.Model.SwitchToAsync(model, reasoningEffort, modelCapabilities, cancellationToken);
1323+
await Rpc.Model.SwitchToAsync(model, reasoningEffort, reasoningSummary: null, modelCapabilities: modelCapabilities, cancellationToken: cancellationToken);
13241324
}
13251325

13261326
/// <summary>

rust/src/session.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@ impl Session {
483483
let request = ModelSwitchToRequest {
484484
model_id: model.to_string(),
485485
reasoning_effort: opts.reasoning_effort,
486+
reasoning_summary: None,
486487
model_capabilities: opts.model_capabilities,
487488
};
488489
self.rpc().model().switch_to(request).await?;

rust/tests/e2e/rpc_session_state.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ async fn should_call_session_rpc_model_switchto() {
6767
model_id: "gpt-4.1".to_string(),
6868
reasoning_effort: Some("high".to_string()),
6969
model_capabilities: None,
70+
reasoning_summary: None,
7071
})
7172
.await
7273
.expect("switch model");

0 commit comments

Comments
 (0)