Skip to content

fix(evaluation): skip invocations without user events to prevent ValidationError#5929

Open
Oxygen56 wants to merge 1 commit into
google:mainfrom
Oxygen56:fix/skip-invocations-without-user-events-3760
Open

fix(evaluation): skip invocations without user events to prevent ValidationError#5929
Oxygen56 wants to merge 1 commit into
google:mainfrom
Oxygen56:fix/skip-invocations-without-user-events-3760

Conversation

@Oxygen56
Copy link
Copy Markdown

@Oxygen56 Oxygen56 commented Jun 1, 2026

Summary

Changes user_content initialization from Content(parts=[]) to None and skips invocations that have no user-authored events.

Previously, internal/system-driven invocations lacking a user event would produce semantically incorrect eval cases with empty content objects, causing a ValidationError.

Changes

  • Initialize user_content = None instead of Content(parts=[])
  • Add guard to skip invocations where no user event was found (continue to next invocation)
  • Prevents ValidationError from empty Content objects

Fixes #3760

…dationError

Change user_content initialization from Content(parts=[]) to None and
skip invocations that have no user-authored events. This prevents
ValidationError from semantically incorrect empty Content objects.

Fixes google#3760
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.

Evaluation Invocation.user_content ValidationError when session has invocations without user events

1 participant