- Issue created by @dotist
- 🇨🇭Switzerland das-peter
@dotist please have a look at the patch provided here: https://www.drupal.org/project/ai_tmgmt/issues/3529800#comment-16143974 🐛 Fresh install lists AI provider as (not available) when no model is configured Active (diff: https://git.drupalcode.org/project/ai_tmgmt/-/merge_requests/12.diff)
I thought I missed something but it looks like that integration is indeed missing. - 🇳🇱Netherlands jurriaanroelofs
For me the setting is working but it's just not doing what the UI text says it is doing. When enabling that option the module will use the ai_translate_text mode of the AI module and I believe that leads to using whatever provider you have enabled for "Translate Text" at /admin/config/ai/settings
If you have nothing set there you will just get the basic prompt.
In our provider module (ai_provider_dxpr) we do implement the translation interface in order to use a custom translation prompt system. However this is not integrated with ai_translate module. So for me the bug is that enabling this setting requires that you enable the ai_translate module which is simply not needed in our use case.
- 🇳🇱Netherlands jurriaanroelofs
The issue here is that ai_translate registers its chat_translation provider as the default for translate_text, so the model_selection_type setting gets ignored.
I implemented a 3-option approach: one that uses ai_translate's per-language prompts directly via chat (bypassing
translate_text), one that uses the provider's native translate_text implementation, and the original basic prompt
option.The key was making the ai_translate option read from ai_translate.settings directly instead of going through the
translate_text operation. Also had to handle the ProviderProxy wrapper correctly.Please check my MR, let me know if I need to make changes.
- 🇳🇱Netherlands jurriaanroelofs
Forgot to update the status. By the way I followed as well as I could the discussion leading to the current implementation of the translation interface:
https://www.drupal.org/project/ai/issues/3478721 📌 Discuss: Unify translate operations over ai ActiveIn order to test the second option (use AI Provider Translation Interface) you need to use a provider that implements this interface. As the discussion linked above mentions non of the providers included in the AI module support this. To test it you can use our provider:
https://www.drupal.org/project/ai_provider_dxpr →
You can get a free key and dont need any payment information, just a free account registration at dxpr.com. Not trying to promote anything but I reckon you would want to test all 3 options.
- Merge request !14Fix Use the configuration from the AI Translate module → (Open) created by scott_euser