feat(ai): Enhance Google provider telemetry and AI object response handling

This commit introduces two key improvements:

1.  **Google Provider Telemetry:**
    - Updated  to include token usage data (, ) in the responses from  and .
    - This aligns the Google provider with others for consistent AI usage telemetry.

2.  **Robust AI Object Response Handling:**
    - Modified  to more flexibly handle responses from .
    - The add-task module now check for the AI-generated object in both  and , improving compatibility with different AI provider response structures (e.g., Gemini).

These changes enhance the reliability of AI interactions, particularly with the Google provider, and ensure accurate telemetry collection.
This commit is contained in:
Eyal Toledano
2025-05-13 12:13:35 -04:00
parent 59230c4d91
commit e53d5e1577
5 changed files with 72 additions and 59 deletions

View File

@@ -381,7 +381,7 @@ async function callAiService(params) {
```
</info added on 2025-05-09T04:02:44.847Z>
## 13. Update google.js for Telemetry Compatibility [pending]
## 13. Update google.js for Telemetry Compatibility [done]
### Dependencies: None
### Description: Modify src/ai-providers/google.js functions to return usage data.
### Details: