setTokenUsage fatal error
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3577921. --> Reported by: [jibla](https://www.drupal.org/user/1013184) Related to !34 >>> <p>[Tracker]<br> <strong>Update Summary: </strong>[One-line status update for stakeholders]<br> <strong>Check-in Date: </strong>MM/DD/YYYY<br> <strong>Additional Collaborators: </strong><br> <em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br> [/Tracker]</p> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>With Drupal 10.3 and AI module 1.1 we have this error for chat operations:</p> <p><code>Error: Call to undefined method Drupal\ai\OperationType\Chat\ChatOutput::setTokenUsage() in Drupal\gemini_provider\Plugin\AiProvider\GeminiProvider-&gt;setChatTokenUsage() (line 441 of /var/www/html/web/modules/contrib/gemini_provider/src/Plugin/AiProvider/GeminiProvider.php).</code></p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Check if AI Core does not support chattokenusage, do not use it.</p> <h3 id="summary-ai-usage">AI usage (if applicable)</h3> <p>[ ] AI Assisted Issue<br> This issue was generated with AI assistance, but was reviewed and refined by the creator.</p> <p>[ ] AI Assisted Code<br> This code was mainly generated by a human, with AI autocompleting or parts AI generated, but under full human supervision.</p> <p>[ ] AI Generated Code<br> This code was mainly generated by an AI with human guidance, and reviewed, tested, and refined by a human.</p> <p>[ ] Vibe Coded<br> This code was generated by an AI and has only been functionally tested.</p>
issue