fix(api): defer streaming response until referenced variables are updated#1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6584b6270
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| assigned_selector = self.node_data.assigned_variable_selector | ||
| return assigned_selector in variable_selectors |
There was a problem hiding this comment.
Compare assigned selector as tuple to block streaming
The new blocks_variable_output compares assigned_variable_selector (a Sequence[str] that is a list from VariableAssignerData) directly against variable_selectors, which the response coordinator builds as set[tuple[str, ...]] via tuple(segment.selector[:2]). In Python, a list never equals a tuple, so this method always returns False. For response nodes that reference a conversation variable updated by a v1 assigner, streaming will still start immediately instead of waiting for the assignment. Converting the selector to a tuple (as v2 does) would fix the match.
Useful? React with 👍 / 👎.
Benchmark PR from agentic-review-benchmarks#1