Hmbown/CodeWhale · error

Antigravity cloud-code is stream-only; blocking create_messa

Error message

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

What it means

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.

Source

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

    /// 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 8880682c63)

Solutions

  1. Use the streaming path (`create_message_stream`) for Antigravity cloud-code — blocking calls are not implemented for this dialect.
  2. Route the auxiliary/inspection workload to a chat-capable provider model so the dialect is not `GoogleCloudCode`.
  3. If embedding, feature-detect the dialect before making a blocking call (see the type guard in the defense section).
Defensive patterns

Strategy: fallback

Validate before calling

// Before an inspection call on a possibly-cloud-code route.
fn inspection_supported(dialect: WireDialect) -> bool {
    !matches!(dialect, WireDialect::GoogleCloudCode)
}

Type guard

fn is_stream_only_dialect(d: &WireDialect) -> bool {
    matches!(d, WireDialect::GoogleCloudCode)
}

Try / catch

match isolated.inspect(request).await {
    Ok(result) => use(result),
    Err(e) if e.to_string().contains("stream-only") => {
        // degrade: skip inspection or stream-inspect instead of blocking
        skip_or_stream_inspect(request).await,
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

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

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

Related errors


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