Skip to content

fix: correct WebSearchState id type - #222

Open
Benny45123 wants to merge 1 commit into
google-gemini:mainfrom
Benny45123:fix/221-web-search-state-id
Open

Benny45123 wants to merge 1 commit into
google-gemini:mainfrom
Benny45123:fix/221-web-search-state-id

Conversation

@Benny45123

Copy link
Copy Markdown

PR Title

Fix WebSearchState.id type mismatch

PR Description

Fixes #221

Summary

Updates WebSearchState.id from str to int in
backend/src/agent/state.py to match how the value is used throughout the graph.

Details

  • continue_to_web_research() passes integer IDs through LangGraph Send.
  • evaluate_research() also generates integer IDs for follow-up searches.
  • resolve_urls() explicitly accepts id: int.
  • The existing str annotation caused the state schema to differ from the actual runtime values.

This change aligns the type annotation with the existing implementation without changing runtime behavior.

Files changed: 1
Behavioral changes: None.

@google-cla

google-cla Bot commented Sep 23, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the type of the id field in the WebSearchState class from str to int in backend/src/agent/state.py. There are no review comments, and I have no feedback to provide.

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.

The field types in the state diagram do not match

1 participant