Skip to content

Commit 0b117c1

Browse files
github-actions[bot]stephentoubCopilot
authored
Update @github/copilot to 1.0.64-3 (#1752)
* Update @github/copilot to 1.0.64-3 - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code * Fix CI failures for Copilot update Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Java account users RPC generation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Rust model billing test Use the non-deprecated maxPromptTokens field in the Rust model billing test so clippy does not fail on deprecated generated fields. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Stephen Toub <stoub@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 019e089 commit 0b117c1

51 files changed

Lines changed: 5241 additions & 3417 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dotnet/src/Client.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1648,6 +1648,11 @@ private static string FormatCliExitedMessage(string message, string stderrOutput
16481648
Message = "CopilotClient.ConnectToServerAsync connecting to CLI server. Host={Host}, Port={Port}")]
16491649
private static partial void LogConnectingToCliServer(ILogger logger, string host, int port);
16501650

1651+
[LoggerMessage(
1652+
Level = LogLevel.Warning,
1653+
Message = "[CLI] {Line}")]
1654+
private static partial void LogCliStderrLine(ILogger logger, string line);
1655+
16511656
private static IOException CreateCliExitedException(string message, StringBuilder stderrBuffer)
16521657
{
16531658
string stderrOutput;
@@ -2324,7 +2329,7 @@ private async Task PumpAsync(Process process, ILogger logger, CancellationToken
23242329
Buffer.AppendLine(line);
23252330
}
23262331

2327-
logger.LogWarning("[CLI] {Line}", line);
2332+
LogCliStderrLine(logger, line);
23282333
}
23292334
}
23302335
catch (Exception e) when (cancellationToken.IsCancellationRequested

dotnet/src/Generated/Rpc.cs

Lines changed: 2473 additions & 2235 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dotnet/src/Generated/SessionEvents.cs

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dotnet/src/JsonRpc.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ private void HandleResponse(JsonElement message, JsonElement idProp)
470470
}
471471
catch (Exception ex)
472472
{
473-
_logger.LogWarning(ex, "Inline response callback for request {RequestId} threw", id);
473+
LogInlineResponseCallbackThrew(_logger, ex, id);
474474
pending.TrySetException(ex);
475475
return;
476476
}
@@ -935,6 +935,11 @@ private sealed class CancelRequestParams
935935
public long Id { get; set; }
936936
}
937937

938+
[LoggerMessage(
939+
Level = LogLevel.Warning,
940+
Message = "Inline response callback for request {RequestId} threw")]
941+
private static partial void LogInlineResponseCallbackThrew(ILogger logger, Exception exception, long requestId);
942+
938943
[JsonSerializable(typeof(CancelRequestParams))]
939944
private partial class CancelRequestParamsContext : JsonSerializerContext;
940945
}

dotnet/test/Unit/SerializationTests.cs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,17 @@ public void ModelBilling_CanSerializeTokenPrices_WithSdkOptions()
8383
{
8484
InputPrice = 2.0,
8585
OutputPrice = 8.0,
86-
CachePrice = 0.5,
86+
CacheReadPrice = 0.5,
87+
CacheWritePrice = 0.75,
8788
BatchSize = 1_000_000L,
88-
ContextMax = 128_000L,
89+
MaxPromptTokens = 128_000L,
8990
LongContext = new GitHub.Copilot.Rpc.ModelBillingTokenPricesLongContext
9091
{
9192
InputPrice = 4.0,
9293
OutputPrice = 16.0,
93-
CachePrice = 1.0,
94-
ContextMax = 1_000_000L
94+
CacheReadPrice = 1.0,
95+
CacheWritePrice = 1.25,
96+
MaxPromptTokens = 1_000_000L
9597
}
9698
}
9799
};
@@ -103,23 +105,25 @@ public void ModelBilling_CanSerializeTokenPrices_WithSdkOptions()
103105
var tokenPrices = root.GetProperty("tokenPrices");
104106
Assert.Equal(2.0, tokenPrices.GetProperty("inputPrice").GetDouble());
105107
Assert.Equal(8.0, tokenPrices.GetProperty("outputPrice").GetDouble());
106-
Assert.Equal(0.5, tokenPrices.GetProperty("cachePrice").GetDouble());
108+
Assert.Equal(0.5, tokenPrices.GetProperty("cacheReadPrice").GetDouble());
109+
Assert.Equal(0.75, tokenPrices.GetProperty("cacheWritePrice").GetDouble());
107110
Assert.Equal(1_000_000L, tokenPrices.GetProperty("batchSize").GetInt64());
108-
Assert.Equal(128_000L, tokenPrices.GetProperty("contextMax").GetInt64());
111+
Assert.Equal(128_000L, tokenPrices.GetProperty("maxPromptTokens").GetInt64());
109112
var longContext = tokenPrices.GetProperty("longContext");
110113
Assert.Equal(4.0, longContext.GetProperty("inputPrice").GetDouble());
111-
Assert.Equal(1_000_000L, longContext.GetProperty("contextMax").GetInt64());
114+
Assert.Equal(1.25, longContext.GetProperty("cacheWritePrice").GetDouble());
115+
Assert.Equal(1_000_000L, longContext.GetProperty("maxPromptTokens").GetInt64());
112116

113117
var deserialized = JsonSerializer.Deserialize<ModelBilling>(json, options);
114118
Assert.NotNull(deserialized);
115119
Assert.Equal(1.5, deserialized.Multiplier);
116120
Assert.NotNull(deserialized.TokenPrices);
117121
Assert.Equal(2.0, deserialized.TokenPrices.InputPrice);
118122
Assert.Equal(1_000_000L, deserialized.TokenPrices.BatchSize);
119-
Assert.Equal(128_000L, deserialized.TokenPrices.ContextMax);
123+
Assert.Equal(128_000L, deserialized.TokenPrices.MaxPromptTokens);
120124
Assert.NotNull(deserialized.TokenPrices.LongContext);
121125
Assert.Equal(16.0, deserialized.TokenPrices.LongContext.OutputPrice);
122-
Assert.Equal(1_000_000L, deserialized.TokenPrices.LongContext.ContextMax);
126+
Assert.Equal(1_000_000L, deserialized.TokenPrices.LongContext.MaxPromptTokens);
123127
}
124128

125129
[Fact]

0 commit comments

Comments
 (0)