Eugene, OR
Account created on 20 July 2010, about 15 years ago
#

Merge Requests

More

Recent comments

🇺🇸United States dmundra Eugene, OR

Confirmed the update fixes the JS error. Thank you @muriqui

🇺🇸United States dmundra Eugene, OR

Attaching tugboat screenshots from 🐛 Invalid boolean values in recurring_events_create_form.js Active where it is failing and from here where it is passing.

Failing:

Passing:

🇺🇸United States dmundra Eugene, OR

dmundra created an issue.

🇺🇸United States dmundra Eugene, OR

Removed the config.yaml file and updated the contributing instructions. The test is to pull down the branch locally (ideally in a fresh repo) and follow the steps in CONTRIBUTING.md to install ddev and get a site running.

🇺🇸United States dmundra Eugene, OR

Thank you @webbywe. Approved and merged.

🇺🇸United States dmundra Eugene, OR

I updated the tests and left comments on a few things I noticed.

🇺🇸United States dmundra Eugene, OR

dmundra made their first commit to this issue’s fork.

🇺🇸United States dmundra Eugene, OR

Looks good @majorrobot, anything specific I should test other then the migration works?

🇺🇸United States dmundra Eugene, OR

I agree @majorrobot

This MR is available to use for testing. Setting it postponed for now.

🇺🇸United States dmundra Eugene, OR

I think either add it to Support tools calling Active or copy the changes from that ticket to Upgrade to 2.0 version of google-gemini-php Active and then add it there.

🇺🇸United States dmundra Eugene, OR

I followed https://jaybeaton.com/blog/how-use-version-module-drupal-issue-fork-comp... to install the issue fork https://git.drupalcode.org/issue/gemini_provider-3519469 code as a package to the composer.json so it can be installed locally for testing.

Adding tests/ai-test-drush-scripts/GeminiFunctionCallTester.php to test function calls.

QA steps:

  1. Checkout the branch from this issue's MR.
  2. Run ddev like normal
  3. Run ddev poser to install different version of the gemini_provider module and the dependencies google-gemini-php/client and drupal/ai_agents
  4. Configure Gemini AI following contributing steps (if haven't done before)
  5. Run ddev drush php-script tests/ai-test-drush-scripts/GeminiFunctionCallTester.php
  6. Confirm it outpus 140. Change the prompt in the test file and run it again to confirm the calculator function works.
🇺🇸United States dmundra Eugene, OR

Looking good @majorrobot. Approved and merged.

🇺🇸United States dmundra Eugene, OR

We mob-programmed on this PR so credited all the folks. Thank you!

🇺🇸United States dmundra Eugene, OR

For the HTML and other content type issues that can be handled in future issues like <#3539369>

🇺🇸United States dmundra Eugene, OR

@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.

🇺🇸United States dmundra Eugene, OR

No worries @majorrobot. Reviewing now

🇺🇸United States dmundra Eugene, OR

Ran into some bugs trying to enable the example module after re-doing my local site.

🇺🇸United States dmundra Eugene, OR

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.

🇺🇸United States dmundra Eugene, OR

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.

🇺🇸United States dmundra Eugene, OR

Thank you @swirt. Looks good.

🇺🇸United States dmundra Eugene, OR

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"
🇺🇸United States dmundra Eugene, OR

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)

🇺🇸United States dmundra Eugene, OR

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?

🇺🇸United States dmundra Eugene, OR

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.

🇺🇸United States dmundra Eugene, OR

Attaching a patch file for the current MR to test with.

🇺🇸United States dmundra Eugene, OR

Thank you @jibla for linking the issue. I can try to test that.

🇺🇸United States dmundra Eugene, OR

Content-type looks good. Thank you majorrobot

🇺🇸United States dmundra Eugene, OR

Looking good @majorrobot. Thank you for the details and it makes sense.

🇺🇸United States dmundra Eugene, OR

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
🇺🇸United States dmundra Eugene, OR

Thank you @majorrobot. Skeleton looks good and straightforward right now. Tests are passing. I left a comment about the convert function test.

🇺🇸United States dmundra Eugene, OR

Thank you @majorrobot. Approved and merged.

🇺🇸United States dmundra Eugene, OR

Thank you @kducharm. Merging.

🇺🇸United States dmundra Eugene, OR

Ready for review.

🇺🇸United States dmundra Eugene, OR

dmundra created an issue.

🇺🇸United States dmundra Eugene, OR

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.

🇺🇸United States dmundra Eugene, OR

dmundra made their first commit to this issue’s fork.

🇺🇸United States dmundra Eugene, OR

Thank you @jaydarnell

🇺🇸United States dmundra Eugene, OR

How to QA

  1. Check out the branch from the MR
  2. Run ddev restart
  3. Run rm web/modules/custom/alt_text_validation/* to remove all symlinks
  4. Run ddev symlink-project
  5. Run ls -la web/modules/custom/alt_text_validation/
  6. Confirm the symlinks have been recreated correctly
🇺🇸United States dmundra Eugene, OR

Sounds good and ya I agree about just newer CVEs. We were just referencing an example about packages.

🇺🇸United States dmundra Eugene, OR

@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

🇺🇸United States dmundra Eugene, OR

Preview build was successful with the basic config file. Ready for review.

🇺🇸United States dmundra Eugene, OR

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.

🇺🇸United States dmundra Eugene, OR

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.

🇺🇸United States dmundra Eugene, OR

Thank you @swirt for fixing it.

🇺🇸United States dmundra Eugene, OR

@swirt tried to re-run the jobs and it still failed.

🇺🇸United States dmundra Eugene, OR

Looking good merged.

🇺🇸United States dmundra Eugene, OR

dmundra made their first commit to this issue’s fork.

🇺🇸United States dmundra Eugene, OR

Looks good to me. I liked the improved interface.

🇺🇸United States dmundra Eugene, OR

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.

🇺🇸United States dmundra Eugene, OR

This should follow the solution from #2946320

🇺🇸United States dmundra Eugene, OR

Fixed in #3287560

🇺🇸United States dmundra Eugene, OR

Creating a MR to see if the tests and pipeline pass.

🇺🇸United States dmundra Eugene, OR

dmundra made their first commit to this issue’s fork.

🇺🇸United States dmundra Eugene, OR

dmundra created an issue.

🇺🇸United States dmundra Eugene, OR

dmundra created an issue.

🇺🇸United States dmundra Eugene, OR

dmundra created an issue.

🇺🇸United States dmundra Eugene, OR

dmundra created an issue.

🇺🇸United States dmundra Eugene, OR

Thank you cmlara. I will try testing by removing the fix for scenario 1 and seeing if that makes scenario 2 happen.

🇺🇸United States dmundra Eugene, OR

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

🇺🇸United States dmundra Eugene, OR

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).
Production build 0.71.5 2024