Skip to content

fix(google-genai): Guard response extraction#5869

Open
alexander-alderman-webb wants to merge 1 commit intomasterfrom
webb/google-genai/candidate-none-checks
Open

fix(google-genai): Guard response extraction#5869
alexander-alderman-webb wants to merge 1 commit intomasterfrom
webb/google-genai/candidate-none-checks

Conversation

@alexander-alderman-webb
Copy link
Contributor

Description

Both fields are declared to be optional:

https://github.com/googleapis/python-genai/blob/f4bcca45e0805c798ee86530e013a0c325d0af85/google/genai/types.py#L7485

https://github.com/googleapis/python-genai/blob/f4bcca45e0805c798ee86530e013a0c325d0af85/google/genai/types.py#L2145

Issues

Closes #5854

Reminders

@alexander-alderman-webb alexander-alderman-webb requested a review from a team as a code owner March 25, 2026 15:48
@github-actions
Copy link
Contributor

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Langchain

  • Set gen_ai.operation.name and gen_ai.pipeline.name on LLM spans by ericapisani in #5849
  • Broaden AI provider detection beyond OpenAI and Anthropic by ericapisani in #5707
  • Update LLM span operation to gen_ai.generate_text by ericapisani in #5796

Bug Fixes 🐛

  • (google-genai) Guard response extraction by alexander-alderman-webb in #5869

Internal Changes 🔧

Langchain

  • Add text completion test by alexander-alderman-webb in #5740
  • Add tool execution test by alexander-alderman-webb in #5739
  • Add basic agent test with Responses call by alexander-alderman-webb in #5726
  • Replace mocks with httpx types by alexander-alderman-webb in #5724
  • Consolidate span origin assertion by alexander-alderman-webb in #5723
  • Consolidate available tools assertion by alexander-alderman-webb in #5721

Other

  • (asyncpg) Normalize query whitespace in integration by ericapisani in #5855
  • Add note to coordinate with assignee before PR submission by sentrivana in #5868
  • Temporarily stop running litellm tests by alexander-alderman-webb in #5851

Other

  • ci+docs: Add draft PR enforcement by stephanie-anderson in #5867

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 25, 2026

Codecov Results 📊

13 passed | Total: 13 | Pass Rate: 100% | Execution Time: 9.08s

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

❌ Patch coverage is 0.00%. Project has 14391 uncovered lines.
✅ Project coverage is 30.23%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
utils.py 0.00% ⚠️ 481 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    25.32%    30.23%    +4.91%
==========================================
  Files          189       189         —
  Lines        20625     20627        +2
  Branches      6738      6740        +2
==========================================
+ Hits          5223      6236     +1013
- Misses       15402     14391     -1011
- Partials       429       474       +45

Generated by Codecov Action

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.

TypeError: 'NoneType' object is not iterable in google_genai integration

1 participant