Skip to content

fix: add stream toggle back to agent#13155

Merged
Cristhianzl merged 9 commits into
release-1.10.0from
cz/fix-add-stream-agent
May 18, 2026
Merged

fix: add stream toggle back to agent#13155
Cristhianzl merged 9 commits into
release-1.10.0from
cz/fix-add-stream-agent

Conversation

@Cristhianzl
Copy link
Copy Markdown
Member

@Cristhianzl Cristhianzl commented May 15, 2026

Objective

Restore the Stream toggle on the Agent component, which was inadvertently dropped when the ModelInput selector was unified (#12025).

Summary by CodeRabbit

Release Notes

  • New Features

    • Added "Stream" setting to the Agent component, allowing users to configure whether the selected language model uses streaming.
  • Tests

    • Added unit tests to verify the Stream input field functionality and language model configuration.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ad1100f1-3074-4aad-8430-1d2134dc2424

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

AgentComponent now exposes an advanced stream boolean input for controlling language model streaming behavior. The component imports the help text constant, adds the input field definition, and forwards the stream value to get_llm(). Regression tests validate that the input is correctly exposed and forwarded during agent requirements retrieval.

Changes

Agent component stream input

Layer / File(s) Summary
Stream input definition and forwarding
src/lfx/src/lfx/components/models_and_agents/agent.py
AgentComponent imports STREAM_INFO_TEXT, adds a new stream BoolInput field (advanced visibility, default false) to component inputs, and forwards the stream value to get_llm() in the _get_llm() method.
Stream input regression tests
src/backend/tests/unit/components/models_and_agents/test_agent_component.py
Two regression tests verify that stream appears in component inputs, that the component exposes a stream attribute, and that stream=True is correctly forwarded to get_llm() during get_agent_requirements().

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 8 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Test Quality And Coverage ⚠️ Warning Tests incomplete. Only tests stream=True case, missing stream=False test. Smoke test present but no default value verification. Similar max_tokens feature has two functional tests; stream has one. Add test for stream=False/disabled state to match max_tokens test coverage pattern.
✅ Passed checks (8 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Test Coverage For New Implementations ✅ Passed PR includes comprehensive test coverage with two regression unit tests validating the new stream functionality. Tests follow naming conventions and contain meaningful assertions with proper mocking.
Test File Naming And Structure ✅ Passed Tests follow test_*.py naming, pytest fixtures, descriptive async functions, docstrings, proper mocking/assertions. Covers default and stream=True scenarios as required.
Excessive Mock Usage Warning ✅ Passed Mock usage is appropriate and not excessive. First test uses no mocks (structural test). Second test uses 2 focused mocks targeting external dependencies, following established patterns in file.
Title check ✅ Passed The title 'fix: add stream toggle back to agent' clearly and concisely summarizes the main change—restoring a previously removed stream toggle feature to the Agent component.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cz/fix-add-stream-agent

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@erichare erichare self-requested a review May 15, 2026 21:14
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

✅ Test Coverage Advisor

No source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉

Advisory check only — never blocks merge.

Copy link
Copy Markdown
Collaborator

@erichare erichare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions Bot added the lgtm This PR has been approved by a maintainer label May 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 38%
38.59% (48192/124856) 67.94% (6576/9678) 38.48% (1109/2882)

Unit Test Results

Tests Skipped Failures Errors Time
4317 0 💤 0 ❌ 0 🔥 10m 32s ⏱️

The nightly frontend job fails almost every day on a single Windows
Playwright shard, never on actual test logic. With fail-fast:false over
~70 Windows shards each making several cache/artifact-service calls, a
transient GitHub Actions cache/artifact hiccup on any one shard flips
needs.setup-and-test.result to failure and reds the whole nightly
(observed steps: Setup Node.js Environment, Cache Playwright Browsers,
Upload Playwright Coverage Artifact).

- Decouple npm caching from actions/setup-node (its internal cache step
  can't be made non-fatal) and replace it with a standalone
  actions/cache@v5 step marked continue-on-error.
- Mark Cache Playwright Browsers and the artifact-upload steps
  continue-on-error so an infra blip can no longer fail a test shard.

Only a real test/browser failure can fail a shard now.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Cristhianzl Cristhianzl enabled auto-merge May 18, 2026 12:21
@Cristhianzl Cristhianzl added lgtm This PR has been approved by a maintainer and removed lgtm This PR has been approved by a maintainer labels May 18, 2026
@Cristhianzl Cristhianzl changed the title add stream toggle back to agent fix: add stream toggle back to agent May 18, 2026
@github-actions github-actions Bot added the bug Something isn't working label May 18, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.85%. Comparing base (851a484) to head (37415bc).

❌ Your project check has failed because the head coverage (49.17%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##           release-1.10.0   #13155      +/-   ##
==================================================
- Coverage           54.86%   54.85%   -0.01%     
==================================================
  Files                2150     2150              
  Lines              200679   200679              
  Branches            30262    28613    -1649     
==================================================
- Hits               110101   110081      -20     
- Misses              89389    89409      +20     
  Partials             1189     1189              
Flag Coverage Δ
backend 60.33% <ø> (-0.05%) ⬇️
frontend 54.86% <ø> (-0.01%) ⬇️
lfx 49.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 38 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ix-add-stream-agent' of github.com:langflow-ai/langflow into cz/fix-add-stream-agent
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels May 18, 2026
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels May 18, 2026
@Cristhianzl Cristhianzl added this pull request to the merge queue May 18, 2026
Merged via the queue into release-1.10.0 with commit d017e15 May 18, 2026
121 of 122 checks passed
@Cristhianzl Cristhianzl deleted the cz/fix-add-stream-agent branch May 18, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants