Looking good @majorrobot. Approved and merged.
We mob-programmed on this PR so credited all the folks. Thank you!
For the HTML and other content type issues that can be handled in future issues like <#3539369>
@majorrobot migration working well. Noticed that the example content-type didn't display fields on node view or edit so after enabling those I can see the values. I will share comparing AI response with what is being migrated.
No worries @majorrobot. Reviewing now
Ran into some bugs trying to enable the example module after re-doing my local site.
This solution https://www.drupal.org/project/ai/issues/3528549 ✨ Allow tool calling in streamed chat Active might make this redundant so something to watch as well.
I submitted a commit that captures the output of the function call if it is an instance of ExecutableFunctionCallInterface. Attaching new patch and inter diff.
Thank you @swirt. Looks good.
I have this script that I am testing with drush and it calls the function but doesn't generate an output. I left a comment on the MR
<?php
use Drupal\ai\OperationType\Chat\ChatInput;
use Drupal\ai\OperationType\Chat\ChatMessage;
use Drupal\ai\OperationType\Chat\Tools\ToolsInput;
$messages = new ChatInput([
new ChatMessage('user', 'What is 20 * (4 + 3)?'),
]);
$provider = \Drupal::service('ai.provider')->createInstance('gemini');
// Set a function call.
$functions = [];
$function_instances = [];
$function_call = \Drupal::service("plugin.manager.ai.function_calls")->createInstance('ai:calculator');
$function_instances[$function_call->getFunctionName()] = $function_call;
$functions[] = $function_call->normalize();
// Set chat tool.
$messages->setChatTools(new ToolsInput($functions));
/** @var \Drupal\ai\OperationType\Chat\ChatOutput $response */
$response = $provider->chat($messages, 'gemini-2.5-flash', ['my-custom-call']);
/** @var \Drupal\ai\OperationType\Chat\ChatMessage $return_message */
$return_message = $response->getNormalized();
echo $return_message->getText() . "\n";
// Returns something like "140"
Actually the signature has not changed between version 1 and 2, here is version 1 line https://github.com/google-gemini-php/client/blob/1.0.15/src/Data/Generat... (still an ?int)
An update, after enabling AI agents module and seeing that I can reference other tools like 'Calculator', I tried /admin/config/ai/explorers/chat_generator once again with xdebug and I can see that the code from the MR is calling the Calculator code it is just not outputting it to the screen as tool output. Maybe that is missing?
Trying to test this with /admin/config/ai/explorers/chat_generator and the existing HtmlToMarkdown function. I ran into an error with the generator not supporting the 'Top K' being a float. Here is the error
TypeError: Gemini\Data\GenerationConfig::__construct(): Argument #6 ($topK) must be of type ?int, float given, called in /var/www/html/web/modules/custom/gemini_provider/src/Plugin/AiProvider/GeminiProvider.php on line 260 in Gemini\Data\GenerationConfig->__construct() (line 39 of /var/www/html/vendor/google-gemini-php/client/src/Data/GenerationConfig.php)
Switching that argument type, I was able to generate code but not execute the function. I will continue to try to test but if someone has a better approach please do share.
Attaching a patch file for the current MR to test with.
Thank you @jibla for linking the issue. I can try to test that.
Content-type looks good. Thank you majorrobot
Taking a look.
Looking good @majorrobot. Thank you for the details and it makes sense.
Looking good @majorrobot and thank you for the easy to follow documentation. Left a few comments and here my tests:
Working URL:
dmundra in ~/workspace/community/ai_migration on branch 3537651-confirm-minimal-ai > ddev drush php-eval "print_r(\Drupal::service('ai_migration.ai_migrator')->convert('https://ndhurandhar.art/art/2025-06/artist-impression-rex'));"
```json
{
"title": "Artist impression of Rex"
}
```%
Non-existent URL:
dmundra in ~/workspace/community/ai_migration on branch 3537651-confirm-minimal-ai > ddev drush php-eval "print_r(\Drupal::service('ai_migration.ai_migrator')->convert('https://ndhurandhar.com'));"
[error] Failed to fetch content from URL https://ndhurandhar.com: cURL error 6: Could not resolve host: ndhurandhar.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://ndhurandhar.com
Thank you @majorrobot. Skeleton looks good and straightforward right now. Tests are passing. I left a comment about the convert function test.
Thank you @majorrobot. Approved and merged.
Thank you @kducharm. Merging.
Ready for review.
Ready for review.
I believe the tugboat preview does work and screenshots show that. To see it on this issue you have to close and re-open the MR.
Thank you @jaydarnell
How to QA
- Check out the branch from the MR
- Run
ddev restart
- Run
rm web/modules/custom/alt_text_validation/*
to remove all symlinks - Run
ddev symlink-project
- Run
ls -la web/modules/custom/alt_text_validation/
- Confirm the symlinks have been recreated correctly
Sounds good and ya I agree about just newer CVEs. We were just referencing an example about packages.
@greggles Dependency Track is showing both CVE now for both core and contrib but looks like the missing detail is which packages are affected. @grugnog pointed out these examples from the NIST database:
* https://nvd.nist.gov/vuln/detail/CVE-2020-13673 shows packages
* https://nvd.nist.gov/vuln/detail/CVE-2025-6676 currently does not show packages
Preview build was successful with the basic config file. Ready for review.
Ready for review. Let me know if you have any questions. Following the steps in CONTRIBUTING.md file allows one to spin up a ddev instance with the module and its dependencies.
Ready for review, there are a lot of warning but that could be worked on in another issue and then kept track with the gitlab pipeline.
Thank you @kducharm
Thank you @swirt for fixing it.
@swirt tried to re-run the jobs and it still failed.
Looking good merged.
timozura → credited dmundra → .
Looks good to me. I liked the improved interface.
I merged some changes from other tickets and went back trying that and I finally got it to generate styles. Not sure why it started working (also updated local to 10.5). I do see it generate a smaller image that is not encrypted.
Merged thank you.
This should follow the solution from #2946320
Fixed in #3287560
Merged into 8.x-1.x
Creating a MR to see if the tests and pipeline pass.
Thank you cmlara. I will try testing by removing the fix for scenario 1 and seeing if that makes scenario 2 happen.
Okay I fixed it following example from https://www.drupal.org/project/node_read_time/issues/3473652 🐛 Drupal 11 issue on config form, ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct() Fixed
Did get an error when trying to configure the settings
ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /var/lib/tugboat/src/Form/ContentRemindersSettingsForm.php on line 27 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 44 of /var/www/drupal/web/core/lib/Drupal/Core/Form/ConfigFormBase.php).
I used the tugboat site and installed upgrade_status to see if there are any updates needed other than the version upgrade and did not find any. See attached screenshot.
So this is ready for review.
Looks good @mkinnune. I was able to use the tugboat preview to confirm the module installs fine.
The case-insensitive check worked as well.
Looks good and tested it locally and it works.
I am not sure that image styles works at all as the Image styles process cannot read the file since it is not decrypted for it. I think that was pointed out in related issues.
For image styles to work, we would have to either a process where the image is decrypted then styles are applied and then re-encrypted. This would be issue that scenario 2 is getting at I believe. I don't see how else image styles would work. To sufficiently not cause unencrypted data at rest it would better to not sure that feature and for it to be removed.
Fixing this one in #3516802
This change was made in #3370418 so closing.
Reviewing MR https://git.drupalcode.org/project/drupal/-/merge_requests/12122 and seeing that on install.php https://mr12122-4loygljzig4n8abvsdn1mltxwszyebvg.tugboatqa.com/core/inst... of the tugboat site the versions are hashed.
I believe I tackled the first one by essentially not catching the exception and letting it be thrown all the way up. Not ideal but avoids the file being upload in an unencrypted status.
Completed in #3526491
Added and all steps are passing.