Skip to content

Commit bd092cf

Browse files
committed
fix antigravity cloud code platform metadata
1 parent f92c60d commit bd092cf

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

src/auth/antigravity.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,10 @@ fn antigravity_version() -> String {
5858
}
5959

6060
fn metadata_platform() -> &'static str {
61-
if cfg!(target_os = "windows") {
62-
"WINDOWS"
63-
} else {
64-
"MACOS"
65-
}
61+
// The Cloud Code backend currently rejects OS-specific string enum values
62+
// such as MACOS, WINDOWS, and LINUX for ClientMetadata.Platform. Use the
63+
// string value that is accepted across platforms instead of varying by OS.
64+
"PLATFORM_UNSPECIFIED"
6665
}
6766

6867
fn user_agent() -> String {

src/provider/antigravity.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,10 @@ struct FetchAvailableQuotaInfo {
107107
}
108108

109109
fn metadata_platform() -> &'static str {
110-
if cfg!(target_os = "windows") {
111-
"WINDOWS"
112-
} else {
113-
"MACOS"
114-
}
110+
// The Cloud Code backend currently rejects OS-specific string enum values
111+
// such as MACOS, WINDOWS, and LINUX for ClientMetadata.Platform. Use the
112+
// string value that is accepted across platforms instead of varying by OS.
113+
"PLATFORM_UNSPECIFIED"
115114
}
116115

117116
fn antigravity_version() -> String {

0 commit comments

Comments
 (0)