Batch API: job with 446 inline image requests SUCCEEDED but batches.get returns no dest/inlinedResponses (results lost)

Fermée
#3,100 3 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@Venkaiahbabuneelam y travaille déjà.

Depuis le 12/10/2026.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
48/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
python
Domaine
api

Piste de recherche

Start by reading the batch retrieval path used by client.batches.get and compare its handling of the v1beta response with the raw REST body described here. Check how batch destinations and inline responses are parsed, and look for related tests covering batches.get. Done means a succeeded job returns accessible results or reports a clear retrieval error when results are missing.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

priority: p2 status:awaiting user response status:stale type: bug

Environment

  • google-genai 2.28.0
  • Python 3.12.15
  • macOS 27.0.1 (arm64)

Describe the bug
A Batch API job with 446 inline requests to gemini-3-pro-image (image output,
2K, 9:16) finished server-side, but its results can't be retrieved.

  • Job: batches/m887ve3h1flytwqwubpkogmtx2ngm5lytfus
  • Created 2026-10-11 15:43 UTC; batches.list shows BATCH_STATE_SUCCEEDED, ended 15:50 UTC.
  • client.batches.get(name=...) returns a job where state is None and dest is None,
    so the SDK raises AttributeError ('NoneType' object has no attribute 'name').
  • The raw REST GET on v1beta returns only {"name": "...", "done": true} (77 bytes),
    with no metadata, response or inlinedResponses.
  • v1alpha and v1 return 503 UNAVAILABLE intermittently, and the same 77-byte body otherwise.
  • I retried every ~90 s for 30+ minutes on all three versions with the same result.
  • No output file appears in the Files API.

A job of 126 inline requests on the same project and model, built the same way,
works normally. My guess is that the inline response payload (~4 GB of images)
is too large to be returned by the operation GET.

Expected behavior
Either the results can be retrieved (inline or via an output file), or creation
is rejected / the job fails with a clear size-limit error before images are
generated and billed.

Steps to reproduce

  1. Create a batch with ~450 InlinedRequest items for gemini-3-pro-image with
    response_modalities=["IMAGE"] and image_config(aspect_ratio="9:16", image_size="2K").
  2. Wait for BATCH_STATE_SUCCEEDED in batches.list.
  3. Call client.batches.get(name=job.name): state and dest come back None.

Impact
446 images (~USD 30 at batch pricing) were billed and never delivered.

Langage dominant
Python
Étoiles
4.1k
Forks
1.1k
Merge moyen
1 j 20 h
PR mergées (30 j)
109

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de googleapis/python-genai

Toutes les issues de googleapis/python-genai

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.