Skip to content

feat(session): add DisplayName field to CreateRequest#707

Open
rubda wants to merge 1 commit intogoogle:mainfrom
rubda:feat/session-display-name
Open

feat(session): add DisplayName field to CreateRequest#707
rubda wants to merge 1 commit intogoogle:mainfrom
rubda:feat/session-display-name

Conversation

@rubda
Copy link
Copy Markdown

@rubda rubda commented Apr 3, 2026

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Added:

  • TestCreateSessionProto_DisplayName in session/vertexai/vertexai_test.go — verifies DisplayName is mapped to the protobuf Session.
  • Create/with_display_name in the shared service test suite (session/session_test/service_suite.go) — verifies all implementations accept DisplayName without error.
=== RUN   TestCreateSessionProto_DisplayName
=== RUN   TestCreateSessionProto_DisplayName/display_name_is_set_on_proto
=== RUN   TestCreateSessionProto_DisplayName/empty_display_name_results_in_empty_proto_field
--- PASS: TestCreateSessionProto_DisplayName (0.00s)

=== RUN   Test_inMemoryService/Create/with_display_name
--- PASS: Test_inMemoryService/Create/with_display_name (0.00s)

Manual End-to-End (E2E) Tests:

The change adds one field to CreateRequest and passes it through to aiplatformpb.Session.DisplayName when creating Vertex AI sessions. Verified by inspecting the proto construction and running the existing replay-based Vertex AI test suite — all existing tests continue to pass since DisplayName defaults to the zero value (empty string), which is the previous behavior.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

The Python ADK supports this via **kwargs passthrough in VertexAiSessionService.create_session. The underlying Vertex AI protobuf Session message already has DisplayName — this change simply exposes it through the Go ADK's CreateRequest.

Changes:

  • session/service.go — Add DisplayName string to CreateRequest
  • session/vertexai/vertexai_client.go — Set DisplayName on the protobuf Session
  • session/vertexai/vertexai_test.go — Proto construction test
  • session/session_test/service_suite.go — Shared suite test

The Python ADK supports setting display_name on session creation via
**kwargs passthrough, but the Go ADK's CreateRequest struct has no
equivalent field. This forces users to work around the limitation by
storing names in session state or making separate UpdateSession calls.

Add DisplayName to CreateRequest and wire it through to the Vertex AI
protobuf Session when creating sessions.
@rubda rubda marked this pull request as ready for review April 3, 2026 15:38
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.

session: CreateRequest missing DisplayName field (parity with Python ADK)

1 participant