diff --git a/dotnet/src/Generated/Rpc.cs b/dotnet/src/Generated/Rpc.cs
index b4e197094..54ec6d48f 100644
--- a/dotnet/src/Generated/Rpc.cs
+++ b/dotnet/src/Generated/Rpc.cs
@@ -6056,7 +6056,7 @@ public sealed class UsageMetricsModelMetric
/// Accumulated nano-AI units cost for this model.
[JsonPropertyName("totalNanoAiu")]
- public long? TotalNanoAiu { get; set; }
+ public double? TotalNanoAiu { get; set; }
/// Token usage metrics for this model.
[JsonPropertyName("usage")]
@@ -6111,7 +6111,7 @@ public sealed class UsageGetMetricsResult
/// Session-wide accumulated nano-AI units cost.
[JsonPropertyName("totalNanoAiu")]
- public long? TotalNanoAiu { get; set; }
+ public double? TotalNanoAiu { get; set; }
/// Total user-initiated premium request cost across all models (may be fractional due to multipliers).
[JsonPropertyName("totalPremiumRequestCost")]
diff --git a/dotnet/src/Generated/SessionEvents.cs b/dotnet/src/Generated/SessionEvents.cs
index 8a109040c..3a96bd610 100644
--- a/dotnet/src/Generated/SessionEvents.cs
+++ b/dotnet/src/Generated/SessionEvents.cs
@@ -1677,11 +1677,11 @@ public sealed partial class SessionShutdownData
/// Session-wide accumulated nano-AI units cost.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("totalNanoAiu")]
- public long? TotalNanoAiu { get; set; }
+ public double? TotalNanoAiu { get; set; }
/// Total number of premium API requests used during the session.
[JsonPropertyName("totalPremiumRequests")]
- public required long TotalPremiumRequests { get; set; }
+ public required double TotalPremiumRequests { get; set; }
}
/// Working directory and git context at session start.
@@ -3239,7 +3239,7 @@ public sealed partial class ShutdownModelMetric
/// Accumulated nano-AI units cost for this model.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("totalNanoAiu")]
- public long? TotalNanoAiu { get; set; }
+ public double? TotalNanoAiu { get; set; }
/// Token usage breakdown.
[JsonPropertyName("usage")]
@@ -3286,7 +3286,7 @@ public sealed partial class CompactionCompleteCompactionTokensUsedCopilotUsage
/// Total cost in nano-AI units for this request.
[JsonPropertyName("totalNanoAiu")]
- public required long TotalNanoAiu { get; set; }
+ public required double TotalNanoAiu { get; set; }
}
/// Token usage breakdown for the compaction LLM call (aligned with assistant.usage format).
@@ -3592,7 +3592,7 @@ public sealed partial class AssistantUsageCopilotUsage
/// Total cost in nano-AI units for this request.
[JsonPropertyName("totalNanoAiu")]
- public required long TotalNanoAiu { get; set; }
+ public required double TotalNanoAiu { get; set; }
}
/// Schema for the `AssistantUsageQuotaSnapshot` type.
diff --git a/go/internal/e2e/rpc_session_state_e2e_test.go b/go/internal/e2e/rpc_session_state_e2e_test.go
index b46095d70..8ac041255 100644
--- a/go/internal/e2e/rpc_session_state_e2e_test.go
+++ b/go/internal/e2e/rpc_session_state_e2e_test.go
@@ -473,7 +473,7 @@ func TestRpcSessionStateE2E(t *testing.T) {
t.Errorf("Expected non-zero sessionStartTime, got %s", metrics.SessionStartTime)
}
if metrics.TotalNanoAiu != nil && *metrics.TotalNanoAiu < 0 {
- t.Errorf("Expected non-negative totalNanoAiu, got %d", *metrics.TotalNanoAiu)
+ t.Errorf("Expected non-negative totalNanoAiu, got %f", *metrics.TotalNanoAiu)
}
for k, detail := range metrics.TokenDetails {
if detail.TokenCount < 0 {
@@ -482,7 +482,7 @@ func TestRpcSessionStateE2E(t *testing.T) {
}
for modelName, modelMetric := range metrics.ModelMetrics {
if modelMetric.TotalNanoAiu != nil && *modelMetric.TotalNanoAiu < 0 {
- t.Errorf("Expected non-negative totalNanoAiu for model %q, got %d", modelName, *modelMetric.TotalNanoAiu)
+ t.Errorf("Expected non-negative totalNanoAiu for model %q, got %f", modelName, *modelMetric.TotalNanoAiu)
}
for tokenType, detail := range modelMetric.TokenDetails {
if detail.TokenCount < 0 {
diff --git a/go/rpc/zrpc.go b/go/rpc/zrpc.go
index 6e607f9ca..510a31246 100644
--- a/go/rpc/zrpc.go
+++ b/go/rpc/zrpc.go
@@ -4846,7 +4846,7 @@ type UsageGetMetricsResult struct {
// Total time spent in model API calls (milliseconds)
TotalAPIDurationMs int64 `json:"totalApiDurationMs"`
// Session-wide accumulated nano-AI units cost
- TotalNanoAiu *int64 `json:"totalNanoAiu,omitempty"`
+ TotalNanoAiu *float64 `json:"totalNanoAiu,omitempty"`
// Total user-initiated premium request cost across all models (may be fractional due to
// multipliers)
TotalPremiumRequestCost float64 `json:"totalPremiumRequestCost"`
@@ -4877,7 +4877,7 @@ type UsageMetricsModelMetric struct {
// Token count details per type
TokenDetails map[string]UsageMetricsModelMetricTokenDetail `json:"tokenDetails,omitempty"`
// Accumulated nano-AI units cost for this model
- TotalNanoAiu *int64 `json:"totalNanoAiu,omitempty"`
+ TotalNanoAiu *float64 `json:"totalNanoAiu,omitempty"`
// Token usage metrics for this model
Usage UsageMetricsModelMetricUsage `json:"usage"`
}
diff --git a/go/rpc/zsession_events.go b/go/rpc/zsession_events.go
index 5cd1d2ae0..93ae9f476 100644
--- a/go/rpc/zsession_events.go
+++ b/go/rpc/zsession_events.go
@@ -1050,9 +1050,9 @@ type SessionShutdownData struct {
// Cumulative time spent in API calls during the session, in milliseconds
TotalAPIDurationMs int64 `json:"totalApiDurationMs"`
// Session-wide accumulated nano-AI units cost
- TotalNanoAiu *int64 `json:"totalNanoAiu,omitempty"`
+ TotalNanoAiu *float64 `json:"totalNanoAiu,omitempty"`
// Total number of premium API requests used during the session
- TotalPremiumRequests int64 `json:"totalPremiumRequests"`
+ TotalPremiumRequests float64 `json:"totalPremiumRequests"`
}
func (*SessionShutdownData) sessionEventData() {}
@@ -1465,7 +1465,7 @@ type AssistantUsageCopilotUsage struct {
// Itemized token usage breakdown
TokenDetails []AssistantUsageCopilotUsageTokenDetail `json:"tokenDetails"`
// Total cost in nano-AI units for this request
- TotalNanoAiu int64 `json:"totalNanoAiu"`
+ TotalNanoAiu float64 `json:"totalNanoAiu"`
}
// Token usage detail for a single billing category
@@ -1537,7 +1537,7 @@ type CompactionCompleteCompactionTokensUsedCopilotUsage struct {
// Itemized token usage breakdown
TokenDetails []CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail `json:"tokenDetails"`
// Total cost in nano-AI units for this request
- TotalNanoAiu int64 `json:"totalNanoAiu"`
+ TotalNanoAiu float64 `json:"totalNanoAiu"`
}
// Token usage detail for a single billing category
@@ -2225,7 +2225,7 @@ type ShutdownModelMetric struct {
// Token count details per type
TokenDetails map[string]ShutdownModelMetricTokenDetail `json:"tokenDetails,omitempty"`
// Accumulated nano-AI units cost for this model
- TotalNanoAiu *int64 `json:"totalNanoAiu,omitempty"`
+ TotalNanoAiu *float64 `json:"totalNanoAiu,omitempty"`
// Token usage breakdown
Usage ShutdownModelMetricUsage `json:"usage"`
}
diff --git a/nodejs/package-lock.json b/nodejs/package-lock.json
index 1964c584c..01f81eb7a 100644
--- a/nodejs/package-lock.json
+++ b/nodejs/package-lock.json
@@ -9,7 +9,7 @@
"version": "0.1.8",
"license": "MIT",
"dependencies": {
- "@github/copilot": "^1.0.51-1",
+ "@github/copilot": "^1.0.51-2",
"vscode-jsonrpc": "^8.2.1",
"zod": "^4.3.6"
},
@@ -663,28 +663,31 @@
}
},
"node_modules/@github/copilot": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.51-1.tgz",
- "integrity": "sha512-TCPqoOAf0P6LUk3Xtp7hoO5d1AeGJQMA+Io6wxKeTNzZm6bWf41jFxQPs8Pnzua5vJwBjOid10XhGAVI5gHpFw==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.51-2.tgz",
+ "integrity": "sha512-z9DFxVYIvY4MPEidWJxHdJoQNeDRt86egFyVek3zIVOCH5V6+NTF8ZuJAdMJJqbt+5EWxOgT4wBY4JvUfN7fCg==",
"license": "SEE LICENSE IN LICENSE.md",
+ "dependencies": {
+ "detect-libc": "^2.1.2"
+ },
"bin": {
"copilot": "npm-loader.js"
},
"optionalDependencies": {
- "@github/copilot-darwin-arm64": "1.0.51-1",
- "@github/copilot-darwin-x64": "1.0.51-1",
- "@github/copilot-linux-arm64": "1.0.51-1",
- "@github/copilot-linux-x64": "1.0.51-1",
- "@github/copilot-linuxmusl-arm64": "1.0.51-1",
- "@github/copilot-linuxmusl-x64": "1.0.51-1",
- "@github/copilot-win32-arm64": "1.0.51-1",
- "@github/copilot-win32-x64": "1.0.51-1"
+ "@github/copilot-darwin-arm64": "1.0.51-2",
+ "@github/copilot-darwin-x64": "1.0.51-2",
+ "@github/copilot-linux-arm64": "1.0.51-2",
+ "@github/copilot-linux-x64": "1.0.51-2",
+ "@github/copilot-linuxmusl-arm64": "1.0.51-2",
+ "@github/copilot-linuxmusl-x64": "1.0.51-2",
+ "@github/copilot-win32-arm64": "1.0.51-2",
+ "@github/copilot-win32-x64": "1.0.51-2"
}
},
"node_modules/@github/copilot-darwin-arm64": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.51-1.tgz",
- "integrity": "sha512-IRoWmK7ZGGmOceDpZ/jaGWJULGUVbF0hPuy5CaJsgEdtqD6K/0AfN2wPi+txuOo9H5Q4/iZTZFkoBC3W+moiXQ==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.51-2.tgz",
+ "integrity": "sha512-iOIAIBbOKuOnUGhsVvmFdrdKu5olSZ1Ve5RkwWj9E/62g4dAuGrEkhisA6xcNt63qDfGfsPQcDKkR+Nhxrgp4g==",
"cpu": [
"arm64"
],
@@ -698,9 +701,9 @@
}
},
"node_modules/@github/copilot-darwin-x64": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.51-1.tgz",
- "integrity": "sha512-tIesO+WWTnb5ZlE+l2uq8HNix5og/vV1JhsleXTDR18utVsgJ2Mf4a4nLIF4HXrKWOqJCSEtQHhBESKcOz1oUw==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.51-2.tgz",
+ "integrity": "sha512-7AYiP1D8mZg0UOSx0hiMGS6ZOTKA4miiHpiS5Bvd5AgTchWFNBgM/aHs1D/VSk0dLucGGzSClwzL5u80hNiw/Q==",
"cpu": [
"x64"
],
@@ -714,9 +717,9 @@
}
},
"node_modules/@github/copilot-linux-arm64": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.51-1.tgz",
- "integrity": "sha512-yuiR663dZ28U6i7pKViVMvvJjznXGb8MW/Nw12jeW5Pu2iwnQyb5Mv8YrsrHNs/zSNX+dBkNHEy7sZd/MFkf+w==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.51-2.tgz",
+ "integrity": "sha512-X5QVYcaU1IDeawCDxC8NHf8s/8Tq9NX+2a/tKXDFBFLIisoXZCpU0Ap9KRSGyKe8heJbvuDoW4JaJRZj4faAqw==",
"cpu": [
"arm64"
],
@@ -730,9 +733,9 @@
}
},
"node_modules/@github/copilot-linux-x64": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.51-1.tgz",
- "integrity": "sha512-kx4NUR5qWj8lv+s+uCFQEiPLqddr/8a6ZAJe7h+ENGY/D9+TbP1pvK/nJ3Hjjy+tCpeIKS8+GJl8b1hfihAuXw==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.51-2.tgz",
+ "integrity": "sha512-wn4W2K+kV3f5XZ8iG7ZplLuxkv9m3oFNcgdfFF5LSlU39k9l/WFahCKWWP6ec4DG9cvfR/Z0Sj4rmQPJoF/nkg==",
"cpu": [
"x64"
],
@@ -746,9 +749,9 @@
}
},
"node_modules/@github/copilot-linuxmusl-arm64": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.51-1.tgz",
- "integrity": "sha512-2OijR/pU2U5sMSjntCwmQmdpGDawvT3jaIaEk9FMcCH2m5GJkQFe/WYCAYpoXPJARL/Y+QyY2yybUPUCyX3//A==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.51-2.tgz",
+ "integrity": "sha512-cQ4cJ42pN4b3Up5fDpRvVP+yPYifgQD2vplvUavY6bffCCYwLqzK4oHFsABC8uvtqkIq/GbFOZ6XF2W+YdVFUQ==",
"cpu": [
"arm64"
],
@@ -762,9 +765,9 @@
}
},
"node_modules/@github/copilot-linuxmusl-x64": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.51-1.tgz",
- "integrity": "sha512-AHTZUgxzaKQF9XO2HQwwofooJzFLa0gJKN2pE0zCypmTgdyX/B6XV4GCWo3JqBZYwDG29+MtxM0KMDwvzGV3uw==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.51-2.tgz",
+ "integrity": "sha512-3wm34yzDeCW2U0im6qDK51iF6dJHhrPqv3VxPwfvTK+7u5iWB9oaGvFRCYtQfA5sV0hJqmD6Gup6MJwB4JgEEQ==",
"cpu": [
"x64"
],
@@ -778,9 +781,9 @@
}
},
"node_modules/@github/copilot-win32-arm64": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.51-1.tgz",
- "integrity": "sha512-iyKSiUf+vj2M8D7WoIeu3QHuAuGCXvxYh8G0QT2CU/8LyLYcZUkGbQtPWqH4WJaSFrH6hCh4vHX8ATIv5ypnQA==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.51-2.tgz",
+ "integrity": "sha512-uAj1YwA8n/qbI1JG8UjHGtuBrJL18FSRkXwB0SdM0aKUozhZs3vdxRROuT5MAbt72KWk+rLldnkVy6HL/tm8sA==",
"cpu": [
"arm64"
],
@@ -794,9 +797,9 @@
}
},
"node_modules/@github/copilot-win32-x64": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.51-1.tgz",
- "integrity": "sha512-MrzXNjYTUbtiPReJfIOC55o1NDbRTTBubpiNBLit1q07QL8Q/ozp1NoNZ2p8z1u962lDDztPEPXlvs9dsq40VQ==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.51-2.tgz",
+ "integrity": "sha512-Wur8d0y6VsXGbsMhED3uoZylRoJyWLQPHzgf3TD2AEc48zVpuTb4jUKzH9wD1frheAxGTl/kWvLr+6rYRcPK7w==",
"cpu": [
"x64"
],
@@ -1920,6 +1923,15 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/detect-libc": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/es-module-lexer": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz",
diff --git a/nodejs/package.json b/nodejs/package.json
index f9e05d29c..d3f4eee13 100644
--- a/nodejs/package.json
+++ b/nodejs/package.json
@@ -56,7 +56,7 @@
"author": "GitHub",
"license": "MIT",
"dependencies": {
- "@github/copilot": "^1.0.51-1",
+ "@github/copilot": "^1.0.51-2",
"vscode-jsonrpc": "^8.2.1",
"zod": "^4.3.6"
},
diff --git a/nodejs/samples/package-lock.json b/nodejs/samples/package-lock.json
index 3678eea36..95a1e1bb3 100644
--- a/nodejs/samples/package-lock.json
+++ b/nodejs/samples/package-lock.json
@@ -18,7 +18,7 @@
"version": "0.1.8",
"license": "MIT",
"dependencies": {
- "@github/copilot": "^1.0.51-1",
+ "@github/copilot": "^1.0.51-2",
"vscode-jsonrpc": "^8.2.1",
"zod": "^4.3.6"
},
diff --git a/python/copilot/generated/rpc.py b/python/copilot/generated/rpc.py
index b72bd97ad..6b9e969a7 100644
--- a/python/copilot/generated/rpc.py
+++ b/python/copilot/generated/rpc.py
@@ -9752,7 +9752,7 @@ class UsageMetricsModelMetric:
token_details: dict[str, UsageMetricsModelMetricTokenDetail] | None = None
"""Token count details per type"""
- total_nano_aiu: int | None = None
+ total_nano_aiu: float | None = None
"""Accumulated nano-AI units cost for this model"""
@staticmethod
@@ -9761,7 +9761,7 @@ def from_dict(obj: Any) -> 'UsageMetricsModelMetric':
requests = UsageMetricsModelMetricRequests.from_dict(obj.get("requests"))
usage = UsageMetricsModelMetricUsage.from_dict(obj.get("usage"))
token_details = from_union([lambda x: from_dict(UsageMetricsModelMetricTokenDetail.from_dict, x), from_none], obj.get("tokenDetails"))
- total_nano_aiu = from_union([from_int, from_none], obj.get("totalNanoAiu"))
+ total_nano_aiu = from_union([from_float, from_none], obj.get("totalNanoAiu"))
return UsageMetricsModelMetric(requests, usage, token_details, total_nano_aiu)
def to_dict(self) -> dict:
@@ -9771,7 +9771,7 @@ def to_dict(self) -> dict:
if self.token_details is not None:
result["tokenDetails"] = from_union([lambda x: from_dict(lambda x: to_class(UsageMetricsModelMetricTokenDetail, x), x), from_none], self.token_details)
if self.total_nano_aiu is not None:
- result["totalNanoAiu"] = from_union([from_int, from_none], self.total_nano_aiu)
+ result["totalNanoAiu"] = from_union([to_float, from_none], self.total_nano_aiu)
return result
@dataclass
@@ -11613,7 +11613,7 @@ class UsageGetMetricsResult:
token_details: dict[str, UsageMetricsTokenDetail] | None = None
"""Session-wide per-token-type accumulated token counts"""
- total_nano_aiu: int | None = None
+ total_nano_aiu: float | None = None
"""Session-wide accumulated nano-AI units cost"""
@staticmethod
@@ -11629,7 +11629,7 @@ def from_dict(obj: Any) -> 'UsageGetMetricsResult':
total_user_requests = from_int(obj.get("totalUserRequests"))
current_model = from_union([from_str, from_none], obj.get("currentModel"))
token_details = from_union([lambda x: from_dict(UsageMetricsTokenDetail.from_dict, x), from_none], obj.get("tokenDetails"))
- total_nano_aiu = from_union([from_int, from_none], obj.get("totalNanoAiu"))
+ total_nano_aiu = from_union([from_float, from_none], obj.get("totalNanoAiu"))
return UsageGetMetricsResult(code_changes, last_call_input_tokens, last_call_output_tokens, model_metrics, session_start_time, total_api_duration_ms, total_premium_request_cost, total_user_requests, current_model, token_details, total_nano_aiu)
def to_dict(self) -> dict:
@@ -11647,7 +11647,7 @@ def to_dict(self) -> dict:
if self.token_details is not None:
result["tokenDetails"] = from_union([lambda x: from_dict(lambda x: to_class(UsageMetricsTokenDetail, x), x), from_none], self.token_details)
if self.total_nano_aiu is not None:
- result["totalNanoAiu"] = from_union([from_int, from_none], self.total_nano_aiu)
+ result["totalNanoAiu"] = from_union([to_float, from_none], self.total_nano_aiu)
return result
@dataclass
diff --git a/python/copilot/generated/session_events.py b/python/copilot/generated/session_events.py
index f344650cd..ab9605546 100644
--- a/python/copilot/generated/session_events.py
+++ b/python/copilot/generated/session_events.py
@@ -622,13 +622,13 @@ def to_dict(self) -> dict:
class AssistantUsageCopilotUsage:
"Per-request cost and usage data from the CAPI copilot_usage response field"
token_details: list[AssistantUsageCopilotUsageTokenDetail]
- total_nano_aiu: int
+ total_nano_aiu: float
@staticmethod
def from_dict(obj: Any) -> "AssistantUsageCopilotUsage":
assert isinstance(obj, dict)
token_details = from_list(AssistantUsageCopilotUsageTokenDetail.from_dict, obj.get("tokenDetails"))
- total_nano_aiu = from_int(obj.get("totalNanoAiu"))
+ total_nano_aiu = from_float(obj.get("totalNanoAiu"))
return AssistantUsageCopilotUsage(
token_details=token_details,
total_nano_aiu=total_nano_aiu,
@@ -637,7 +637,7 @@ def from_dict(obj: Any) -> "AssistantUsageCopilotUsage":
def to_dict(self) -> dict:
result: dict = {}
result["tokenDetails"] = from_list(lambda x: to_class(AssistantUsageCopilotUsageTokenDetail, x), self.token_details)
- result["totalNanoAiu"] = to_int(self.total_nano_aiu)
+ result["totalNanoAiu"] = to_float(self.total_nano_aiu)
return result
@@ -1087,13 +1087,13 @@ def to_dict(self) -> dict:
class CompactionCompleteCompactionTokensUsedCopilotUsage:
"Per-request cost and usage data from the CAPI copilot_usage response field"
token_details: list[CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail]
- total_nano_aiu: int
+ total_nano_aiu: float
@staticmethod
def from_dict(obj: Any) -> "CompactionCompleteCompactionTokensUsedCopilotUsage":
assert isinstance(obj, dict)
token_details = from_list(CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail.from_dict, obj.get("tokenDetails"))
- total_nano_aiu = from_int(obj.get("totalNanoAiu"))
+ total_nano_aiu = from_float(obj.get("totalNanoAiu"))
return CompactionCompleteCompactionTokensUsedCopilotUsage(
token_details=token_details,
total_nano_aiu=total_nano_aiu,
@@ -1102,7 +1102,7 @@ def from_dict(obj: Any) -> "CompactionCompleteCompactionTokensUsedCopilotUsage":
def to_dict(self) -> dict:
result: dict = {}
result["tokenDetails"] = from_list(lambda x: to_class(CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail, x), self.token_details)
- result["totalNanoAiu"] = to_int(self.total_nano_aiu)
+ result["totalNanoAiu"] = to_float(self.total_nano_aiu)
return result
@@ -3087,7 +3087,7 @@ class SessionShutdownData:
session_start_time: int
shutdown_type: ShutdownType
total_api_duration: timedelta
- total_premium_requests: int
+ total_premium_requests: float
conversation_tokens: int | None = None
current_model: str | None = None
current_tokens: int | None = None
@@ -3095,7 +3095,7 @@ class SessionShutdownData:
system_tokens: int | None = None
token_details: dict[str, ShutdownTokenDetail] | None = None
tool_definitions_tokens: int | None = None
- total_nano_aiu: int | None = None
+ total_nano_aiu: float | None = None
@staticmethod
def from_dict(obj: Any) -> "SessionShutdownData":
@@ -3105,7 +3105,7 @@ def from_dict(obj: Any) -> "SessionShutdownData":
session_start_time = from_int(obj.get("sessionStartTime"))
shutdown_type = parse_enum(ShutdownType, obj.get("shutdownType"))
total_api_duration = from_timedelta(obj.get("totalApiDurationMs"))
- total_premium_requests = from_int(obj.get("totalPremiumRequests"))
+ total_premium_requests = from_float(obj.get("totalPremiumRequests"))
conversation_tokens = from_union([from_none, from_int], obj.get("conversationTokens"))
current_model = from_union([from_none, from_str], obj.get("currentModel"))
current_tokens = from_union([from_none, from_int], obj.get("currentTokens"))
@@ -3113,7 +3113,7 @@ def from_dict(obj: Any) -> "SessionShutdownData":
system_tokens = from_union([from_none, from_int], obj.get("systemTokens"))
token_details = from_union([from_none, lambda x: from_dict(ShutdownTokenDetail.from_dict, x)], obj.get("tokenDetails"))
tool_definitions_tokens = from_union([from_none, from_int], obj.get("toolDefinitionsTokens"))
- total_nano_aiu = from_union([from_none, from_int], obj.get("totalNanoAiu"))
+ total_nano_aiu = from_union([from_none, from_float], obj.get("totalNanoAiu"))
return SessionShutdownData(
code_changes=code_changes,
model_metrics=model_metrics,
@@ -3138,7 +3138,7 @@ def to_dict(self) -> dict:
result["sessionStartTime"] = to_int(self.session_start_time)
result["shutdownType"] = to_enum(ShutdownType, self.shutdown_type)
result["totalApiDurationMs"] = to_timedelta_int(self.total_api_duration)
- result["totalPremiumRequests"] = to_int(self.total_premium_requests)
+ result["totalPremiumRequests"] = to_float(self.total_premium_requests)
if self.conversation_tokens is not None:
result["conversationTokens"] = from_union([from_none, to_int], self.conversation_tokens)
if self.current_model is not None:
@@ -3154,7 +3154,7 @@ def to_dict(self) -> dict:
if self.tool_definitions_tokens is not None:
result["toolDefinitionsTokens"] = from_union([from_none, to_int], self.tool_definitions_tokens)
if self.total_nano_aiu is not None:
- result["totalNanoAiu"] = from_union([from_none, to_int], self.total_nano_aiu)
+ result["totalNanoAiu"] = from_union([from_none, to_float], self.total_nano_aiu)
return result
@@ -3511,7 +3511,7 @@ class ShutdownModelMetric:
requests: ShutdownModelMetricRequests
usage: ShutdownModelMetricUsage
token_details: dict[str, ShutdownModelMetricTokenDetail] | None = None
- total_nano_aiu: int | None = None
+ total_nano_aiu: float | None = None
@staticmethod
def from_dict(obj: Any) -> "ShutdownModelMetric":
@@ -3519,7 +3519,7 @@ def from_dict(obj: Any) -> "ShutdownModelMetric":
requests = ShutdownModelMetricRequests.from_dict(obj.get("requests"))
usage = ShutdownModelMetricUsage.from_dict(obj.get("usage"))
token_details = from_union([from_none, lambda x: from_dict(ShutdownModelMetricTokenDetail.from_dict, x)], obj.get("tokenDetails"))
- total_nano_aiu = from_union([from_none, from_int], obj.get("totalNanoAiu"))
+ total_nano_aiu = from_union([from_none, from_float], obj.get("totalNanoAiu"))
return ShutdownModelMetric(
requests=requests,
usage=usage,
@@ -3534,7 +3534,7 @@ def to_dict(self) -> dict:
if self.token_details is not None:
result["tokenDetails"] = from_union([from_none, lambda x: from_dict(lambda x: to_class(ShutdownModelMetricTokenDetail, x), x)], self.token_details)
if self.total_nano_aiu is not None:
- result["totalNanoAiu"] = from_union([from_none, to_int], self.total_nano_aiu)
+ result["totalNanoAiu"] = from_union([from_none, to_float], self.total_nano_aiu)
return result
diff --git a/rust/src/generated/api_types.rs b/rust/src/generated/api_types.rs
index d58f46df2..271afb62c 100644
--- a/rust/src/generated/api_types.rs
+++ b/rust/src/generated/api_types.rs
@@ -6308,7 +6308,7 @@ pub struct UsageMetricsModelMetric {
pub token_details: HashMap,
/// Accumulated nano-AI units cost for this model
#[serde(skip_serializing_if = "Option::is_none")]
- pub total_nano_aiu: Option,
+ pub total_nano_aiu: Option,
/// Token usage metrics for this model
pub usage: UsageMetricsModelMetricUsage,
}
@@ -6359,7 +6359,7 @@ pub struct UsageGetMetricsResult {
pub total_api_duration_ms: i64,
/// Session-wide accumulated nano-AI units cost
#[serde(skip_serializing_if = "Option::is_none")]
- pub total_nano_aiu: Option,
+ pub total_nano_aiu: Option,
/// Total user-initiated premium request cost across all models (may be fractional due to multipliers)
pub total_premium_request_cost: f64,
/// Raw count of user-initiated API requests
@@ -8578,7 +8578,7 @@ pub struct SessionUsageGetMetricsResult {
pub total_api_duration_ms: i64,
/// Session-wide accumulated nano-AI units cost
#[serde(skip_serializing_if = "Option::is_none")]
- pub total_nano_aiu: Option,
+ pub total_nano_aiu: Option,
/// Total user-initiated premium request cost across all models (may be fractional due to multipliers)
pub total_premium_request_cost: f64,
/// Raw count of user-initiated API requests
diff --git a/rust/src/generated/session_events.rs b/rust/src/generated/session_events.rs
index a3b307984..6d9237b92 100644
--- a/rust/src/generated/session_events.rs
+++ b/rust/src/generated/session_events.rs
@@ -764,7 +764,7 @@ pub struct ShutdownModelMetric {
pub token_details: HashMap,
/// Accumulated nano-AI units cost for this model
#[serde(skip_serializing_if = "Option::is_none")]
- pub total_nano_aiu: Option,
+ pub total_nano_aiu: Option,
/// Token usage breakdown
pub usage: ShutdownModelMetricUsage,
}
@@ -814,9 +814,9 @@ pub struct SessionShutdownData {
pub total_api_duration_ms: i64,
/// Session-wide accumulated nano-AI units cost
#[serde(skip_serializing_if = "Option::is_none")]
- pub total_nano_aiu: Option,
+ pub total_nano_aiu: Option,
/// Total number of premium API requests used during the session
- pub total_premium_requests: i64,
+ pub total_premium_requests: f64,
}
/// Session event "session.context_changed". Updated working directory and git context after the change
@@ -908,7 +908,7 @@ pub struct CompactionCompleteCompactionTokensUsedCopilotUsage {
/// Itemized token usage breakdown
pub token_details: Vec,
/// Total cost in nano-AI units for this request
- pub total_nano_aiu: i64,
+ pub total_nano_aiu: f64,
}
/// Token usage breakdown for the compaction LLM call (aligned with assistant.usage format)
@@ -1221,7 +1221,7 @@ pub struct AssistantUsageCopilotUsage {
/// Itemized token usage breakdown
pub token_details: Vec,
/// Total cost in nano-AI units for this request
- pub total_nano_aiu: i64,
+ pub total_nano_aiu: f64,
}
/// Schema for the `AssistantUsageQuotaSnapshot` type.
diff --git a/test/harness/package-lock.json b/test/harness/package-lock.json
index 7938d3717..2d78be42f 100644
--- a/test/harness/package-lock.json
+++ b/test/harness/package-lock.json
@@ -9,7 +9,7 @@
"version": "1.0.0",
"license": "ISC",
"devDependencies": {
- "@github/copilot": "^1.0.51-1",
+ "@github/copilot": "^1.0.51-2",
"@modelcontextprotocol/sdk": "^1.26.0",
"@types/node": "^25.3.3",
"@types/node-forge": "^1.3.14",
@@ -464,29 +464,32 @@
}
},
"node_modules/@github/copilot": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.51-1.tgz",
- "integrity": "sha512-TCPqoOAf0P6LUk3Xtp7hoO5d1AeGJQMA+Io6wxKeTNzZm6bWf41jFxQPs8Pnzua5vJwBjOid10XhGAVI5gHpFw==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.51-2.tgz",
+ "integrity": "sha512-z9DFxVYIvY4MPEidWJxHdJoQNeDRt86egFyVek3zIVOCH5V6+NTF8ZuJAdMJJqbt+5EWxOgT4wBY4JvUfN7fCg==",
"dev": true,
"license": "SEE LICENSE IN LICENSE.md",
+ "dependencies": {
+ "detect-libc": "^2.1.2"
+ },
"bin": {
"copilot": "npm-loader.js"
},
"optionalDependencies": {
- "@github/copilot-darwin-arm64": "1.0.51-1",
- "@github/copilot-darwin-x64": "1.0.51-1",
- "@github/copilot-linux-arm64": "1.0.51-1",
- "@github/copilot-linux-x64": "1.0.51-1",
- "@github/copilot-linuxmusl-arm64": "1.0.51-1",
- "@github/copilot-linuxmusl-x64": "1.0.51-1",
- "@github/copilot-win32-arm64": "1.0.51-1",
- "@github/copilot-win32-x64": "1.0.51-1"
+ "@github/copilot-darwin-arm64": "1.0.51-2",
+ "@github/copilot-darwin-x64": "1.0.51-2",
+ "@github/copilot-linux-arm64": "1.0.51-2",
+ "@github/copilot-linux-x64": "1.0.51-2",
+ "@github/copilot-linuxmusl-arm64": "1.0.51-2",
+ "@github/copilot-linuxmusl-x64": "1.0.51-2",
+ "@github/copilot-win32-arm64": "1.0.51-2",
+ "@github/copilot-win32-x64": "1.0.51-2"
}
},
"node_modules/@github/copilot-darwin-arm64": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.51-1.tgz",
- "integrity": "sha512-IRoWmK7ZGGmOceDpZ/jaGWJULGUVbF0hPuy5CaJsgEdtqD6K/0AfN2wPi+txuOo9H5Q4/iZTZFkoBC3W+moiXQ==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.51-2.tgz",
+ "integrity": "sha512-iOIAIBbOKuOnUGhsVvmFdrdKu5olSZ1Ve5RkwWj9E/62g4dAuGrEkhisA6xcNt63qDfGfsPQcDKkR+Nhxrgp4g==",
"cpu": [
"arm64"
],
@@ -501,9 +504,9 @@
}
},
"node_modules/@github/copilot-darwin-x64": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.51-1.tgz",
- "integrity": "sha512-tIesO+WWTnb5ZlE+l2uq8HNix5og/vV1JhsleXTDR18utVsgJ2Mf4a4nLIF4HXrKWOqJCSEtQHhBESKcOz1oUw==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.51-2.tgz",
+ "integrity": "sha512-7AYiP1D8mZg0UOSx0hiMGS6ZOTKA4miiHpiS5Bvd5AgTchWFNBgM/aHs1D/VSk0dLucGGzSClwzL5u80hNiw/Q==",
"cpu": [
"x64"
],
@@ -518,9 +521,9 @@
}
},
"node_modules/@github/copilot-linux-arm64": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.51-1.tgz",
- "integrity": "sha512-yuiR663dZ28U6i7pKViVMvvJjznXGb8MW/Nw12jeW5Pu2iwnQyb5Mv8YrsrHNs/zSNX+dBkNHEy7sZd/MFkf+w==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.51-2.tgz",
+ "integrity": "sha512-X5QVYcaU1IDeawCDxC8NHf8s/8Tq9NX+2a/tKXDFBFLIisoXZCpU0Ap9KRSGyKe8heJbvuDoW4JaJRZj4faAqw==",
"cpu": [
"arm64"
],
@@ -535,9 +538,9 @@
}
},
"node_modules/@github/copilot-linux-x64": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.51-1.tgz",
- "integrity": "sha512-kx4NUR5qWj8lv+s+uCFQEiPLqddr/8a6ZAJe7h+ENGY/D9+TbP1pvK/nJ3Hjjy+tCpeIKS8+GJl8b1hfihAuXw==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.51-2.tgz",
+ "integrity": "sha512-wn4W2K+kV3f5XZ8iG7ZplLuxkv9m3oFNcgdfFF5LSlU39k9l/WFahCKWWP6ec4DG9cvfR/Z0Sj4rmQPJoF/nkg==",
"cpu": [
"x64"
],
@@ -552,9 +555,9 @@
}
},
"node_modules/@github/copilot-linuxmusl-arm64": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.51-1.tgz",
- "integrity": "sha512-2OijR/pU2U5sMSjntCwmQmdpGDawvT3jaIaEk9FMcCH2m5GJkQFe/WYCAYpoXPJARL/Y+QyY2yybUPUCyX3//A==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.51-2.tgz",
+ "integrity": "sha512-cQ4cJ42pN4b3Up5fDpRvVP+yPYifgQD2vplvUavY6bffCCYwLqzK4oHFsABC8uvtqkIq/GbFOZ6XF2W+YdVFUQ==",
"cpu": [
"arm64"
],
@@ -569,9 +572,9 @@
}
},
"node_modules/@github/copilot-linuxmusl-x64": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.51-1.tgz",
- "integrity": "sha512-AHTZUgxzaKQF9XO2HQwwofooJzFLa0gJKN2pE0zCypmTgdyX/B6XV4GCWo3JqBZYwDG29+MtxM0KMDwvzGV3uw==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.51-2.tgz",
+ "integrity": "sha512-3wm34yzDeCW2U0im6qDK51iF6dJHhrPqv3VxPwfvTK+7u5iWB9oaGvFRCYtQfA5sV0hJqmD6Gup6MJwB4JgEEQ==",
"cpu": [
"x64"
],
@@ -586,9 +589,9 @@
}
},
"node_modules/@github/copilot-win32-arm64": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.51-1.tgz",
- "integrity": "sha512-iyKSiUf+vj2M8D7WoIeu3QHuAuGCXvxYh8G0QT2CU/8LyLYcZUkGbQtPWqH4WJaSFrH6hCh4vHX8ATIv5ypnQA==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.51-2.tgz",
+ "integrity": "sha512-uAj1YwA8n/qbI1JG8UjHGtuBrJL18FSRkXwB0SdM0aKUozhZs3vdxRROuT5MAbt72KWk+rLldnkVy6HL/tm8sA==",
"cpu": [
"arm64"
],
@@ -603,9 +606,9 @@
}
},
"node_modules/@github/copilot-win32-x64": {
- "version": "1.0.51-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.51-1.tgz",
- "integrity": "sha512-MrzXNjYTUbtiPReJfIOC55o1NDbRTTBubpiNBLit1q07QL8Q/ozp1NoNZ2p8z1u962lDDztPEPXlvs9dsq40VQ==",
+ "version": "1.0.51-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.51-2.tgz",
+ "integrity": "sha512-Wur8d0y6VsXGbsMhED3uoZylRoJyWLQPHzgf3TD2AEc48zVpuTb4jUKzH9wD1frheAxGTl/kWvLr+6rYRcPK7w==",
"cpu": [
"x64"
],
@@ -1433,6 +1436,16 @@
"node": ">= 0.8"
}
},
+ "node_modules/detect-libc": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/dunder-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
diff --git a/test/harness/package.json b/test/harness/package.json
index 9668cd570..7c37f83d6 100644
--- a/test/harness/package.json
+++ b/test/harness/package.json
@@ -11,7 +11,7 @@
"test": "vitest run"
},
"devDependencies": {
- "@github/copilot": "^1.0.51-1",
+ "@github/copilot": "^1.0.51-2",
"@modelcontextprotocol/sdk": "^1.26.0",
"@types/node": "^25.3.3",
"@types/node-forge": "^1.3.14",