{"record":{"id":"16b58eac05f549a2","repo":"Hmbown/CodeWhale","slug":"antigravity-cloud-code-is-stream-only-blocking-cr","errorCode":null,"errorMessage":"Antigravity cloud-code is stream-only; blocking create_message is not implemented","messagePattern":"Antigravity cloud-code is stream-only; blocking create_message is not implemented","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/client.rs","lineNumber":2804,"sourceCode":"    /// not perturb later production routing through shared cache state.\n    pub(crate) async fn create_message_without_response_cache(\n        &self,\n        request: MessageRequest,\n    ) -> Result<MessageResponse> {\n        let mut isolated = self.clone();\n        isolated.isolated_request_state = true;\n        // The ordinary clone shares its provider token bucket so concurrent\n        // production calls observe one rate budget. Request inspection is an\n        // auxiliary classifier call, however: it must neither consume nor\n        // inherit that mutable foreground state.\n        isolated.rate_limiter = Arc::new(AsyncMutex::new(TokenBucket::from_env()));\n        let _permit = isolated.acquire_provider_request_permit().await;\n        let prepared = isolated.prepare_outbound_request(request, false)?;\n        match prepared.dialect {\n            WireDialect::OpenAiResponses => isolated.handle_responses_message(&prepared).await,\n            WireDialect::AnthropicMessages => isolated.handle_anthropic_message(&prepared).await,\n            WireDialect::ChatCompletions => isolated.create_message_chat(&prepared, false).await,\n            WireDialect::GoogleCloudCode => anyhow::bail!(\n                \"Antigravity cloud-code is stream-only; blocking create_message is not implemented\"\n            ),\n        }\n    }\n}\n\nimpl LlmClient for DeepSeekClient {\n    fn provider_name(&self) -> &'static str {\n        self.api_provider.as_str()\n    }\n\n    fn model(&self) -> &str {\n        &self.default_model\n    }\n\n    fn billing_base_url(&self) -> Option<&str> {\n        Some(&self.base_url)\n    }","sourceCodeStart":2786,"sourceCodeEnd":2822,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/client.rs#L2786-L2822","documentation":"The Antigravity cloud-code dialect (WireDialect::GoogleCloudCode) is implemented only on the streaming path. The blocking create_message dispatch — used by auxiliary one-shot calls such as request inspection/classification on an isolated client clone — matches that dialect and bails immediately rather than pretending to support a blocking response. The streaming create_message_stream path for the same provider is unaffected.","triggerScenarios":"Any non-streaming helper (request inspection, one-shot classification or translation flows) running while the active provider route uses the Antigravity cloud-code wire dialect.","commonSituations":"Enabling model-aware auxiliary features on an Antigravity route; tooling that assumes every dialect supports blocking calls; provider switching mid-session leaving a stale blocking helper enabled.","solutions":["Use the streaming API (create_message_stream) for that provider and fold the events into the final result.","Route auxiliary one-shot calls to a different provider/model that supports blocking requests.","Disable the model-aware auxiliary feature that triggers the blocking call on Antigravity routes."],"exampleFix":"// before: blocking one-shot call on an Antigravity cloud-code route\nlet resp = client.create_message(request).await?; // bails: stream-only\n\n// after: consume the stream and assemble the same result\nlet mut stream = client.create_message_stream(request).await?;\nlet resp = fold_stream_into_message(stream).await?; // your event reducer","handlingStrategy":"fallback","validationCode":"fn supports_blocking(dialect: &WireDialect) -> bool {\n    !matches!(dialect, WireDialect::GoogleCloudCode)\n}\n// choose create_message only when supports_blocking; otherwise use create_message_stream","typeGuard":null,"tryCatchPattern":"Catch the stream-only error and re-issue the request via create_message_stream, folding events into the response shape; never retry the blocking call unchanged.","preventionTips":["Centralize dialect capability checks before choosing blocking versus streaming calls.","Keep one-shot auxiliary helpers dialect-aware.","Test auxiliary features against every provider dialect you ship."],"tags":["rust","llm","antigravity","streaming","unsupported-operation"],"backgroundTag":"streaming-only-api","analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}