{"record":{"id":"8a807b6305a11879","repo":"decolua/9router","slug":"antigravity-executor-not-found","errorCode":null,"errorMessage":"Antigravity executor not found","messagePattern":"Antigravity executor not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"open-sse/handlers/imageProviders/antigravity.js","lineNumber":32,"sourceCode":"  // Raw base64 string (assume PNG)\n  if (/^[A-Za-z0-9+/]/.test(input) && input.length > 100 && !input.startsWith(\"http\")) {\n    return { inlineData: { mimeType: \"image/png\", data: input } };\n  }\n  return null;\n}\n\nexport default {\n  // Delegate to executor instead of building URL/headers/body manually\n  useExecutor: true,\n\n  // Stubs - required by imageGenerationCore interface but unused with useExecutor\n  buildUrl: () => \"\",\n  buildHeaders: () => ({}),\n  buildBody: () => ({}),\n\n  async executeViaExecutor(model, body, credentials, log) {\n    const executor = getExecutor(\"antigravity\");\n    if (!executor) throw new Error(\"Antigravity executor not found\");\n\n    // Ensure we use an image model for image generation\n    const isImageModel = (m) => /image|imagen|image-generation/i.test(m || \"\");\n    let targetModel = isImageModel(model) ? model : \"gemini-3.1-flash-image\";\n\n    // If body.size is provided, resolve aspect ratio and append to model\n    if (body.size && typeof body.size === \"string\") {\n      const ratio = sizeToAspectRatio(body.size);\n      const suffix = ratio.replace(\":\", \"x\");\n      if (!targetModel.includes(suffix)) {\n        targetModel = `${targetModel}-${suffix}`;\n      }\n    }\n\n    // Build parts: text prompt + optional input image for editing\n    const parts = [{ text: body.prompt }];\n    const imageInput = body.image || (Array.isArray(body.images) && body.images[0]);\n    if (imageInput) {","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/decolua/9router/blob/90b52e06ffd666b7929554211474d01588f6b1f8/open-sse/handlers/imageProviders/antigravity.js#L14-L50","documentation":"Thrown by the Antigravity image adapter's executeViaExecutor (open-sse/handlers/imageProviders/antigravity.js:32) when getExecutor('antigravity') returns falsy. The image adapter is a thin delegate: it builds a chat-style body and hands everything to the antigravity chat executor for the correct request envelope and auth. Without that executor registered in open-sse/executors/index.js, delegation is impossible and the adapter fails fast instead of building a malformed request.","triggerScenarios":"An image-generation request routes to the antigravity image provider while the executor map in open-sse/executors/index.js has no 'antigravity' entry — typically because the executor module was not imported/registered (build tree missing it, custom fork stripped it), or the provider id was renamed in one place but not the other.","commonSituations":"Running a modified/trimmed build where executors/index.js was hand-edited and the antigravity import dropped; a custom provider id ('antigravity-pro') routed to this adapter; stale build cache after upgrading where new executor files were added but the bundle wasn't rebuilt.","solutions":["Ensure the antigravity executor exists and is exported in open-sse/executors/index.js (check the import and the id key match getExecutor('antigravity')).","Rebuild/restart the server after pulling updates so newly added executor modules are loaded.","If you renamed the provider, update both the provider registry id and the executor registration id so they match.","Verify with a quick node -e \"import('./open-sse/executors/index.js').then(m => console.log(!!m.getExecutor('antigravity')))\" against the built sources."],"exampleFix":"// before (executors/index.js)\nimport KiroExecutor from \"./kiro.js\";\n// after\nimport KiroExecutor from \"./kiro.js\";\nimport AntigravityExecutor from \"./antigravity.js\";\nconst executors = { ..., antigravity: new AntigravityExecutor() };","handlingStrategy":"type-guard","validationCode":"import { getExecutor } from \"./open-sse/executors/index.js\";\nif (typeof getExecutor !== \"function\" || !getExecutor(\"antigravity\")) {\n  throw new Error(\"antigravity executor is not registered — check executors/index.js\");\n}","typeGuard":"function antigravityAvailable() {\n  try { return Boolean(getExecutor(\"antigravity\")); } catch { return false; }\n}","tryCatchPattern":"try {\n  const image = await generateImage({ provider: \"antigravity\", ... });\n} catch (e) {\n  if (/Antigravity executor not found/.test(e.message)) {\n    return fallbackImageProvider(prompt); // e.g. route to an OpenAI-compatible image provider\n  }\n  throw e;\n}","preventionTips":["Never hand-edit the executor registration map without re-running registration checks.","Add a startup smoke test asserting every useExecutor image adapter has a matching executor.","Keep provider ids and executor ids in sync (single source of truth in config).","Rebuild after dependency/provider updates so new executor modules are bundled."],"tags":["configuration","executor","image-generation","registration","antigravity"],"backgroundTag":"executor-not-registered","analyzedSha":"90b52e06ffd666b7929554211474d01588f6b1f8","analyzedAt":"2026-08-30T21:05:45.952Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}