You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(messages): stamp agent messages with workflow.now() for monotonic ordering
Pairs with scaleapi/scale-agentex#233 (server now respects caller-supplied
created_at). Without an SDK-side timestamp, the user-echo and the assistant-
shell messages.create calls can land at the server within the same ms, and
the assistant turn sorts before the user message that triggered it on reload.
- MessagesModule.create / create_batch auto-inject workflow.now() inside a
Temporal workflow; caller-supplied values are respected; outside workflows
remains None so the server wall-clock applies (sync / plain-async agents).
- CreateMessageParams / CreateMessagesBatchParams and MessagesService thread
created_at to the SDK client (omit sentinel when None).
- StreamingTaskMessageContext + factory accept created_at and forward to the
initial messages.create at open().
- Auto-send dispatchers (adk.providers.litellm / .openai) capture workflow.now()
at the workflow->activity boundary and thread it through ChatCompletion*
AutoSendParams / RunAgent(Streamed)AutoSendParams. Inside the activity the
timestamp is consumed once on the first streaming context per turn; later
contexts in the same turn fall back to server wall-clock (naturally separated
by network/processing latency plus PR 233's ms-stagger).
- workflow_now_if_in_workflow() helper in lib.utils.temporal.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments