You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
30b2ed3ef8
Merge https://github.com/google/adk-python/pull/4185 **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`. Co-authored-by: Liang Wu <wuliang@google.com> COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/4185 from Akshat8510:fix/fastapi-resume-4100 b6d252636aa5f96186507fccf47a278fe733a362 PiperOrigin-RevId: 869761179