Hmbown/CodeWhale · error · anyhow::Error

Antigravity cloud-code is stream-only; blocking…

Error message

Antigravity cloud-code is stream-only; blocking create_message is not implemented

What it means

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.

Solutions

  1. Use the streaming API (create_message_stream) for that provider and fold the events into the final result.
  2. Route auxiliary one-shot calls to a different provider/model that supports blocking requests.
  3. Disable the model-aware auxiliary feature that triggers the blocking call on Antigravity routes.

Example fix

// before: blocking one-shot call on an Antigravity cloud-code route
let resp = client.create_message(request).await?; // bails: stream-only

// after: consume the stream and assemble the same result
let mut stream = client.create_message_stream(request).await?;
let resp = fold_stream_into_message(stream).await?; // your event reducer
Defensive patterns

Strategy: fallback

Validate before calling

fn supports_blocking(dialect: &WireDialect) -> bool {
    !matches!(dialect, WireDialect::GoogleCloudCode)
}
// choose create_message only when supports_blocking; otherwise use create_message_stream

Try / catch

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.

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20). Data as JSON: /api/errors/16b58eac05f549a2. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/client.rs:2804

    /// not perturb later production routing through shared cache state.
    pub(crate) async fn create_message_without_response_cache(
        &self,
        request: MessageRequest,
    ) -> Result<MessageResponse> {
        let mut isolated = self.clone();
        isolated.isolated_request_state = true;
        // The ordinary clone shares its provider token bucket so concurrent
        // production calls observe one rate budget. Request inspection is an
        // auxiliary classifier call, however: it must neither consume nor
        // inherit that mutable foreground state.
        isolated.rate_limiter = Arc::new(AsyncMutex::new(TokenBucket::from_env()));
        let _permit = isolated.acquire_provider_request_permit().await;
        let prepared = isolated.prepare_outbound_request(request, false)?;
        match prepared.dialect {
            WireDialect::OpenAiResponses => isolated.handle_responses_message(&prepared).await,
            WireDialect::AnthropicMessages => isolated.handle_anthropic_message(&prepared).await,
            WireDialect::ChatCompletions => isolated.create_message_chat(&prepared, false).await,
            WireDialect::GoogleCloudCode => anyhow::bail!(
                "Antigravity cloud-code is stream-only; blocking create_message is not implemented"
            ),
        }
    }
}

impl LlmClient for DeepSeekClient {
    fn provider_name(&self) -> &'static str {
        self.api_provider.as_str()
    }

    fn model(&self) -> &str {
        &self.default_model
    }

    fn billing_base_url(&self) -> Option<&str> {
        Some(&self.base_url)
    }

View on GitHub (pinned to 0c42157ee5)