feat: extend NodeRunStreamChunkEvent with additional model metadata fields

This commit is contained in:
Novice
2026-03-06 17:21:33 +08:00
parent 480f0e95bc
commit e0794020f7
2 changed files with 30 additions and 13 deletions

View File

@ -674,6 +674,12 @@ class Node(Generic[NodeDataT]):
chunk_type=ChunkType(event.chunk_type.value),
tool_call=event.tool_call,
tool_result=event.tool_result,
model_provider=event.model_provider,
model_name=event.model_name,
model_icon=event.model_icon,
model_icon_dark=event.model_icon_dark,
model_usage=event.model_usage.model_dump() if event.model_usage else None,
model_duration=event.model_duration,
)
@_dispatch.register