Skip to content

events_create: ValidationError on RemoteRef in EventResult.event.run_completed.eventData.output #116

Description

@kalyanaramansanthanam

SDK version: vercel==0.5.8

events_create for a run_completed event raises a ValidationError because the workflow service returns a RemoteRef for event.run_completed.eventData.output, but EventResult (and the underlying WorkflowRun.output schema) is typed as list[bytes] | None.

The request URL includes ?remoteRefBehavior=resolve (set by worlds/vercel.py:288–296), so the SDK is asking the server to dereference, but the server appears to send a RemoteRef object back regardless.

Log trace

[info] HTTP Request: POST https://vercel-workflow.com/api/v2/runs/wrun_…/events "HTTP/1.1 200 OK"
[error] Traceback (most recent call last):
[error] File "/var/task/_vendor/vercel/_internal/workflow/worlds/vercel.py", line 227, in async_handler
    result = await handler(
             ^^^^^^^^^^^^^^
[error] File "/var/task/_vendor/vercel/_internal/workflow/runtime.py", line 348, in workflow_handler
    await world.events_create(
[error] File "/var/task/_vendor/vercel/_internal/workflow/worlds/vercel.py", line 293, in events_create
    return await self._cbor_request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
[error] File "/var/task/_vendor/vercel/_internal/workflow/worlds/vercel.py", line 136, in _cbor_request
    return schema.model_validate(result)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[error] File "/var/task/_vendor/pydantic/main.py", line 716, in model_validate
    return cls.__pydantic_validator__.validate_python(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[error] pydantic_core._pydantic_core.ValidationError: 1 validation error for EventResult
event.run_completed.eventData.output
  Input should be a valid list [type=list_type, input_value={'_ref': 's3rf:team_KSt4W...', '_type': 'RemoteRef'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.12/v/list_type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions