This commit is contained in:
Hanashi 2026-08-23 23:05:13 -04:00
parent 1d027d2ef8
commit cea32babc6
3 changed files with 19 additions and 2 deletions

14
Cargo.lock generated
View File

@ -2603,6 +2603,7 @@ dependencies = [
"errors",
"filesys",
"futures",
"grok_consumer_statsig",
"log",
"log4rs",
"once_cell",
@ -2611,6 +2612,7 @@ dependencies = [
"serde",
"serde_json",
"sha2 0.11.0-rc.5",
"tao",
"test_data",
"test_utils",
"tokio",
@ -2620,6 +2622,18 @@ dependencies = [
"workspace-build-acceleration",
"wreq",
"wreq-util",
"wry",
]
[[package]]
name = "grok_consumer_statsig"
version = "0.0.1"
dependencies = [
"chrono",
"log",
"serde",
"thiserror 2.0.18",
"tokio",
]
[[package]]

View File

@ -11,6 +11,7 @@ members = [
"crates/api_clients/gmicloud_client",
"crates/api_clients/grok_api_client",
"crates/api_clients/grok_consumer_client",
"crates/api_clients/grok_consumer_statsig",
"crates/api_clients/midjourney_client",
"crates/api_clients/openai_sora_client",
"crates/router",
@ -96,6 +97,7 @@ filesys = { path = "crates/lib/files/filesys" }
gmicloud_client = { path = "crates/api_clients/gmicloud_client" }
grok_api_client = { path = "crates/api_clients/grok_api_client" }
grok_consumer_client = { path = "crates/api_clients/grok_consumer_client" }
grok_consumer_statsig = { path = "crates/api_clients/grok_consumer_statsig" }
http_headers = { path = "crates/lib/http_headers" }
core_types = { path = "crates/core_types" }
images = { path = "crates/lib/files/images" }

View File

@ -584,9 +584,10 @@ mod tests {
#[ignore] // Hits the real website; spends video quota; needs a fresh captured statsig.
async fn text_to_video_with_captured_statsig() -> AnyhowResult<()> {
setup_test_logging(LevelFilter::Info);
let captured_statsig = "XbHvyYh7hmNc+8sVAGnrpcuHN/MK+mgN63cmnBljOJaoCKu6zTPVw6C7HVv1wculKCNmYVum+L1h0IjFmtyZD/C53M+ZXg";
let captured_statsig = std::env::var("GROK_STATSIG").unwrap_or_else(|_|
"XbHvyYh7hmNc+8sVAGnrpcuHN/MK+mgN63cmnBljOJaoCKu6zTPVw6C7HVv1wculKCNmYVum+L1h0IjFmtyZD/C53M+ZXg".to_string());
let headers = GrokRequestHeaders {
statsig_id: Some(captured_statsig.to_string()),
statsig_id: Some(captured_statsig),
..Default::default()
};
generate_and_assert(