Skip to content

Conversation

@Akshat8510
Copy link
Contributor

Description
This PR resolves #4100 by making the new_message field optional in the RunAgentRequest model.

The Problem:
When attempting to resume an agent session via the FastAPI web server, the request would fail with a 422 Unprocessable Entity if new_message was omitted. This prevented "resume-only" workflows where a user just wants to wake up an existing session.

The Solution:
Updated RunAgentRequest.new_message to be Optional[types.Content] = None. The underlying runner.run_async logic already supports None for resuming purposes, so no further logic changes were required.

Verification:
Verified that RunAgentRequest now validates successfully when new_message is missing, defaulting the field to None.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Akshat8510, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the flexibility of agent session management by addressing a limitation in the RunAgentRequest model. Previously, resuming an agent session required a new_message field, even when no new input was intended. The change makes this field optional, aligning the web server's request handling with the underlying agent runner's capability to resume sessions with a None message. This modification streamlines the process for users who wish to simply reactivate an existing session.

Highlights

  • Optional Message Field: The new_message field in the RunAgentRequest model has been made optional, allowing agent sessions to be resumed without providing a new message.
  • Bug Fix: This change resolves an issue where attempting to resume an agent session via the FastAPI web server would result in a 422 Unprocessable Entity error if new_message was omitted.
  • Workflow Improvement: The update enables 'resume-only' workflows, where users can reactivate an existing session without needing to send new content.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

@adk-bot adk-bot added the web [Component] This issue will be transferred to adk-web label Jan 17, 2026
Copy link
Contributor

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

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 correctly addresses the issue of being unable to resume an agent session without a new message. By changing RunAgentRequest.new_message to be optional (Optional[types.Content] = None), the API now properly supports "resume-only" workflows. The change is well-contained and aligns the web server's request model with the existing logic in runner.run_async, which already handles cases where new_message is None for session resumption. The implementation is correct. I have one suggestion to improve test coverage for this new capability.

Copy link
Contributor

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

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 correctly addresses the issue by making the new_message field optional in the RunAgentRequest model. This change allows for agent session resumption without requiring a new message, which is a valuable improvement for 'resume-only' workflows. The implementation is clean and direct. I've added one comment regarding the addition of a test case to ensure this fix is validated and to prevent future regressions.

@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

Copy link
Contributor

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

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 correctly makes the new_message field optional in RunAgentRequest to resolve a 422 Unprocessable Entity error when resuming a session. The inclusion of a new unit test to verify this is a good practice. However, the fix is incomplete as it introduces a new runtime error. The new test provides a false positive because it mocks the Runner.run_async method, bypassing a validation check that would cause a ValueError and a 500 error in a real-world scenario. To be complete, the runner logic should also be updated to handle this new 'resume-only' case gracefully.

@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

Copy link
Contributor

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

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 correctly addresses the issue of allowing agent session resumption without requiring a new_message. The change to make RunAgentRequest.new_message optional is well-implemented. The corresponding adjustment in runners.py to handle a "no-op resume" by returning early instead of raising an error is a sensible approach. The new test case effectively verifies that the API now accepts requests without a new message. I have a couple of minor suggestions in the test file to improve code cleanliness.

@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

@Akshat8510
Copy link
Contributor Author

/gemini summary

Copy link
Contributor

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

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 correctly makes the new_message field optional in RunAgentRequest to support 'resume-only' workflows, which is a good enhancement. The changes in the web server model, the runner logic, and the addition of a new test case are all well-aligned with this goal. I have one suggestion to improve observability for the new no-op resume behavior.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

This pull request enhances the flexibility of agent session management by enabling "resume-only" workflows. It addresses a previous limitation where the FastAPI web server would reject requests to resume an agent session if no new_message was provided. The changes involve making the new_message field optional in the request model and updating the underlying runner logic to correctly process such requests as a no-op resume, ensuring a smoother user experience for reactivating existing sessions.

Highlights

  • Optional Message Field: The new_message field in the RunAgentRequest model has been made optional, allowing agent sessions to be resumed without providing new content.
  • Graceful No-Op Resume: The agent runner logic was modified to gracefully handle 'resume-only' requests where neither a new message nor an invocation ID is provided, preventing ValueError and performing a no-op resume.
  • New Test Coverage: A new test case was added to test_fast_api.py to validate the successful handling of agent session resume requests without a new message.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/google/adk/cli/adk_web_server.py
    • The new_message field in the RunAgentRequest model is now Optional[types.Content] = None, making it optional for incoming requests.
  • src/google/adk/runners.py
    • The _run_with_trace function now explicitly handles cases where neither invocation_id nor new_message is provided by performing a no-op resume and returning early, instead of raising a ValueError.
  • tests/unittests/cli/test_fast_api.py
    • A new test, test_agent_run_resume_without_message, has been added to verify that the /run endpoint correctly processes agent session resume requests when new_message is omitted.
Activity
  • gemini-code-assist[bot] provided an initial summary of the pull request.
  • gemini-code-assist[bot] suggested adding test cases to verify the optional new_message field and prevent regressions.
  • gemini-code-assist[bot] identified an issue with the initial test's mocking strategy and recommended updating the runner logic to properly handle "resume-only" scenarios.
  • gemini-code-assist[bot] provided minor suggestions for code readability and test hygiene (removing blank lines, unnecessary logging).
  • gemini-code-assist[bot] suggested adding a log message for the no-op resume in the runner for better observability.
  • The author, Akshat8510, repeatedly requested reviews and summaries from the bot.

@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

Copy link
Contributor

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

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 correctly makes the new_message field optional in the RunAgentRequest to allow for "resume-only" workflows, which is a great enhancement. The changes are well-implemented, including the logic to handle this case as a no-op in the runner and the addition of a new test case.

I have a couple of suggestions to further improve the changes:

  • Update the run_async docstring to reflect the new behavior.
  • Enhance the new test to cover the full end-to-end logic instead of mocking the runner's behavior.

Overall, this is a solid contribution.

@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

Copy link
Contributor

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

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 correctly addresses the issue of allowing session resumption without a new message by making the new_message field optional. The changes to the RunAgentRequest model and the corresponding logic in runners.py are appropriate and well-implemented. The addition of a new test case to verify this behavior is also a great inclusion. I have a couple of minor suggestions to improve the clarity of the documentation and a test comment.

@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

Copy link
Contributor

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

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 resolves an issue where resuming an agent session without a new message would fail. The changes make the new_message field in RunAgentRequest optional and update the runner logic to handle this case as a no-op resume, which is a clean solution. The docstrings have been updated to reflect the new behavior, and a new test case has been added to verify the fix. The changes are well-implemented and improve the flexibility of the web API. The code quality is high, and I have no further suggestions for improvement.

@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

@Akshat8510
Copy link
Contributor Author

/gemini summary

Copy link
Contributor

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

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 correctly implements the ability to resume a session without providing a new message by making new_message optional in RunAgentRequest. The changes are well-contained, touching the web server model, the runner logic, and adding a corresponding test case. My main feedback is to improve the handling of state_delta in the new no-op resume path to avoid silently ignoring user input.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

This pull request enhances the flexibility of agent session management by enabling 'resume-only' workflows. It addresses a previous limitation where the FastAPI web server would reject requests to resume an agent session if no new_message was provided. The changes involve making the new_message field optional in the request model and updating the underlying runner logic to correctly process such requests as a no-op resume, ensuring a smoother user experience for reactivating existing sessions.

Highlights

  • Optional Message Field: The new_message field in the RunAgentRequest model is now optional, allowing agent sessions to be resumed without providing new content.
  • Bug Fix for Session Resume: The FastAPI web server no longer returns a 422 Unprocessable Entity error when new_message is omitted during an agent session resume request.
  • Graceful No-Op Resume: The agent runner logic (_run_with_trace) has been updated to gracefully handle 'resume-only' scenarios by performing a no-op and returning early when neither new_message nor invocation_id is provided, instead of raising a ValueError.
  • New Test Coverage: A new test case (test_agent_run_resume_without_message) has been added to verify the successful handling of agent session resume requests without a new message.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/google/adk/cli/adk_web_server.py
    • The new_message field in the RunAgentRequest model is now Optional[types.Content] = None, making it optional for incoming requests.
  • src/google/adk/runners.py
    • The docstring for run_async was updated to remove the ValueError clause that previously indicated an error if both invocation_id and new_message were None.
    • The _run_with_trace function now explicitly handles cases where neither invocation_id nor new_message is provided by performing a no-op resume and returning early, instead of raising a ValueError.
    • A logger.info message was added to log when a no-op resume is performed.
  • tests/unittests/cli/test_fast_api.py
    • The dummy_run_async mock function was updated to return early if both invocation_id and new_message are None.
    • A new test, test_agent_run_resume_without_message, has been added to verify that the /run endpoint correctly processes agent session resume requests when new_message is omitted.
Activity
  • gemini-code-assist[bot] provided an initial summary of the pull request.
  • gemini-code-assist[bot] suggested adding test cases to verify the optional new_message field and prevent regressions.
  • gemini-code-assist[bot] identified an issue with the initial test's mocking strategy and recommended updating the runner logic to properly handle 'resume-only' scenarios.
  • gemini-code-assist[bot] provided minor suggestions for code readability, such as removing blank lines and unnecessary logging.
  • gemini-code-assist[bot] suggested adding a log message for the no-op resume in the runner for better observability.
  • gemini-code-assist[bot] recommended updating the run_async docstring to reflect the new no-op resume behavior.
  • gemini-code-assist[bot] advised removing the mock from the new test to ensure full end-to-end coverage of the 'resume-only' scenario.
  • gemini-code-assist[bot] suggested clarifying the Raises section in the docstring and removing an incorrect comment about patch_runner.
  • gemini-code-assist[bot] recommended logging a warning if state_delta is provided but ignored during a no-op resume.
  • The author, Akshat8510, repeatedly requested reviews and summaries from the bot.
  • gemini-code-assist[bot] temporarily reached its daily quota limit.

@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

Copy link
Contributor

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

Choose a reason for hiding this comment

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

Code Review

This is a well-executed fix. Making the new_message field optional in RunAgentRequest is the correct approach to allow for "resume-only" workflows. The changes in runners.py to gracefully handle the absence of both new_message and invocation_id by performing a no-op are clean and logical. I appreciate the addition of a new test case in test_fast_api.py, which effectively verifies the fix and prevents future regressions. Overall, the changes are clear, concise, and well-tested.

Copy link
Contributor

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

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 correctly addresses the issue of allowing agent session resumption without a new message. The changes in adk_web_server.py make the new_message field optional in the RunAgentRequest model, and the logic in runners.py is updated to handle this as a no-op resume, which is a clean solution. The associated test updates, including a new test case to verify this specific workflow, are well-implemented and ensure the fix is robust. Overall, the changes are of high quality and I have no concerns.

@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

Copy link
Contributor

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

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 correctly addresses the issue of allowing agent session resumption without requiring a new message. The changes are well-implemented across the API model, the runner logic, and the tests. By making new_message optional in RunAgentRequest and handling the "no-op resume" case gracefully in the runner, the fix is both robust and clean. The addition of a dedicated unit test and updates to the mock implementation ensure the new behavior is verified. The docstring update also accurately reflects the change in the run_async method's behavior. Overall, this is a solid contribution that improves the flexibility of the web server API.

Copy link
Contributor

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

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 correctly addresses the issue of allowing session resumes without a new message by making new_message optional in RunAgentRequest. The logic in runners.py to handle this as a no-op resume is well-implemented, including the warning for an ignored state_delta. The addition of corresponding unit tests is also a great improvement. I have a couple of suggestions to improve the docstring accuracy and test robustness.

Signed-off-by: Akshat Kumar <akshat230405@gmail.com>
@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

Copy link
Contributor

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

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 correctly makes the new_message field optional in RunAgentRequest to support session resume workflows without a new message. The changes in runners.py to handle this as a no-op instead of an error are well-implemented, including the warning for an ignored state_delta. The new tests effectively verify this behavior. I have one suggestion to improve the robustness of the new test.

Signed-off-by: Akshat Kumar <akshat230405@gmail.com>
@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

Copy link
Contributor

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

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 correctly addresses the issue of allowing agent session resumption without a new message. The change to make new_message optional in RunAgentRequest is appropriate, and the logic in runners.py to handle this "no-op resume" case is well-implemented. The addition of new tests to verify this behavior is also a great inclusion. I have one suggestion in the test file to improve the accuracy of a mock function, ensuring it fully aligns with the behavior of the real implementation.

Signed-off-by: Akshat Kumar <akshat230405@gmail.com>
@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

Copy link
Contributor

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

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 correctly implements the ability to resume a session without providing a new message, which is a valuable fix for "resume-only" workflows. The changes are well-contained, making RunAgentRequest.new_message optional and updating the runner to handle this case as a no-op. The addition of new tests to cover this scenario is also appreciated.

My main feedback is on the implementation of one of the new tests, which currently tests a mock's behavior rather than the production code's logging. I've left a detailed comment with a suggestion to improve the test's reliability and maintainability. Overall, this is a good change.

Signed-off-by: Akshat Kumar <akshat230405@gmail.com>
@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

Copy link
Contributor

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

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 effectively addresses the issue of allowing agent session resumption without a new message. The changes are logical and well-implemented: new_message is now optional in the RunAgentRequest, and the runner logic correctly handles this as a no-op resume. The addition of a warning when state_delta is ignored in this scenario is a thoughtful touch. The new unit tests in both test_fast_api.py and test_runners.py provide good coverage for the new functionality. I have one suggestion regarding code duplication in a test mock to improve long-term maintainability. Overall, this is a solid contribution.

…dback

Signed-off-by: Akshat Kumar <akshat230405@gmail.com>
@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

Copy link
Contributor

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

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 correctly makes the new_message field optional in RunAgentRequest to allow for "resume-only" agent runs. The implementation handles the new no-op case gracefully by logging informative messages and ignoring state_delta when appropriate. The accompanying tests are thorough, covering the API change, the new no-op logic, and the specific warning for ignored state deltas. My only suggestion is to address some code duplication in the test suite to improve long-term maintainability.

Signed-off-by: Akshat Kumar <akshat230405@gmail.com>
@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

Copy link
Contributor

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

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 correctly addresses the issue of resuming an agent session without a new message by making the new_message field optional in the RunAgentRequest. The changes are well-implemented, with the runner now handling this as a "no-op resume" and logging a warning if an unhandled state_delta is provided. The accompanying tests are thorough, covering both the API layer and the runner's internal logic.

I have one suggestion to improve the maintainability of the new tests by reducing code duplication. Overall, this is a solid fix.

Signed-off-by: Akshat Kumar <akshat230405@gmail.com>
@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

Copy link
Contributor

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

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 correctly implements the ability to resume a session without providing a new message by making new_message optional in RunAgentRequest. The core logic in runners.py is updated to handle this as a no-op resume, including appropriate logging for an ignored state_delta. The changes are well-supported by new unit tests that verify the behavior at both the web server and runner levels. My feedback includes a minor suggestion to improve code clarity in one of the new test mocks.

Signed-off-by: Akshat Kumar <akshat230405@gmail.com>
@Akshat8510
Copy link
Contributor Author

@gemini-code-assist/gemini review

Copy link
Contributor

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

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 effectively resolves the issue of being unable to resume a session without providing a new message. The change to make new_message optional in RunAgentRequest is the correct fix for the web server API. The underlying runner logic has also been thoughtfully updated to handle this "no-op resume" case by returning early instead of raising an error, and it correctly warns when state_delta is ignored in this context. The new behavior is well-covered by new tests for both the API and the runner logic, ensuring the solution is robust. This is a high-quality contribution that improves the flexibility of session management.

@Akshat8510
Copy link
Contributor Author

/gemini summary

@gemini-code-assist
Copy link
Contributor

Summary of Changes

This pull request enhances the flexibility of agent session management by resolving an issue where the FastAPI web server previously rejected requests to resume an agent session if no new_message was provided. By making the new_message field optional in the request model and updating the underlying runner logic to support 'resume-only' operations, the change enables more fluid agent workflows. It ensures that existing sessions can be reactivated without requiring new input, significantly improving the user experience for agent management.

Highlights

  • Optional new_message Field: The new_message field in the RunAgentRequest model has been made optional, allowing agent sessions to be resumed without providing new input, resolving a 422 Unprocessable Entity error.
  • Graceful No-Op Session Resume: The agent runner logic (_run_with_trace) now gracefully handles 'resume-only' scenarios where neither a new message nor an invocation ID is provided, performing a no-op and returning early instead of raising a ValueError.
  • State Delta Warning for No-Op Resumes: A warning is now logged if a state_delta is provided during a no-op resume, explicitly indicating that the state_delta will be ignored.
  • Enhanced Test Coverage: New parameterized test coverage has been added to test_fast_api.py to verify the web server's handling of optional new_message and state_delta in resume requests, and a dedicated unit test in test_runners.py confirms the logging behavior for ignored state_delta.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/google/adk/cli/adk_web_server.py
    • The new_message field in the RunAgentRequest model was updated to Optional[types.Content] = None, making it optional for incoming requests.
  • src/google/adk/runners.py
    • The docstring for run_async was updated to remove the ValueError clause that previously indicated an error if both invocation_id and new_message were None.
    • The _run_with_trace function now explicitly handles cases where neither invocation_id nor new_message is provided by performing a no-op resume and returning early.
    • A logger.info message was added to log when a no-op resume is performed.
    • A logger.warning message is now issued if state_delta is provided during a no-op resume, indicating it will be ignored.
  • tests/unittests/cli/test_fast_api.py
    • A new helper async function _noop_run_async was added to provide an empty async generator for mocks.
    • A new parameterized test test_agent_run_resume_without_message was added to verify that the /run endpoint correctly processes agent session resume requests when new_message is omitted, covering cases with and without state_delta.
  • tests/unittests/test_runners.py
    • Imports for logging and unittest.mock were added.
    • A new asynchronous test test_run_async_no_op_resume_logging was added to verify that the Runner logic correctly logs a warning when state_delta is ignored during a no-op resume.
Activity
  • gemini-code-assist[bot] provided initial summaries and numerous review suggestions throughout the PR lifecycle.
  • The bot suggested adding test cases for the optional new_message field and identified issues with initial mocking strategies.
  • The bot recommended updating runner logic for graceful no-op resume, adding log messages for observability, and refining docstrings.
  • The bot provided specific suggestions for improving test robustness, such as removing mocks for end-to-end testing, using caplog for log assertions, and parameterizing similar tests.
  • Akshat8510 (author) frequently requested reviews and summaries from the bot.
  • gemini-code-assist[bot] temporarily reached its daily quota limit on January 17th.
  • ryanaiagent requested fixes for unit tests and formatting errors, and later requested a review from wukath.

@Akshat8510
Copy link
Contributor Author

Hi @ryanaiagent, I’ve addressed all feedback from the manual + AI reviews and updated the implementation + tests accordingly. The gemini-code-assist bot also reviewed it and has no more concerns.

@Akshat8510
Copy link
Contributor Author

Ready for review
thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review [Status] The PR/issue is awaiting review from the maintainer web [Component] This issue will be transferred to adk-web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Impossible to resume agents throught fastapi endpoint without "new_message"

3 participants