Skip to content

Support Vertex AI batch behavior for inline requests #1683

Description

@dani-mp

Please add support for inline batch requests when using GoogleGenAI with vertexai: true, so existing inline batch flows can be migrated to Vertex AI without adding GCS/BigQuery input/output plumbing.

Environment details

  • Programming language: TypeScript
  • OS: macOS
  • Language runtime version: Node.js 22
  • Package version: latest

Steps to reproduce

  1. Create a GoogleGenAI client with Vertex AI enabled:

    const ai = new GoogleGenAI({
      vertexai: true,
      project: 'PROJECT_ID',
      location: 'LOCATION',
    })
  2. Call ai.batches.create() with inline requests as src:

    await ai.batches.create({
      model: 'gemini-2.5-pro',
      src: [
        {
          contents: [{ text: 'Say hello' }],
        },
      ],
    })
  3. Observe that inline batch requests do not appear to be supported when using vertexai: true, even though they are supported by the Gemini Developer API through the same high-level SDK method.

Metadata

Metadata

Assignees

Labels

api: vertex-aiIssues related to the Vertex AI API.priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions