Skip to content

fix(google-genai): trace continuation as one model turn - #1049

Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
abhi/issue-1041-vcr-tests-a40fdf88
Nov 2, 2026
Merged

Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
abhi/issue-1041-vcr-tests-a40fdf88

Conversation

@AbhiPrasad

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

🤖 This text was AI-generated.

Google Gen AI can continue a response across multiple requests. Sync calls
previously created a separate span for each request, showing partial output
and usage, while async calls reported the merged response.

Before: request 1 -> span 1; request 2 -> span 2
After:  request 1 -> request 2 -> one merged span

Trace the continuation helper when available, preserving one span per model
turn during automatic function calling. Older SDK versions continue to use
the existing request-level patch. A recorded continuation covers sync and
async calls; streaming continuation is not covered by this recording.

Fixes #1041

> 🤖 **This text was AI-generated.**

Google Gen AI can continue a response across multiple requests. Sync calls
previously created a separate span for each request, showing partial output
and usage, while async calls reported the merged response.

```
Before: request 1 -> span 1; request 2 -> span 2
After:  request 1 -> request 2 -> one merged span
```

Trace the continuation helper when available, preserving one span per model
turn during automatic function calling. Older SDK versions continue to use
the existing request-level patch. A recorded continuation covers sync and
async calls; streaming continuation is not covered by this recording.

Fixes #1041
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T16:45:44.397994Z 7d7dcfc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) merged commit 19b24a2 into main Nov 2, 2026
98 checks passed
@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) deleted the abhi/issue-1041-vcr-tests-a40fdf88 branch November 2, 2026 17:25
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.

google_genai: sync generate_content likely emits one span per automatic-continuation hop (2.34+)

1 participant