Skip to content

Commit edbe6c6

Browse files
github-actions[bot]stephentoubCopilot
authored
Update @github/copilot to 1.0.71-0 (#1968)
* Update @github/copilot to 1.0.71-0 - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code * Fix Java billing coverage test Exercise the new promotion field when constructing ModelBilling. Generated by Copilot Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 93b921d6-55b4-4fdc-9583-17a69ad39d54 --------- 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 App <223556219+Copilot@users.noreply.github.com>
1 parent 67412a2 commit edbe6c6

16 files changed

Lines changed: 311 additions & 117 deletions

File tree

dotnet/src/Generated/Rpc.cs

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

go/rpc/zrpc.go

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

java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
DO NOT EDIT MANUALLY. Updated by the update-copilot-dependency
8787
workflow.
8888
-->
89-
<readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>^1.0.70</readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>
89+
<readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>^1.0.71-0</readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>
9090

9191
</properties>
9292

java/scripts/codegen/package-lock.json

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

java/scripts/codegen/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"generate:java": "tsx java.ts"
88
},
99
"dependencies": {
10-
"@github/copilot": "^1.0.70",
10+
"@github/copilot": "^1.0.71-0",
1111
"json-schema": "^0.4.0",
1212
"tsx": "^4.22.4"
1313
}

java/src/generated/java/com/github/copilot/generated/rpc/ModelBilling.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public record ModelBilling(
2626
/** Token-level pricing information for this model */
2727
@JsonProperty("tokenPrices") ModelBillingTokenPrices tokenPrices,
2828
/** Whole-number percentage discount (0-100) applied to usage billed through this model. Populated for the synthetic `auto` model, where requests routed by auto-mode are billed at a reduced rate; absent for concrete models. */
29-
@JsonProperty("discountPercent") Long discountPercent
29+
@JsonProperty("discountPercent") Long discountPercent,
30+
/** Active server-driven promotion for this model, if any. Present when the model is being promoted with a time-boxed discount. */
31+
@JsonProperty("promo") ModelBillingPromo promo
3032
) {
3133
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
*--------------------------------------------------------------------------------------------*/
4+
5+
// AUTO-GENERATED FILE - DO NOT EDIT
6+
// Generated from: api.schema.json
7+
8+
package com.github.copilot.generated.rpc;
9+
10+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
11+
import com.fasterxml.jackson.annotation.JsonInclude;
12+
import com.fasterxml.jackson.annotation.JsonProperty;
13+
import javax.annotation.processing.Generated;
14+
15+
/**
16+
* Active server-driven promotion for a model, including its discount and expiry.
17+
*
18+
* @since 1.0.0
19+
*/
20+
@javax.annotation.processing.Generated("copilot-sdk-codegen")
21+
@JsonInclude(JsonInclude.Include.NON_NULL)
22+
@JsonIgnoreProperties(ignoreUnknown = true)
23+
public record ModelBillingPromo(
24+
/** Stable identifier for the promotion campaign. */
25+
@JsonProperty("id") String id,
26+
/** Percentage discount (0-100) applied while the promotion is active. May be fractional. */
27+
@JsonProperty("discountPercent") Double discountPercent,
28+
/** UTC ISO 8601 timestamp marking when the promotion ends. Always present: the API only surfaces a promo whose expiry parses and is in the future. Consumers should treat a past value as expired. */
29+
@JsonProperty("endsAt") String endsAt,
30+
/** Human-readable promotion message. Does not include the expiry timestamp; consumers may format endsAt and append it. */
31+
@JsonProperty("message") String message
32+
) {
33+
}

java/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,8 @@ void modelsListResult_nested() {
804804
var limits = new ModelCapabilitiesLimits(100000L, 8192L, 128000L, null);
805805
var capabilities = new ModelCapabilities(supports, limits);
806806
var policy = new ModelPolicy(ModelPolicyState.ENABLED, null);
807-
var billing = new ModelBilling(1.0, null, null);
807+
var promo = new ModelBillingPromo("summer-2026", 25.0, "2026-08-01T00:00:00Z", "Summer discount");
808+
var billing = new ModelBilling(1.0, null, null, promo);
808809
var modelItem = new Model("gpt-5", "GPT-5", capabilities, policy, billing, null, null, null, null);
809810
var result = new ModelsListResult(List.of(modelItem));
810811

@@ -816,6 +817,10 @@ void modelsListResult_nested() {
816817
assertEquals(100000L, result.models().get(0).capabilities().limits().maxPromptTokens());
817818
assertEquals(ModelPolicyState.ENABLED, result.models().get(0).policy().state());
818819
assertEquals(Double.valueOf(1.0), result.models().get(0).billing().multiplier());
820+
assertEquals("summer-2026", result.models().get(0).billing().promo().id());
821+
assertEquals(Double.valueOf(25.0), result.models().get(0).billing().promo().discountPercent());
822+
assertEquals("2026-08-01T00:00:00Z", result.models().get(0).billing().promo().endsAt());
823+
assertEquals("Summer discount", result.models().get(0).billing().promo().message());
819824
}
820825

821826
@Test

0 commit comments

Comments
 (0)