{"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":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/client.rs","lineNumber":2707,"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":2689,"sourceCodeEnd":2725,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/tui/src/client.rs#L2689-L2725","documentation":"The Antigravity `cloud-code` wire dialect (`WireDialect::GoogleCloudCode`) only implements the streaming path — there is no blocking `create_message` implementation. This instance is on the isolated prompt-inspection seam: the client clones itself with an isolated rate limiter for an auxiliary classifier/inspection call, and when that isolated request would use the cloud-code dialect it bails instead of sending.","triggerScenarios":"A prompt-inspection or auxiliary classifier call routed through `inspect` while the client's prepared-request dialect resolves to `GoogleCloudCode` — i.e. the provider is Antigravity with the cloud-code route. The error occurs after `prepare_outbound_request` succeeds, at dialect dispatch.","commonSituations":"Using the Antigravity provider for a session and triggering a feature that performs non-streaming request inspection (e.g. preview/classification helpers); custom configurations that bind Antigravity as the model-aware provider while auxiliary tooling still assumes a blocking chat surface exists.","solutions":["Use the streaming path (`create_message_stream`) for Antigravity cloud-code — blocking calls are not implemented for this dialect.","Route the auxiliary/inspection workload to a chat-capable provider model so the dialect is not `GoogleCloudCode`.","If embedding, feature-detect the dialect before making a blocking call (see the type guard in the defense section)."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Before an inspection call on a possibly-cloud-code route.\nfn inspection_supported(dialect: WireDialect) -> bool {\n    !matches!(dialect, WireDialect::GoogleCloudCode)\n}","typeGuard":"fn is_stream_only_dialect(d: &WireDialect) -> bool {\n    matches!(d, WireDialect::GoogleCloudCode)\n}","tryCatchPattern":"match isolated.inspect(request).await {\n    Ok(result) => use(result),\n    Err(e) if e.to_string().contains(\"stream-only\") => {\n        // degrade: skip inspection or stream-inspect instead of blocking\n        skip_or_stream_inspect(request).await,\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Treat request inspection as optional: catch the stream-only bail and continue without inspection rather than failing the turn.","Bind auxiliary classifier calls to a chat-capable provider model when the session provider is Antigravity.","Feature-detect the dialect at route resolution time, not at failure time."],"tags":["antigravity","cloud-code","streaming","api-surface","provider"],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}