Skip to content

fix: SDK usage statistics tracking for vision-agents#304

Merged
dangusev merged 1 commit intoGetStream:mainfrom
tjirab:bart/dat-911-fix-missing-sdk-usage-statistics-from-vision-agents
Jan 22, 2026
Merged

fix: SDK usage statistics tracking for vision-agents#304
dangusev merged 1 commit intoGetStream:mainfrom
tjirab:bart/dat-911-fix-missing-sdk-usage-statistics-from-vision-agents

Conversation

@tjirab
Copy link
Contributor

@tjirab tjirab commented Jan 22, 2026

Summary

  • Add stream- prefix to user_agent so vision-agents API calls are tracked in SDK usage statistics
  • The chat backend's SDK stats collector requires the X-Stream-Client header to match the pattern stream-*-MAJOR.MINOR.PATCH
  • Previously vision-agents-{version} was used, which didn't match and was silently ignored

Details

The X-Stream-Client header is parsed by chat/server/sdkstats/sdk_stats.go using regex:

^(stream-[a-zA-Z\-]+)-v?(\d+)\.(\d+)\.(\d+)

This change updates the user agent from vision-agents-1.0.0 to stream-vision-agents-1.0.0 so it matches the expected pattern.

Test plan

  • Verify API calls from vision-agents appear in SDK usage statistics after deployment

Summary by CodeRabbit

  • Chores
    • Updated internal client identification to enhance service compatibility and tracking.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

A single-line modification to the StreamEdge initialization updates the AsyncStream client's user_agent identification string from "vision-agents-{version}" to "stream-vision-agents-{version}". No functional or control flow changes are introduced.

Changes

Cohort / File(s) Summary
StreamEdge User Agent Update
plugins/getstream/vision_agents/plugins/getstream/stream_edge_transport.py
Updated AsyncStream client user_agent identifier to include "stream-" prefix for improved API client recognition

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A nameplate changes, subtle as breath—
from "vision-agents" to "stream-vision-agents,"
identity refined, precision honed,
the self we show the world remade,
one string to bear the weight of knowing.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: updating the user agent string to enable SDK usage statistics tracking for vision-agents.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tjirab tjirab changed the title Fix SDK usage statistics tracking for vision-agents fix: SDK usage statistics tracking for vision-agents Jan 22, 2026
@dangusev dangusev merged commit 46e72b3 into GetStream:main Jan 22, 2026
6 checks passed
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