{
 "action": "Not for automatic application — after the patch the example still uses outputs, 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.",
 "agent_rule": "Apply a correction on your own only when the installed version is one it was checked on (versions.checked_on: versions.fails_on and every recheck) and its proof.auto_apply is true (proof.equivalent is true and proof.applicability.status is applies). On a newer version than those checked, a version between versions.works_on and versions.fails_on, or an unknown version, show it to the user as a lead and do not apply it; on versions.works_on or older it does not apply.",
 "alternatives": [],
 "applicability": {
  "leftover": [
   "outputs"
  ],
  "line": 42,
  "method": "literal_patch",
  "occurrences": 1,
  "patched_sha": "9e5f6c5a632e",
  "reason": "after the patch the example still uses outputs, which the verified example does not: the patch covers part of the change",
  "run_on": "2.34.0",
  "status": "incomplete"
 },
 "by_notes": true,
 "changelog_ref": {
  "quote": "Update code to read response content from the steps array instead of outputs.",
  "url": "https://github.com/googleapis/python-genai/releases/tag/v1.72.0"
 },
 "confirmations": {
  "failed": 0,
  "worked": 1
 },
 "detect": [
  "outputs"
 ],
 "ecosystem": "pypi",
 "equivalence": "same",
 "error_kind": "missing_import",
 "error_signature": {
  "message": "Install a google-genai version with Interactions API support.",
  "norm": "missing_import:",
  "type": "ImportError"
 },
 "first_seen": "2026-10-31T06:39:35+00:00",
 "format": "replace",
 "format_version": 2,
 "id": "pypi/google-genai/2.34.0/0001",
 "kind": "behavior_changed",
 "license": "https://creativecommons.org/licenses/by/4.0/",
 "package": "google-genai",
 "proof": {
  "applicability": {
   "leftover": [
    "outputs"
   ],
   "line": 42,
   "method": "literal_patch",
   "occurrences": 1,
   "patched_sha": "9e5f6c5a632e",
   "reason": "after the patch the example still uses outputs, which the verified example does not: the patch covers part of the change",
   "run_on": "2.34.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": "2.34.0",
  "fixed_on": "2.34.0",
  "level": "differential",
  "method": {
   "fix_on": "2.34.0",
   "name": "stdout_match",
   "normalization": "lines stripped, blank lines dropped, runs of whitespace collapsed; memory addresses, timestamps and temporary paths masked",
   "original_on": "1.69.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": "#!/usr/bin/env python3\n\"\"\"Load a saved Gemini interaction locally; no client or network calls.\"\"\"\n\nfrom importlib import import_module\n\n\ndef get_interaction_type():\n    # Accommodate SDK versions that expose interaction models differently.\n    for module_name in (\n        \"google.genai._interactions.types\",\n        \"google.genai.interactions.types\",\n        \"google.genai.types\",\n        \"google.genai._interactions.types.interaction\",\n        \"google.genai.interactions.types.interaction\",\n    ):\n        try:\n            module = import_module(module_name)\n        except ModuleNotFoundError as exc:\n            if exc.name and (\n                module_name == exc.name or module_name.startswith(exc.name + \".\")\n            ):\n                continue\n            raise\n\n        interaction_type = getattr(module, \"Interaction\", None)\n        if interaction_type is not None:\n            return interaction_type\n\n    # NOTE: No SDK export of `Interaction` could be verified for google-genai\n    # 2.34.0, so fall back to reading the saved response as a plain dict\n    # instead of raising ImportError.\n    return None\n\n\ndef main():\n    # Replace this dictionary with your saved Interactions API response.\n    # NOTE: Per the release notes, content is now returned in `steps` instead\n    # of `outputs`. The shape of each step below is assumed to match the old\n    # output items; adjust it to match your actual saved response.\n    saved_response = {\n        \"id\": \"saved-interaction\",\n        \"object\": \"interaction\",\n        \"created\": \"2026-01-01T00:00:00Z\",\n        \"updated\": \"2026-01-01T00:00:01Z\",\n        \"model\": \"gemini-2.5-flash\",\n        \"role\": \"model\",\n        \"status\": \"completed\",\n        \"steps\": [\n            {\n                \"type\": \"text\",\n                \"text\": \"Hello from the saved interaction!\",\n            }\n        ],\n        \"usage\": {\n            \"total_input_tokens\": 5,\n            \"total_output_tokens\": 8,\n            \"total_tokens\": 13,\n        },\n    }\n\n    Interaction = get_interaction_type()\n    if Interaction is not None:\n        interaction = Interaction.model_validate(saved_response)\n        steps = interaction.steps\n    else:\n        steps = saved_response.get(\"steps\")\n\n    if steps:\n        final_step = steps[-1]\n        if isinstance(final_step, dict):\n            if final_step.get(\"type\") == \"text\":\n                print(final_step.get(\"text\"))\n        elif getattr(final_step, \"type\", None) == \"text\":\n            print(final_step.text)\n\n\nif __name__ == \"__main__\":\n    main()",
  "script_wrong": "#!/usr/bin/env python3\n\"\"\"Load a saved Gemini interaction locally; no client or network calls.\"\"\"\n\nfrom importlib import import_module\n\n\ndef get_interaction_type():\n    # Accommodate SDK versions that expose interaction models differently.\n    for module_name in (\n        \"google.genai._interactions.types\",\n        \"google.genai.interactions.types\",\n        \"google.genai.types\",\n        \"google.genai._interactions.types.interaction\",\n        \"google.genai.interactions.types.interaction\",\n    ):\n        try:\n            module = import_module(module_name)\n        except ModuleNotFoundError as exc:\n            if exc.name and (\n                module_name == exc.name or module_name.startswith(exc.name + \".\")\n            ):\n                continue\n            raise\n\n        interaction_type = getattr(module, \"Interaction\", None)\n        if interaction_type is not None:\n            return interaction_type\n\n    raise ImportError(\"Install a google-genai version with Interactions API support.\")\n\n\ndef main():\n    # Replace this dictionary with your saved Interactions API response.\n    saved_response = {\n        \"id\": \"saved-interaction\",\n        \"object\": \"interaction\",\n        \"created\": \"2026-01-01T00:00:00Z\",\n        \"updated\": \"2026-01-01T00:00:01Z\",\n        \"model\": \"gemini-2.5-flash\",\n        \"role\": \"model\",\n        \"status\": \"completed\",\n        \"outputs\": [\n            {\n                \"type\": \"text\",\n                \"text\": \"Hello from the saved interaction!\",\n            }\n        ],\n        \"usage\": {\n            \"total_input_tokens\": 5,\n            \"total_output_tokens\": 8,\n            \"total_tokens\": 13,\n        },\n    }\n\n    Interaction = get_interaction_type()\n    interaction = Interaction.model_validate(saved_response)\n\n    if interaction.outputs:\n        final_output = interaction.outputs[-1]\n        if getattr(final_output, \"type\", None) == \"text\":\n            print(final_output.text)\n\n\nif __name__ == \"__main__\":\n    main()",
  "works_on": "1.69.0"
 },
 "right": "\"steps\": [",
 "seen_in_models": [
  "gpt-6.1-sol"
 ],
 "seq": 1,
 "slug": "interaction-outputs",
 "source": "pipeline",
 "symbol": "interaction.outputs",
 "updated": "2026-10-31T06:39:35+00:00",
 "url": "https://formachines.ai/errata/pypi/google-genai/0001-interaction-outputs/",
 "variant_confirmations": 1,
 "variant_models": [
  "gpt-6.1-sol"
 ],
 "verified": "sandbox",
 "versions": {
  "changed_in": ">1.69.0,<=2.34.0",
  "checked_on": [
   "2.34.0"
  ],
  "fails_on": "2.34.0",
  "works_on": "1.69.0"
 },
 "wrong": "\"outputs\": ["
}