Skip to content

fix(bidi): update bidi google-genai version floor - #3740

Merged
mehtarac merged 1 commit into
strands-agents:mainfrom
mehtarac:update_genai_bidi
Aug 10, 2026
Merged

mehtarac merged 1 commit into
strands-agents:mainfrom
mehtarac:update_genai_bidi

Conversation

@mehtarac

Copy link
Copy Markdown
Member

Description

This PR updates the minimum version of google-genai for bidi installation.

Related Issues

Documentation PR

Type of Change

Bug fix
New feature
Breaking change
Documentation update
Other (please describe):

Testing

How have you tested the change? Verify that the changes do not break functionality or introduce new warnings.

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have reviewed and understand every line of code in this PR, including any generated by AI tools, and I can explain why it works
  • My change is focused and reasonably small; I have split unrelated work into separate PRs
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@mehtarac
mehtarac requested a review from a team as a code owner August 10, 2026 14:58
@github-actions github-actions Bot added python Pull requests that update python code bug Something isn't working area-bidirectional-streaming Related to bidirectional streaming area-model Related to models or model providers strands-running size/xs labels Aug 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Assessment: Approve

Correct, low-risk change. Bumping the bidi-gemini floor to google-genai>=1.67.0 brings it in line with the existing gemini extra (pyproject.toml line 50) and matches the newer Live API surface used in experimental/bidi/models/gemini_live.py (e.g. send_client_content, send_realtime_input, session resumption / new_handle, go_away). The <3.0.0 upper bound is preserved, so major-version breakage is still guarded against.

Notes
  • Suggestion: The PR description is empty. Consider adding a one-line rationale — e.g. "aligns bidi-gemini with the gemini extra and guarantees the Live API features used by gemini_live.py" — so the specific 1.67.0 floor is traceable for future maintainers.
  • Testing: The "I ran hatch run prepare" box is unchecked. Worth confirming a clean install/resolve on this extra before merge.

Nice consistency fix keeping the two Gemini extras aligned.

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@JackYPCOnline

Copy link
Copy Markdown
Contributor

@strandly-the-agent safe to approve?

@strandly-the-agent

Copy link
Copy Markdown
Contributor

Yes — safe to approve. It's also a real bug fix, not just a consistency tidy-up: bidi-gemini was the last place still allowing a google-genai that can't run the bidi Gemini code.

Verified (branch ec1ba50, floor >=1.67.0 is exactly minimal):

check result
types.HistoryConfig on 1.66.0 (just below new floor) ❌ absent
types.HistoryConfig on 1.67.0 ✅ present, LiveConnectConfig(history_config=…) accepted
symbols on 2.17.0 (what a fresh install resolves to) ✅ all present
test_gemini_live.py ✅ 21 passed
No revert risk (see below) ✅ confirmed

The crash path is reachable from a documented entry point: gemini_live.py:509 builds HistoryConfig whenever has_messages is true, which gemini_live.py:157 sets for any session started with prior text messages. On google-genai 1.32–1.66 that's an AttributeError at connect time. After the bump, a user pinned below 1.67 gets a resolver error at install instead of a crash at runtime — strictly better.

Why this looked like it might be a re-land, and why it isn't

#3478 is titled chore(bidi): bump google-genai floor to >=1.67.0 and merged 2026-07-24, while main still had bidi-gemini at 1.32.0 — which looks like a revert. It isn't: #3478's diff only touches the gemini extra (pyproject.toml:50), despite the chore(bidi) prefix. So bidi-gemini was simply missed then, and this PR finishes the job. Nothing was reverted, so there's no earlier breakage being reintroduced.

Sequence: #3424 moved gemini_live.py to the new Live API → #3551 added the HistoryConfig call → #3478 bumped the wrong extra → this PR bumps the right one.

No lockfile in the repo, so nothing else to regenerate. bidi-all picks the new floor up transitively. CI is green across 3.10–3.14 on all three OSes.

Appendix — non-blocking (1)

⚪ strands-py/src/strands/experimental/bidi/models/gemini_live.py:507 — the comment now contradicts itself once this merges:

HistoryConfig requires google-genai>=1.67 (floor bump tracked separately).

The floor bump is this PR, so the parenthetical is stale and will tell the next reader the floor is still unbumped. Worth dropping the parenthetical and keeping the requirement, which is the useful half — it's the traceable rationale for the specific 1.67.0 number that the PR description doesn't give. Fine as a follow-up; not worth holding the merge.

Approval itself is yours — this repo needs two human approvers for bot-authored changes, and I'm not one of them. Flagging that the automated assessment above read this as a cosmetic alignment fix; the reachable-crash framing is the stronger reason to take it.

@mehtarac
mehtarac merged commit 5f357ae into strands-agents:main Aug 10, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-bidirectional-streaming Related to bidirectional streaming area-model Related to models or model providers bug Something isn't working python Pull requests that update python code size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants