{"record":{"id":"c0704ca66e63a179","repo":"Hmbown/CodeWhale","slug":"antigravity-cloud-code-tools-are-not-implemented-y","errorCode":null,"errorMessage":"Antigravity cloud-code tools are not implemented yet; send a text-only turn or use the google provider","messagePattern":"Antigravity cloud-code tools are not implemented yet; send a text-only turn or use the google provider","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/client/cloud_code.rs","lineNumber":57,"sourceCode":"/// Minimum GenerateContent JSON body. Tools, images, and unknown roles fail\n/// closed — those shapes are unproven on this wire.\npub fn build_generate_content_body(request: &MessageRequest) -> Result<Value> {\n    let has_system_text = match request.system.as_ref() {\n        Some(SystemPrompt::Text(text)) => !text.trim().is_empty(),\n        Some(SystemPrompt::Blocks(blocks)) => {\n            blocks.iter().any(|block| !block.text.trim().is_empty())\n        }\n        None => false,\n    };\n    if has_system_text {\n        return Err(CloudCodeRequestError::SystemPromptUnsupported.into());\n    }\n    if request\n        .tools\n        .as_ref()\n        .is_some_and(|tools| !tools.is_empty())\n    {\n        bail!(\n            \"Antigravity cloud-code tools are not implemented yet; send a text-only turn or use the google provider\"\n        );\n    }\n    let mut contents = Vec::new();\n    for message in &request.messages {\n        let role = match message.role.as_str() {\n            \"user\" => \"user\",\n            \"assistant\" | \"model\" => \"model\",\n            other => bail!(\"Antigravity cloud-code does not accept role {other:?}\"),\n        };\n        let mut parts = Vec::new();\n        for block in &message.content {\n            match block {\n                ContentBlock::Text { text, .. } if !text.trim().is_empty() => {\n                    parts.push(json!({ \"text\": text }));\n                }\n                ContentBlock::Text { .. } => {}\n                _ => bail!(","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/client/cloud_code.rs#L39-L75","documentation":"The Antigravity cloud-code request builder rejects any request whose `tools` list is non-empty, because tool calling is not implemented on that adapter. The bail happens locally during request construction, before any HTTP call, failing closed instead of silently dropping tools. System prompts are rejected separately (SystemPromptUnsupported) just above this check.","triggerScenarios":"Sending a request with `request.tools` populated (any non-empty list, e.g. the default shell/read/write tool set) while the provider is Antigravity on the cloud-code dialect.","commonSituations":"Default tool configuration is active globally when the user switches a session to the antigravity provider; an agent loop that always attaches its tool catalog regardless of provider capability.","solutions":["Send a text-only turn: clear the tool list for requests on the antigravity route","Switch the session to the `google` provider when tool use is required","Disable tools in the provider/session config for antigravity lanes"],"exampleFix":"// before\nrequest.tools = default_tool_catalog(); // non-empty -> bail on antigravity\n\n// after\nif provider_is_antigravity(&client) {\n    request.tools = None;\n}\nclient.create_message_stream(request).await?;","handlingStrategy":"fallback","validationCode":"let tools = if provider_is_antigravity(&client) { None } else { request.tools.take() };\n// or: route tool-carrying requests to google before building\nanyhow::ensure!(\n    provider_is_antigravity(&client) == false || request.tools.as_ref().is_none_or(|t| t.is_empty()),\n    \"antigravity route requires a text-only turn\"\n);","typeGuard":"fn route_accepts_tools(provider: ApiProvider) -> bool {\n    provider != ApiProvider::Antigravity\n}","tryCatchPattern":"let request = if request.tools.as_ref().is_some_and(|t| !t.is_empty()) && provider != ApiProvider::Antigravity {\n    request\n} else {\n    request.without_tools() // degrade to text-only instead of failing the turn\n};","preventionTips":["Disable the default tool catalog in config for antigravity sessions","Switch to the google provider before attaching tools","Treat 'tools not implemented' as permanent for that route — never retry unchanged"],"tags":["antigravity","cloud-code","tools","unsupported-operation","rust"],"backgroundTag":"tools-unsupported-provider","analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}