Skip to content

fix: use userId from eval result to prevent session 404#424

Draft
brucearctor wants to merge 1 commit intogoogle:mainfrom
brucearctor:fix/eval-session-userid-mismatch
Draft

fix: use userId from eval result to prevent session 404#424
brucearctor wants to merge 1 commit intogoogle:mainfrom
brucearctor:fix/eval-session-userid-mismatch

Conversation

@brucearctor
Copy link
Copy Markdown

Summary

Fixes the session 404 error reported in google/adk-python#5423 (Issue 1).

Problem

The eval tab component used the component-level userId input (which defaults to "user") when fetching sessions for eval results via getSession(). If the eval runner created sessions with a different user_id (e.g., from the eval set's session_input.user_id), the session lookup would 404.

Fix

  1. Added userId field to the EvaluationResult interface
  2. getSession() now uses evalCaseResult.userId (from the API response) instead of this.userId(), with a fallback to the component input if not present
  3. Also captures userId in the history result mapping for consistency

Companion PR

Server-side default alignment: google/adk-python#5425

Related

The eval tab was using the component-level userId input (defaulting
to 'user') when fetching sessions for eval results. If the eval
runner created sessions with a different user_id, the session lookup
would 404.

Now uses the userId returned in the eval result response, falling
back to the component userId if not present.

Also adds userId to the EvaluationResult interface and captures it
in the history result mapping.

Ref: google/adk-python#5423
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.

1 participant