[Google Drive plugin] Local image sidecar fails in batch_update_document with "Expected list but got dict"

Open 💬 0 comments Opened Jul 14, 2026 by Edd-Gao

What issue are you seeing?

The Google Drive plugin cannot insert a local image into a Google Doc through batch_update_document.

The exposed schema documents image_uris?: string and instructs callers to put the absolute local image path there, then use the same path as the non-public placeholder in insertInlineImage.uri.

That documented call fails before reaching the Google Docs API:

ValueError: Expected list but got <class 'dict'>

The same insertInlineImage request succeeds when image_uris is omitted and uri is a public HTTPS image URL.

Steps to reproduce

  1. Prepare a valid PNG such as /tmp/docs-logo.png.
  2. Call:
{
  "document_id": "<DOCUMENT_ID>",
  "image_uris": "/tmp/docs-logo.png",
  "requests": [{
    "insertInlineImage": {
      "location": {"index": 10, "tabId": "t.0"},
      "uri": "/tmp/docs-logo.png",
      "objectSize": {
        "height": {"magnitude": 48, "unit": "PT"},
        "width": {"magnitude": 48, "unit": "PT"}
      }
    }
  }]
}

Expected behavior

The connector uploads or proxies the image, rewrites the placeholder URI, and sends a valid insertInlineImage request to Google Docs.

Actual behavior

ValueError: Expected list but got <class 'dict'>

No document mutation occurs.

Environment and checks

  • Codex CLI version: 0.144.1
  • Google Drive plugin version: 0.1.10-alpha.1
  • Valid PNG used
  • Reproduced with and without objectSize
  • Reproduced with a local-path placeholder and a non-public HTTPS placeholder
  • Public HTTPS image URL succeeds as a control
  • The failure appears to occur in the connector's image_uris preprocessing layer

View original on GitHub ↗