The ai_provider_litellm module does not implement the translate_text operation type, which means it cannot be selected as a provider for AI-powered content translation (e.g. with the ai_translate module).

The translate_text operation type is missing from getSupportedOperationTypes(), there is no translateText() method, and TranslateTextInterface is not implemented. As a result, LiteLLM does not appear as an option in the AI module's provider settings for text translation.

Steps to reproduce:

Install ai_provider_litellm and configure a valid LiteLLM server.
Go to /admin/config/ai/settings.
Look at the "Translate text" operation type row.
Expected behavior:
LiteLLM appears as a selectable provider for the "Translate text" operation, with chat-capable models available.

Actual behavior:
LiteLLM is not listed as an option for "Translate text".

Proposed solution:
Implement TranslateTextInterface in LiteLlmAiProvider. The translateText() method can delegate to the existing chat() method by building a translation prompt — the same pattern used by the Gemini provider. Any model that supports chat can handle translation. The translate_text case in getModels() should return chat-capable models.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

carlos romero created an issue. See original summary.

carlos romero’s picture

Title: Título: LiteLLM provider does not support translate_text operation type » LiteLLM provider does not support translate_text operation type

carlos romero changed the visibility of the branch 3614792-ttulo-litellm-provider to hidden.

carlos romero’s picture

Status: Active » Needs review
dan2k3k4’s picture

Status: Needs review » Fixed

Thanks, merged!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.