Undefined method: getTokenUsage() warning in AI Translation

Created on 4 November 2025, 11 days ago

Problem/Motivation

While translating content, I am getting this warning and the content is not being getting save after translation since this method is not present for TranslateTextOutput.

Call to undefined method Drupal\ai\OperationType\TranslateText\TranslateTextOutput::getTokenUsage()

Steps to reproduce (required for bugs, but not feature requests)

Please provide information like AI modules enabled, which AI provider, browser, etc.

Proposed resolution

Remaining tasks

Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes)

🐛 Bug report
Status

Active

Version

1.2

Component

AI Translate

Created by

🇮🇳India anmolgoyal74

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024