Skip to content

feat: add Braintrust tracing integration - #11677

Open
dpguthrie wants to merge 29 commits into
langflow-ai:mainfrom
dpguthrie:feat/braintrust-tracing-integration
Open

feat: add Braintrust tracing integration#11677
dpguthrie wants to merge 29 commits into
langflow-ai:mainfrom
dpguthrie:feat/braintrust-tracing-integration

Conversation

@dpguthrie

@dpguthrie dpguthrie commented Feb 9, 2026

Copy link
Copy Markdown

Summary

Adds native Braintrust observability support to Langflow, following the same BaseTracer pattern used by existing monitoring integrations (Langfuse, LangSmith, Opik, Arize Phoenix, LangWatch, Traceloop).

  • New tracer: src/backend/base/langflow/services/tracing/braintrust.py implementing BaseTracer
  • Service registration: Added _get_braintrust_tracer() and _initialize_braintrust_tracer() to service.py
  • Documentation: New docs/docs/Develop/integrations-braintrust.mdx page with setup instructions
  • Sidebar: Added Braintrust to the Monitoring section in docs/sidebars.js

How it works

The integration activates automatically when the BRAINTRUST_API_KEY environment variable is set (same pattern as all other monitoring integrations). It provides:

  1. Component-level tracing -- each Langflow component execution creates a span in Braintrust
  2. Deep LangChain tracing -- returns an inline LangChain callback handler from get_langchain_callback() that captures LLM calls with token metrics, time-to-first-token, tool usage, retriever queries, and chain execution details

Dependencies

  • braintrust -- the only required dependency. The tracer includes an inline LangChain callback handler built entirely on the braintrust SDK primitives (start_span, log, end), so no additional packages like braintrust-langchain are needed.

Environment variables

Variable Required Default Description
BRAINTRUST_API_KEY Yes -- Braintrust API key
BRAINTRUST_API_URL No https://api.braintrust.dev API endpoint
BRAINTRUST_PROJECT No Langflow project name Project name in Braintrust

Test plan

  • Set BRAINTRUST_API_KEY, start Langflow, run a flow, verify traces appear in Braintrust dashboard
  • Verify tracer auto-disables when BRAINTRUST_API_KEY is not set (no errors, no impact)
  • Verify component-level spans are created for each node in the flow
  • Verify LLM calls show token metrics and time-to-first-token
  • Verify existing monitoring integrations (Langfuse, LangSmith, etc.) are unaffected

Summary by CodeRabbit

  • New Features

    • Integrated Braintrust as a new observability platform, enabling comprehensive real-time tracing of Langflow flows and components with support for nested spans and token-level metrics.
  • Documentation

    • Added Braintrust integration guide covering account setup, API key configuration, environment variables, cross-platform installation, trace collection workflow, and dashboard usage.

@coderabbitai

coderabbitai Bot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

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.

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

This PR adds Braintrust integration to Langflow for capturing and forwarding component and flow traces. It includes documentation, sidebar navigation updates, a new BraintrustTracer implementation with environment-based configuration, and integration into the existing tracing service infrastructure.

Changes

Cohort / File(s) Summary
Documentation & Navigation
docs/docs/Develop/integrations-braintrust.mdx, docs/sidebars.js
New Braintrust integration guide covering prerequisites, environment configuration, platform-specific setup commands, trace collection behavior, and dashboard usage. Sidebar entry added under Observability > Monitoring.
BraintrustTracer Implementation
src/backend/base/langflow/services/tracing/braintrust.py
New tracer class implementing BaseTracer with lifecycle methods (add_trace, end_trace, end) to emit per-flow and per-component spans to Braintrust. Handles environment-based API key/URL/project configuration, gracefully manages braintrust import failures, recursively converts Langflow-specific types to JSON-serializable forms, and tracks root/child spans with metadata.
Tracing Service Integration
src/backend/base/langflow/services/tracing/service.py
Added BraintrustTracer factory function and initialization method invoked in start_tracers pipeline to instantiate and register the braintrust tracer with trace context.

Sequence Diagram

sequenceDiagram
    participant LF as Langflow Flow
    participant TS as TracingService
    participant BT as BraintrustTracer
    participant BR as Braintrust Backend

    LF->>TS: start_tracers()
    TS->>BT: _initialize_braintrust_tracer()
    BT->>BT: _get_config() from env
    BT->>BR: Initialize root span (flow metadata)
    BR-->>BT: Root span created

    LF->>BT: add_trace(component inputs)
    BT->>BR: Create child span
    BR-->>BT: Child span stored

    LF->>BT: end_trace(component outputs/logs)
    BT->>BR: Finish child span with outputs/logs
    BR-->>BT: Span finalized

    LF->>BT: end(flow outputs/error)
    BT->>BR: Finish root span with flow I/O
    BR-->>BT: Root span closed
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 3 warnings)
Check name Status Explanation Resolution
Test Coverage For New Implementations ❌ Error PR introduces BraintrustTracer implementation but lacks corresponding test files for validating the new functionality. Add comprehensive tests covering initialization, span creation, error handling, type conversion, and integration with TracingService.
Docstring Coverage ⚠️ Warning Docstring coverage is 21.43% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Quality And Coverage ⚠️ Warning The PR introduces 240-line BraintrustTracer implementation with zero dedicated unit tests and missing Braintrust tracer verification in existing test suite. Create dedicated test file with comprehensive unit tests for configuration, setup, span management, data conversion, and update existing tests to include Braintrust tracer verification.
Test File Naming And Structure ⚠️ Warning BraintrustTracer implementation lacks test coverage in existing test infrastructure and requires dedicated test file. Add _get_braintrust_tracer to mock_tracers fixture, add braintrust assertion to test_start_end_tracers, and create comprehensive test_braintrust_tracer.py.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add Braintrust tracing integration' directly and accurately summarizes the main change: adding a new Braintrust tracing integration to Langflow. It is concise, specific, and clearly communicates the primary objective.
Excessive Mock Usage Warning ✅ Passed No test files are included in this PR, so there are no mocks to assess for excessive use.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 9, 2026
@github-actions github-actions Bot removed the enhancement New feature or request label Feb 9, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 9, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In `@docs/docs/Develop/integrations-braintrust.mdx`:
- Around line 1-4: The MDX frontmatter is missing required fields; update the
YAML frontmatter for the Braintrust doc by adding the missing `description` and
`sidebar_position` keys alongside the existing `title` (e.g., set a short
descriptive string for `description` and an integer for `sidebar_position`) so
the frontmatter contains `title`, `description`, and `sidebar_position`.
- Around line 31-33: Several bash code blocks (instances of the triple-backtick
fences that start with "```bash") are missing the required title attribute;
update each code fence (e.g., the ones currently written as "```bash") to
include a title like title="Terminal" (so they read e.g. ```bash
title="Terminal") or another descriptive title per block; ensure you change
every bash block in the file (including the blocks noted around the earlier
examples) so each specifies both the language and a title attribute.

In `@src/backend/base/langflow/services/tracing/braintrust.py`:
- Around line 50-68: The Braintrust tracer constructor (__init__ in
braintrust.py) accepts user_id and session_id but _initialize_braintrust_tracer
in service.py does not forward them, so root span metadata always has None;
update _initialize_braintrust_tracer to accept (or extract) the service-layer
user_id and session_id and pass them into the Braintrust tracer constructor when
instantiating the tracer (same pattern used by langfuse/opik tracers) so the
root span metadata includes the correct user_id and session_id.

In `@src/backend/base/langflow/services/tracing/service.py`:
- Around line 229-238: The Braintrust tracer is not receiving user_id and
session_id from the TraceContext, so root span metadata will always be None;
update _initialize_braintrust_tracer to pass trace_context.user_id and
trace_context.session_id into the braintrust_tracer call (alongside trace_name,
trace_type, project_name, trace_id) so the tracer's constructor receives those
values (TraceContext and braintrust_tracer are the relevant symbols to update).
🧹 Nitpick comments (3)
src/backend/base/langflow/services/tracing/braintrust.py (3)

104-106: logger.exception is too noisy for a missing optional dependency.

logger.exception logs the full stack trace. For an expected condition (optional braintrust package not installed), a simple logger.info or logger.warning with the message is more appropriate. Other tracers in the codebase handle ImportError more quietly.

Proposed fix
         except ImportError:
-            logger.exception("Could not import braintrust. Please install it with `pip install braintrust`.")
+            logger.info("Could not import braintrust. Please install it with `pip install braintrust`.")
             return False

212-213: Redundant isinstance check — HumanMessage and SystemMessage are subclasses of BaseMessage.

Checking isinstance(value, (BaseMessage, HumanMessage, SystemMessage)) is equivalent to isinstance(value, BaseMessage) since the latter two inherit from it. The extra types can be removed for clarity.

Proposed fix
-        if isinstance(value, (BaseMessage, HumanMessage, SystemMessage)):
+        if isinstance(value, BaseMessage):
             return value.content

208-217: Message check must precede BaseMessage — and str(None) produces "None" string.

Two observations on the ordering and behavior:

  1. Order is correctMessage is checked before BaseMessage, which is important since Message may share an ancestor. Good.

  2. types.NoneType in the tuple at line 216 converts None to the string "None" rather than passing through as None. If this is intentional, a brief comment would help; otherwise the NoneType check can be dropped so None passes through as-is from return value.

Comment on lines +1 to +4
---
title: Braintrust
slug: /integrations-braintrust
---

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Frontmatter is missing description and sidebar_position.

As per coding guidelines, YAML frontmatter must include title, description, and sidebar_position.

Proposed fix
 ---
 title: Braintrust
 slug: /integrations-braintrust
+description: Configure Langflow to send tracing data to Braintrust for debugging and analyzing flow executions.
+sidebar_position: 1
 ---

As per coding guidelines: "Markdown files must include YAML frontmatter with title, description, and sidebar_position".

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
---
title: Braintrust
slug: /integrations-braintrust
---
---
title: Braintrust
slug: /integrations-braintrust
description: Configure Langflow to send tracing data to Braintrust for debugging and analyzing flow executions.
sidebar_position: 1
---
🤖 Prompt for AI Agents
In `@docs/docs/Develop/integrations-braintrust.mdx` around lines 1 - 4, The MDX
frontmatter is missing required fields; update the YAML frontmatter for the
Braintrust doc by adding the missing `description` and `sidebar_position` keys
alongside the existing `title` (e.g., set a short descriptive string for
`description` and an integer for `sidebar_position`) so the frontmatter contains
`title`, `description`, and `sidebar_position`.

Comment on lines +31 to +33
```bash
export BRAINTRUST_API_KEY=YOUR_API_KEY
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Code blocks are missing the title attribute.

Per coding guidelines, code blocks must include a title attribute and specify the language (e.g., ```bash title="Terminal"). All bash code blocks in this file are missing title.

As per coding guidelines: "Code blocks must include a title attribute and specify the language".

Also applies to: 38-40, 52-58, 63-65, 75-77

🤖 Prompt for AI Agents
In `@docs/docs/Develop/integrations-braintrust.mdx` around lines 31 - 33, Several
bash code blocks (instances of the triple-backtick fences that start with
"```bash") are missing the required title attribute; update each code fence
(e.g., the ones currently written as "```bash") to include a title like
title="Terminal" (so they read e.g. ```bash title="Terminal") or another
descriptive title per block; ensure you change every bash block in the file
(including the blocks noted around the earlier examples) so each specifies both
the language and a title attribute.

Comment on lines +50 to +68
def __init__(
self,
trace_name: str,
trace_type: str,
project_name: str,
trace_id: UUID,
user_id: str | None = None,
session_id: str | None = None,
) -> None:
self.trace_name = trace_name
self.trace_type = trace_type
self.trace_id = trace_id
self.user_id = user_id
self.session_id = session_id
self.flow_id = trace_name.split(" - ")[-1]
self.spans: dict[str, Any] = {}

config = self._get_config()
self._ready: bool = self._setup_braintrust(config, project_name) if config else False

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Constructor does not accept user_id / session_id from the service layer.

The __init__ signature accepts user_id and session_id, and stores them in metadata, but _initialize_braintrust_tracer in service.py (line 233) does not pass them. Compare with langfuse and opik tracers which do. This means user_id and session_id will always be None in the root span metadata.

🤖 Prompt for AI Agents
In `@src/backend/base/langflow/services/tracing/braintrust.py` around lines 50 -
68, The Braintrust tracer constructor (__init__ in braintrust.py) accepts
user_id and session_id but _initialize_braintrust_tracer in service.py does not
forward them, so root span metadata always has None; update
_initialize_braintrust_tracer to accept (or extract) the service-layer user_id
and session_id and pass them into the Braintrust tracer constructor when
instantiating the tracer (same pattern used by langfuse/opik tracers) so the
root span metadata includes the correct user_id and session_id.

Comment on lines +229 to +238
def _initialize_braintrust_tracer(self, trace_context: TraceContext) -> None:
if self.deactivated:
return
braintrust_tracer = _get_braintrust_tracer()
trace_context.tracers["braintrust"] = braintrust_tracer(
trace_name=trace_context.run_name,
trace_type="chain",
project_name=trace_context.project_name,
trace_id=trace_context.run_id,
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

user_id and session_id are not forwarded to the Braintrust tracer.

Other tracers that support user/session context (e.g., langfuse at line 188–189, opik at line 212–213, traceloop at line 225–226) pass user_id and session_id from trace_context. The Braintrust tracer's __init__ accepts these parameters and includes them in root span metadata, but they will always be None because they aren't passed here.

Proposed fix
         braintrust_tracer = _get_braintrust_tracer()
         trace_context.tracers["braintrust"] = braintrust_tracer(
             trace_name=trace_context.run_name,
             trace_type="chain",
             project_name=trace_context.project_name,
             trace_id=trace_context.run_id,
+            user_id=trace_context.user_id,
+            session_id=trace_context.session_id,
         )
🤖 Prompt for AI Agents
In `@src/backend/base/langflow/services/tracing/service.py` around lines 229 -
238, The Braintrust tracer is not receiving user_id and session_id from the
TraceContext, so root span metadata will always be None; update
_initialize_braintrust_tracer to pass trace_context.user_id and
trace_context.session_id into the braintrust_tracer call (alongside trace_name,
trace_type, project_name, trace_id) so the tracer's constructor receives those
values (TraceContext and braintrust_tracer are the relevant symbols to update).

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 9, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 9, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 9, 2026
@github-actions github-actions Bot added the enhancement New feature or request label Feb 9, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 9, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 9, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 10, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 11, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 11, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 11, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 11, 2026
Cristhianzl and others added 6 commits February 18, 2026 07:03
… component (langflow-ai#11626)

* feat: add smart column ordering and clean output toggle to Split Text component

Add smart_column_order() method to DataFrame that prioritizes content columns
(text, content, output, etc.) and de-prioritizes system metadata columns
(timestamp, sender, session_id, etc.). Add Clean Output boolean input to
Split Text component that strips metadata columns by default.

* fix: update code_hash for Knowledge Ingestion and Vector Store RAG components

* test: update split text tests for clean_output toggle

* [autofix.ci] apply automated fixes

* fix: change default value of clean_output toggle to False in Split Text component

* [autofix.ci] apply automated fixes (attempt 2/3)

* fix: update code_hash for Knowledge Ingestion and Vector Store RAG components

* fix: add clean_output option to Knowledge Ingestion and Vector Store RAG components

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

* [autofix.ci] apply automated fixes

* fix: Add missing get_current_active_user_mcp to lfx AuthService

The base class declares get_current_active_user_mcp as abstract but the
default lfx AuthService did not implement it, causing instantiation to
fail in tests.

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Fixing 404 error response.

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
…en (langflow-ai#11606)

* fix: add public config endpoint to fix shareable playground grey screen

The shareable playground feature was showing a grey/blank screen when
accessed by unauthenticated users with LANGFLOW_AUTO_LOGIN=False. This
was caused by the frontend calling the protected /api/v1/config endpoint
which requires authentication, resulting in 403 errors.

This fix adds a new /api/v1/public_config endpoint that returns a subset
of configuration values safe for public access (max_file_size_upload,
event_delivery, voice_mode_available, frontend_timeout). The frontend
now conditionally uses this public endpoint when in the playground page
context.

Changes:
- Add PublicConfigResponse schema in backend
- Add /api/v1/public_config endpoint (no auth required)
- Add useGetPublicConfig hook in frontend
- Update PlaygroundPage to use public config
- Update InputWrapper components to conditionally use public/auth config

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* refactor: extract usePlaygroundConfig hook to reduce code duplication

Created a custom hook that encapsulates the logic for choosing between
authenticated config (useGetConfig) and public config (useGetPublicConfig)
based on whether we're on a playground page.

- Added src/frontend/src/hooks/use-playground-config.ts
- Added unit tests with 8 test cases covering all scenarios
- Updated both input-wrapper.tsx files to use the new hook

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* test: add unit tests for public_config endpoint and remove unused code

- Added 4 test cases for /api/v1/public_config endpoint:
  - Verifies endpoint is accessible without authentication
  - Verifies response contains expected fields
  - Verifies sensitive fields are not exposed
  - Verifies response field types are correct

- Removed unused usePlaygroundConfig import and config variable
  from playgroundComponent's input-wrapper.tsx

* test: add 500 error test for public_config endpoint

* fix: address ruff linting error in 500 error test

* refactor: merge /public_config into /config endpoint with auth-based response

- Add get_optional_user dependency that returns User | None
- Modify /config endpoint to return ConfigResponse for authenticated users,
  PublicConfigResponse for unauthenticated users
- Remove separate /public_config endpoint
- Update frontend to use single useGetConfig hook with type guards
- Delete use-get-public-config.ts (no longer needed)
- Simplify usePlaygroundConfig hook
- Update tests for new behavior

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: use BaseConfig pattern for config type hierarchy

Introduce BaseConfig interface as the foundation, with PublicConfigResponse
as a type alias and ConfigResponse extending the base. This provides clearer
semantic "is-a" relationships in the type hierarchy.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* fix: remove unused playgroundPage prop from playgroundComponent InputWrapper

The playgroundPage prop was declared and passed through the component chain
but never actually used in InputWrapper. This removes the dead code from:
- InputWrapperProps interface
- InputWrapper destructuring
- ChatInput component
- ChatInputType type definition
- flow-page-sliding-container ChatInput call

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: resolve Ruff errors in auth/utils.py

- Fix get_current_user_for_sse to delegate to _auth_service()
- Fix get_optional_user to use _auth_service().get_current_user() instead of undefined get_current_user_by_jwt
- Fix get_webhook_user to delegate to _auth_service().get_webhook_user()
- Remove duplicate get_current_active_user and get_current_active_superuser definitions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: remove unnecessary usePlaygroundConfig hook wrapper

- Remove usePlaygroundConfig hook that was just a thin wrapper around useGetConfig
- Update input-wrapper.tsx to use useGetConfig directly
- Delete associated test file
- Improves code maintainability by reducing unnecessary abstraction

* feat: add type discriminator to config response schemas

- Add type: Literal["public"] = "public" to PublicConfigResponse
- Add type: Literal["full"] = "full" to ConfigResponse
- Update frontend isFullConfig type guard to use config.type === "full"

This makes the discriminator explicit and robust, rather than relying
on checking for the presence of specific fields like "auto_saving".

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* fix: update test to mock get_optional_user dependency

The test was failing because the /config endpoint now has get_optional_user
as a dependency. When testing error handling for get_settings_service(),
the dependency chain was interfering with the patch, causing FastAPI to
return 422 instead of 500.

The fix mocks get_optional_user to return None directly, bypassing its
dependency chain so we can properly test the error handling in the endpoint body.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* fix: remove explicit return None to satisfy RET501 lint rule

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* fix: use FastAPI dependency_overrides for proper dependency mocking

The previous monkeypatch approach didn't work because FastAPI's Depends()
captures the function reference at import time. Using app.dependency_overrides
properly overrides the dependency at runtime.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: remove explicit return None to satisfy RET501 lint rule

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test: add type discriminator field verification to config tests

Add assertions to verify that:
- Unauthenticated /config returns type='public'
- Authenticated /config returns type='full'

This improves test coverage for the new type discriminator field.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: use correct FastAPI dependency syntax in get_optional_user

Changed db parameter from Annotated[AsyncSession, Depends(...)] to
AsyncSession = Depends(...) to match the working get_current_user pattern.

This fixes 422 errors in tests caused by FastAPI not properly resolving
the Annotated syntax for async generator dependencies.

* schemas updated

* fix: add type discriminator to test config mocks

Tests that mock /api/v1/config need to include type: "full" so the
frontend's isFullConfig() check passes and applies the mocked settings
like auto_saving, webhook_polling_interval, and webhook_auth_enable.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Himavarsha <40851462+HimavarshaVS@users.noreply.github.com>
…n_chain_stream (langflow-ai#11362)

* fix: improve condition check for streaming token callback in handle_on_chain_stream

* [autofix.ci] apply automated fixes

* bug: fixed test for streaming skip empty chunks

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants