Skip to content

Conversation

areibman
Copy link
Contributor

📥 Pull Request

📘 Description
Fixes a TypeError (can only concatenate str (not "NoneType") to str) that occurred when AgentOps instrumented Google ADK run_async calls with streaming_mode="sse" and response_modalities=["TEXT"], and the LLM response included non-text parts (e.g., function calls). The issue was caused by None values from these non-text parts being passed to string concatenation. The fix adds defensive checks to ensure only valid text is processed.

🧪 Testing
A new example (agentops/examples/google_adk/sse_text_function_call.py) was created to reproduce the reported scenario. Manual testing was performed by running this example, confirming that the TypeError no longer occurs and that streaming events (including function calls and responses) are processed correctly. Automated tests were not run in the current environment.


Open in Cursor Open in Web

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

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!

Copy link
Contributor

This pull request has been automatically marked as stale because it has not had any activity in the last 14 days.

If no updates are made within 7 days, this PR will be automatically closed.

@github-actions github-actions bot added the stale label Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants