Magento 2 AI Review TranslatorMagento 2 AI Review Translator
Live Demo
Buy Now
Support
Live Demo
Buy Now
Support
  • Getting Started

    • Introduction
    • Key Features
    • How It Works
  • Installation

    • Requirements
    • Install the Module
    • Install the AI Packages
    • Enable & Compile
    • Verify the Installation
    • Content Security Policy
    • Translating the Interface
  • Setup

    • Enable the Module
    • Activate Your Licence
    • Select an LLM Provider
    • Validate & Load Models
    • First Translation
  • Configuration

    • Overview
    • General Settings
    • Limits & Timeouts
    • Store Views & Languages
    • Admin Menu
    • Access Control
  • LLM Providers

    • Provider Overview
    • How Validation Works
    • Choosing a Model
    • Switching Providers
  • Ollama (Self-Hosted)

    • Install Ollama
    • Connect to Magento
    • Timeouts & Batch Size
    • Troubleshooting
  • Translating Reviews

    • Translation Basics
    • What Is Sent to the Model
    • Fallback Behaviour
    • Automatic Translation
    • The Queue Consumer
    • Running the Consumer
    • Bulk CLI Command
    • Batch Size
    • CLI Output & Exit Codes
  • Storefront

    • On the Storefront
    • The Toggle
    • Styling
  • Developers

    • GraphQL API
    • Querying from Code
    • Data Model
    • Useful SQL
  • Help

    • Setup Problems
    • Translation Problems
    • Queue Problems
    • Storefront Problems
    • FAQ

Batch Size

Batching is the difference between 18 API calls and 350. It is also the setting most likely to cause a silent failure, so it gets its own page.

The trade-off

--batchTrade-off
1–5Slowest and most calls, but the most robust. Good for debugging or a slow local model.
20 (default)Sensible for most hosted providers.
50+Fewest calls. Needs a generous token ceiling or the JSON reply is truncated.

The arithmetic

With 350 reviews in one store view:

BatchAPI callsReduction
1350—
201895%
50798%

The command prints this reduction in its summary.

Batch size and max tokens move together

This is where translations silently fail

The model must return the whole batch as one JSON array. If LLM Max Token is too small for the batch, the reply is cut off, the JSON fails to parse, and every review in that batch falls back to its original text — with no error at all.

Raise the batch and you must raise the token ceiling, or clear it and use the provider default.

On Ollama, the timeout too

A large batch also needs a higher Ollama Request Timeout, because the request is non-streaming and returns nothing until the whole batch is generated. See Timeouts & Batch Size.

Finding your number

Start at the default, then test upward on one store view:

php bin/magento Translate:All -s 2 -b 40

Check the summary for warnings, then check for fallbacks:

SELECT COUNT(*)
FROM   ai_review_translation_list t
JOIN   review_detail d ON d.review_id = t.review_id
WHERE  t.store_id = 2 AND t.review_message = d.detail;

A jump in that count when you raise the batch means the ceiling is too low. Back off, or raise LLM Max Token.

An invalid value is not fatal

A --batch of 0 or a negative number prints a warning and falls back to 20.

Prev
Bulk CLI Command
Next
CLI Output & Exit Codes