fix: add streaming_run_with_events handler for Gemini Enterprise integration#771
Closed
anishesg wants to merge 1 commit into
Closed
fix: add streaming_run_with_events handler for Gemini Enterprise integration#771anishesg wants to merge 1 commit into
anishesg wants to merge 1 commit into
Conversation
### Link to Issue or Description of Change Signed-off-by: anish k <ak8686@princeton.edu>
Collaborator
|
This solution won't work, sorry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to Issue or Description of Change
Closes: #770
Problem: Agents deployed to Vertex AI Agent Engine work in the Playground (which calls
/api/stream_reasoning_enginewithclass_method: async_stream_query), but fail when integrated into Gemini Enterprise. Gemini Enterprise sends requests withclass_method: streaming_agent_run_with_events, which was not registered inlistStreamHandlersinserver/agentengine/handler.go. This causedhandleQueryin the controller to return"unrecognized class method: streaming_agent_run_with_events".Solution: Registered a second
streamQueryHandlerinstance for thestreaming_agent_run_with_eventsmethod name withapi_mode: "stream"inlistStreamHandlers. The existingstreamQueryHandleris fully parameterized by method name and already handles the streaming logic correctly — it just needed to be registered under the additional method name that Gemini Enterprise uses. This mirrors the pattern in the adk-python CLI deploy logic (seecli_deploy.pyline 390).Testing Plan
Unit Tests
Manual E2E Tests
"unrecognized class method"error in the logs.Local build verification:
go build ./server/agentengine/...passes without errors.Checklist
Fixes #770