Skip to content

Conversation

@areibman
Copy link
Contributor

📥 Pull Request

📘 Description
Addresses a TypeError: can only concatenate str (not "NoneType") to str that occurred during Google ADK streaming with response_modalities=["TEXT"] when a function call was triggered and AgentOps was enabled. The error was caused by attempting to concatenate None values from text parts in the stream. The fix adds explicit None checks in the Google GenAI and Google ADK instrumentation to prevent this.

🧪 Testing
Validated with a new reproducer example (agentops/examples/google_adk/sse_function_call_example.py) that simulates the reported scenario, confirming the TypeError is resolved and streaming with function calls works as expected.


Open in Cursor Open in Web

@cursor
Copy link

cursor bot commented Aug 13, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@codecov
Copy link

codecov bot commented Aug 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@areibman areibman marked this pull request as ready for review August 15, 2025 03:57
@areibman areibman merged commit b680246 into main Aug 15, 2025
35 of 48 checks passed
@areibman areibman deleted the cursor/fix-sse-streaming-function-call-error-with-agentops-d3a1 branch August 15, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants