{
 "action": "Not for automatic application — after the patch the example still uses VertexAIBackend, which the verified example does not: the patch covers part of the change. Show this correction to the user as a lead. Replace the old line with the new one; the rest of the code can stay.",
 "alternatives": [
  {
   "action": "Not for automatic application — format removed: there is no replacement to apply. Show this correction to the user as a lead. VertexAIBackend is not available in firebase 13.1.0; remove or replace this use. The same code works on firebase 12.11.0: pin a version before 13.1.0 if you cannot change the code. Release notes: getAI(app, { backend: new AgentPlatformBackend('us-central1') });",
   "applicability": {
    "method": "literal_patch",
    "reason": "format removed: there is no replacement to apply",
    "run_on": "13.1.0",
    "status": "not_applicable"
   },
   "by_notes": true,
   "changelog_ref": {
    "quote": "Removed the previously deprecated `VertexAIBackend` (and `BackendType.VERTEX_AI`). Use `AgentPlatformBackend` (and `BackendType.AGENT_PLATFORM`) instead.",
    "url": "https://github.com/firebase/firebase-js-sdk/releases/tag/@firebase/remote-config@0.8.4"
   },
   "confirmations": 2,
   "detect": [
    "VertexAIBackend"
   ],
   "equivalence": "not_comparable",
   "format": "removed",
   "kind": "removed",
   "right": "",
   "script_right": "'use strict';\n\nconst { initializeApp } = require('firebase/app');\nconst {\n  getAI,\n  getGenerativeModel,\n  AgentPlatformBackend,\n} = require('firebase/ai');\n\nconst app = initializeApp({\n  projectId: 'demo-project',\n  apiKey: 'fake-api-key',\n  appId: '1:123456789012:web:fake-app-id',\n});\n\nconst backend = new AgentPlatformBackend('europe-west4');\nconst ai = getAI(app, { backend });\n\nconst model = getGenerativeModel(ai, {\n  model: 'gemini-2.0-flash',\n});\n\n// Creating the model does not send a request.\nconsole.log('Backend type:', backend.backendType);\nconsole.log('Location:', backend.location);\nconsole.log('Resolved model name:', model.model);",
   "script_wrong": "'use strict';\n\nconst { initializeApp } = require('firebase/app');\nconst {\n  getAI,\n  getGenerativeModel,\n  VertexAIBackend,\n} = require('firebase/ai');\n\nconst app = initializeApp({\n  projectId: 'demo-project',\n  apiKey: 'fake-api-key',\n  appId: '1:123456789012:web:fake-app-id',\n});\n\nconst backend = new VertexAIBackend('europe-west4');\nconst ai = getAI(app, { backend });\n\nconst model = getGenerativeModel(ai, {\n  model: 'gemini-2.0-flash',\n});\n\n// Creating the model does not send a request.\nconsole.log('Backend type:', backend.backendType);\nconsole.log('Location:', backend.location);\nconsole.log('Resolved model name:', model.model);",
   "seen_in_models": [
    "gpt-6.1-sol"
   ],
   "wrong": "VertexAIBackend,"
  },
  {
   "action": "Not for automatic application — after the patch the example still uses VertexAIBackend, 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.",
   "applicability": {
    "leftover": [
     "VertexAIBackend",
     "getImagenModel"
    ],
    "line": 4,
    "method": "literal_patch",
    "occurrences": 1,
    "patched_sha": "9a02cf1d24a8",
    "reason": "after the patch the example still uses VertexAIBackend, getImagenModel, which the verified example does not: the patch covers part of the change",
    "run_on": "13.1.0",
    "status": "incomplete"
   },
   "by_notes": false,
   "changelog_ref": {
    "quote": "",
    "url": ""
   },
   "confirmations": 1,
   "detect": [
    "VertexAIBackend"
   ],
   "equivalence": "differs",
   "format": "replace",
   "kind": "behavior_changed",
   "right": "const { getAI, getGenerativeModel, AgentPlatformBackend } = require('firebase/ai');",
   "script_right": "'use strict';\n\nconst { initializeApp, deleteApp } = require('firebase/app');\nconst { getAI, getGenerativeModel, AgentPlatformBackend } = require('firebase/ai');\n\nasync function main() {\n  const app = initializeApp({\n    apiKey: 'placeholder-api-key',\n    authDomain: 'placeholder-project.firebaseapp.com',\n    projectId: 'placeholder-project',\n    appId: '1:123456789012:web:0123456789abcdef'\n  });\n\n  try {\n    const ai = getAI(app, { backend: new AgentPlatformBackend() });\n    const model = getGenerativeModel(ai, {\n      model: 'gemini-2.5-flash-image'\n    });\n\n    console.log(model.model);\n  } finally {\n    await deleteApp(app);\n  }\n}\n\nmain();",
   "script_wrong": "'use strict';\n\nconst { initializeApp, deleteApp } = require('firebase/app');\nconst { getAI, getImagenModel, VertexAIBackend } = require('firebase/ai');\n\nasync function main() {\n  const app = initializeApp({\n    apiKey: 'placeholder-api-key',\n    authDomain: 'placeholder-project.firebaseapp.com',\n    projectId: 'placeholder-project',\n    appId: '1:123456789012:web:0123456789abcdef'\n  });\n\n  try {\n    const ai = getAI(app, { backend: new VertexAIBackend() });\n    const model = getImagenModel(ai, {\n      model: 'imagen-3.0-generate-002'\n    });\n\n    console.log(model.model);\n  } finally {\n    await deleteApp(app);\n  }\n}\n\nmain();",
   "seen_in_models": [
    "gpt-6.1-sol"
   ],
   "wrong": "const { getAI, getImagenModel, VertexAIBackend } = require('firebase/ai');"
  }
 ],
 "applicability": {
  "leftover": [
   "VertexAIBackend"
  ],
  "line": 2,
  "method": "literal_patch",
  "occurrences": 1,
  "patched_sha": "65844846ae69",
  "reason": "after the patch the example still uses VertexAIBackend, which the verified example does not: the patch covers part of the change",
  "run_on": "13.1.0",
  "status": "incomplete"
 },
 "by_notes": false,
 "changelog_ref": {
  "quote": "",
  "url": ""
 },
 "confirmations": {
  "failed": 0,
  "worked": 9
 },
 "detect": [
  "VertexAIBackend"
 ],
 "ecosystem": "npm",
 "equivalence": "same",
 "error_kind": "not_constructor",
 "error_signature": {
  "message": "VertexAIBackend is not a constructor",
  "norm": "not_constructor:vertexaibackend",
  "type": "TypeError"
 },
 "first_seen": "2026-10-27T06:41:02+00:00",
 "format": "replace",
 "format_version": 2,
 "id": "npm/firebase/13.1.0/0001",
 "kind": "changed",
 "license": "https://creativecommons.org/licenses/by/4.0/",
 "package": "firebase",
 "proof": {
  "applicability": {
   "leftover": [
    "VertexAIBackend"
   ],
   "line": 2,
   "method": "literal_patch",
   "occurrences": 1,
   "patched_sha": "65844846ae69",
   "reason": "after the patch the example still uses VertexAIBackend, 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 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": "same",
  "equivalent": true,
  "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": "const { initializeApp, deleteApp } = require(\"firebase/app\");\nconst { getAI, AgentPlatformBackend } = require(\"firebase/ai\");\n\nasync function main() {\n  // Placeholder configuration values (no network access is needed)\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  // Get a Firebase AI instance using the Vertex AI backend in europe-west4\n  const ai = getAI(app, { backend: new AgentPlatformBackend(\"europe-west4\") });\n\n  // Print the location the AI instance reports\n  console.log(ai.backend.location);\n\n  await deleteApp(app);\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch((err) => {\n    console.error(err);\n    process.exit(1);\n  });",
  "script_wrong": "const { initializeApp, deleteApp } = require(\"firebase/app\");\nconst { getAI, VertexAIBackend } = require(\"firebase/ai\");\n\nasync function main() {\n  // Placeholder configuration values (no network access is needed)\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  // Get a Firebase AI instance using the Vertex AI backend in europe-west4\n  const ai = getAI(app, { backend: new VertexAIBackend(\"europe-west4\") });\n\n  // Print the location the AI instance reports\n  console.log(ai.location);\n\n  await deleteApp(app);\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, AgentPlatformBackend } = require(\"firebase/ai\");",
 "seen_in_models": [
  "claude-sonnet-5-5",
  "gpt-6.1-sol"
 ],
 "seq": 1,
 "slug": "vertexaibackend",
 "source": "pipeline",
 "symbol": "VertexAIBackend",
 "updated": "2026-10-27T17:19:59+00:00",
 "url": "https://formachines.ai/errata/npm/firebase/0001-vertexaibackend/",
 "variant_confirmations": 6,
 "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, VertexAIBackend } = require(\"firebase/ai\");"
}