{
 "action": "Not for automatic application — after the patch the example still uses getImagenModel, which the verified example does not: the patch covers part of the change. Show this correction to the user as a lead. Review before applying: this fix runs on firebase 13.1.0, but its printed output differs from what the original printed on 12.11.0 (observed stdout of one example) — it may do different work. Replace the old line with the new one; the rest of the code can stay.",
 "alternatives": [],
 "applicability": {
  "leftover": [
   "getImagenModel"
  ],
  "line": 6,
  "method": "literal_patch",
  "occurrences": 1,
  "patched_sha": "546f90075dc4",
  "reason": "after the patch the example still uses getImagenModel, which the verified example does not: the patch covers part of the change",
  "run_on": "13.1.0",
  "status": "incomplete"
 },
 "by_notes": true,
 "changelog_ref": {
  "quote": "Imagen methods and types have been removed due to Imagen models being shut down.",
  "url": "https://github.com/firebase/firebase-js-sdk/releases"
 },
 "confirmations": {
  "failed": 0,
  "worked": 2
 },
 "detect": [
  "getImagenModel"
 ],
 "ecosystem": "npm",
 "equivalence": "differs",
 "error_kind": "not_function",
 "error_signature": {
  "message": "getImagenModel is not a function",
  "norm": "not_function:getimagenmodel",
  "type": "TypeError"
 },
 "first_seen": "2026-10-27T06:41:02+00:00",
 "format": "replace",
 "format_version": 2,
 "id": "npm/firebase/13.1.0/0003",
 "kind": "behavior_changed",
 "license": "https://creativecommons.org/licenses/by/4.0/",
 "package": "firebase",
 "proof": {
  "applicability": {
   "leftover": [
    "getImagenModel"
   ],
   "line": 6,
   "method": "literal_patch",
   "occurrences": 1,
   "patched_sha": "546f90075dc4",
   "reason": "after the patch the example still uses getImagenModel, which the verified example does not: the patch covers part of the change",
   "run_on": "13.1.0",
   "status": "incomplete"
  },
  "auto_apply": false,
  "auto_apply_reason": "the fix's output differs from the original's; the patch gives incomplete when applied word for word",
  "auto_apply_rule": "Automatic application is allowed only when proof.equivalent is true and proof.applicability.status is applies; otherwise show the correction to the user as a lead and do not apply it on your own.",
  "equivalence": "differs",
  "equivalent": false,
  "fails_on": "13.1.0",
  "fixed_on": "13.1.0",
  "level": "differential",
  "method": {
   "fix_on": "13.1.0",
   "name": "stdout_match",
   "normalization": "lines stripped, blank lines dropped, runs of whitespace collapsed; memory addresses, timestamps and temporary paths masked",
   "original_on": "12.11.0",
   "scope": "the observable stdout of one example script; return values, files, other inputs and exception types are not compared, so a match is not a proof of equivalent behaviour"
  },
  "script_right": "// Initializes a Firebase app with placeholder config, gets the Firebase AI\n// instance, creates a Gemini image model handle, and prints the resolved model name.\n// No images are generated and no network requests are made.\n\nconst { initializeApp, deleteApp } = require(\"firebase/app\");\nconst { getAI, getGenerativeModel, GoogleAIBackend } = require(\"firebase/ai\");\n\nasync function main() {\n  const firebaseConfig = {\n    apiKey: \"placeholder-api-key\",\n    authDomain: \"placeholder-project.firebaseapp.com\",\n    projectId: \"placeholder-project\",\n    storageBucket: \"placeholder-project.appspot.com\",\n    messagingSenderId: \"000000000000\",\n    appId: \"1:000000000000:web:0000000000000000000000\",\n  };\n\n  const app = initializeApp(firebaseConfig);\n\n  try {\n    const ai = getAI(app, { backend: new GoogleAIBackend() });\n\n    // Creating the model handle is purely local; it does not call the network.\n    const imagenModel = getGenerativeModel(ai, {\n      model: \"gemini-2.5-flash-image\",\n    });\n\n    console.log(\"Model name:\", imagenModel.model);\n  } finally {\n    await deleteApp(app);\n  }\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch((err) => {\n    console.error(err);\n    process.exit(1);\n  });",
  "script_wrong": "// Initializes a Firebase app with placeholder config, gets the Firebase AI\n// instance, creates an Imagen model handle, and prints the resolved model name.\n// No images are generated and no network requests are made.\n\nconst { initializeApp, deleteApp } = require(\"firebase/app\");\nconst { getAI, getImagenModel, GoogleAIBackend } = require(\"firebase/ai\");\n\nasync function main() {\n  const firebaseConfig = {\n    apiKey: \"placeholder-api-key\",\n    authDomain: \"placeholder-project.firebaseapp.com\",\n    projectId: \"placeholder-project\",\n    storageBucket: \"placeholder-project.appspot.com\",\n    messagingSenderId: \"000000000000\",\n    appId: \"1:000000000000:web:0000000000000000000000\",\n  };\n\n  const app = initializeApp(firebaseConfig);\n\n  try {\n    const ai = getAI(app, { backend: new GoogleAIBackend() });\n\n    // Creating the model handle is purely local; it does not call the network.\n    const imagenModel = getImagenModel(ai, {\n      model: \"imagen-3.0-generate-002\",\n    });\n\n    console.log(\"Model name:\", imagenModel.model);\n  } finally {\n    await deleteApp(app);\n  }\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch((err) => {\n    console.error(err);\n    process.exit(1);\n  });",
  "works_on": "12.11.0"
 },
 "right": "const { getAI, getGenerativeModel, GoogleAIBackend } = require(\"firebase/ai\");",
 "seen_in_models": [
  "claude-sonnet-5-5",
  "gpt-6.1-sol"
 ],
 "seq": 3,
 "slug": "getimagenmodel",
 "source": "pipeline",
 "symbol": "getImagenModel",
 "updated": "2026-10-27T17:19:58+00:00",
 "url": "https://formachines.ai/errata/npm/firebase/0003-getimagenmodel/",
 "variant_confirmations": 2,
 "variant_models": [
  "claude-sonnet-5-5",
  "gpt-6.1-sol"
 ],
 "verified": "sandbox",
 "versions": {
  "changed_in": ">12.11.0,<=13.1.0",
  "fails_on": "13.1.0",
  "works_on": "12.11.0"
 },
 "wrong": "const { getAI, getImagenModel, GoogleAIBackend } = require(\"firebase/ai\");"
}