Repository Analysis

langchain-ai/langchain

The agent engineering platform.

42.4 Strong AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of langchain-ai/langchain, a Python project with 141,711 GitHub stars. SynthScan v2.0 examined 407,623 lines of code across 2729 source files, recording 12326 pattern matches distributed across 27 syntactic categories. The overall adjusted score of 42.4 places this repository in the Strong AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

42.4
Adjusted Score
42.4
Raw Score
100%
Time Factor
2026-07-14
Last Push
141.7K
Stars
Python
Language
407.6K
Lines of Code
2.7K
Files
12.3K
Pattern Hits
2026-07-14
Scan Date
0.28
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 19HIGH 739MEDIUM 1301LOW 10267

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 12326 distinct pattern matches across 27 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers4757 hits · 4184 pts
SeverityFileLineSnippetContext
LOW…/text-splitters/tests/unit_tests/test_html_security.py12 def test_xxe_entity_attack_blocked(self) -> None:CODE
LOW…/text-splitters/tests/unit_tests/test_html_security.py29 def test_xxe_document_function_blocked(self) -> None:CODE
LOW…/text-splitters/tests/unit_tests/test_html_security.py47 def test_secure_parser_configuration(self) -> None:CODE
LOW…/text-splitters/tests/unit_tests/test_html_security.py84 def test_dtd_processing_disabled(self) -> None:CODE
LOW…/text-splitters/tests/unit_tests/test_html_security.py110 def test_safe_default_xslt_usage(self) -> None:CODE
LOWlibs/text-splitters/tests/unit_tests/conftest.py23def pytest_collection_modifyitems(CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py168def test_lazy_getattr_raises_for_unknown() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py176def test_lightweight_splitters_remain_eagerly_accessible() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py184def test_character_text_splitter() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py193def test_character_text_splitter_empty_doc() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py202def test_character_text_splitter_separtor_empty_doc() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py211def test_character_text_splitter_long() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py220def test_character_text_splitter_short_words_first() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py229def test_character_text_splitter_longer_words() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py239def test_character_text_splitter_no_separator_in_text() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py248def test_character_text_splitter_handle_chunksize_equal_to_chunkoverlap() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py257def test_character_text_splitter_empty_input() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py266def test_character_text_splitter_whitespace_only() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py278def test_character_text_splitter_keep_separator_regex(CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py302def test_character_text_splitter_keep_separator_regex_start(CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py326def test_character_text_splitter_keep_separator_regex_end(CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py350def test_character_text_splitter_discard_separator_regex(CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py371def test_recursive_character_text_splitter_keep_separators() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py395def test_character_text_splitting_args() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py433def test_create_documents_with_metadata() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py478def test_create_documents_with_start_index(CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py489def test_metadata_not_shallow() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py504def test_iterative_text_splitter_keep_separator() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py517def test_iterative_text_splitter_discard_separator() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py530def __test_iterative_text_splitter(CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py548def test_iterative_text_splitter() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py601def test_python_text_splitter() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py1151def test_elixir_separators_no_while() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py1638def test_md_header_text_splitter_fenced_code_block(fence: str) -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py1665def test_md_header_text_splitter_fenced_code_block_interleaved(CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py1702def test_md_header_text_splitter_with_invisible_characters(characters: str) -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py1730def test_md_header_text_splitter_with_custom_headers() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py1925def test_experimental_markdown_syntax_text_splitter_header_configuration() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py1970def test_experimental_markdown_syntax_text_splitter_with_headers() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py2028def test_experimental_markdown_syntax_text_splitter_split_lines() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py2136def test_experimental_markdown_syntax_text_splitter_on_multi_files() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py2219def test_experimental_markdown_syntax_text_splitter_split_lines_on_multi_files() -> (CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py2347def test_experimental_markdown_syntax_text_splitter_with_header_on_multi_files() -> (CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py2436def test_experimental_markdown_syntax_text_splitter_header_config_on_multi_files() -> (CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py2512def test_solidity_code_splitter() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3112def test_decode_returns_no_chunks() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3183def test_happy_path_splitting_based_on_header_with_font_size() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3234def test_happy_path_splitting_based_on_header_with_whitespace_chars() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3285def test_happy_path_splitting_with_duplicate_header_tag() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3359def test_split_json_with_lists() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3383def test_split_json_many_calls() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3404def test_split_json_with_empty_dict_values() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3422def test_split_json_with_nested_empty_dicts() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3440def test_split_json_empty_dict_only() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3453def test_split_json_mixed_empty_and_nonempty_dicts() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3476def test_split_json_empty_dict_value_in_large_payload() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3507def test_powershell_code_splitter_short_code() -> None:CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py4360def test_character_text_splitter_chunk_size_effect(CODE
LOW…text-splitters/tests/unit_tests/test_text_splitters.py57def test_no_heavy_imports_on_package_load() -> None:STRING
LOW…text-splitters/tests/unit_tests/test_text_splitters.py115def test_missing_optional_dependency_raises_importerror(STRING
4697 more matches not shown…
Unused Imports3577 hits · 3287 pts
SeverityFileLineSnippetContext
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3CODE
LOW…plitters/tests/integration_tests/test_text_splitter.py17CODE
LOWlibs/text-splitters/langchain_text_splitters/nltk.py3CODE
LOWlibs/text-splitters/langchain_text_splitters/html.py3CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py9CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py14CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py14CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py14CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py14CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py14CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py21CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py21CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py25CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py25CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py25CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py25CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py31CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py32CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py33CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py34CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py34CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py34CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py34CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py34CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py41CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py44CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py45CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py46CODE
LOW…bs/text-splitters/langchain_text_splitters/__init__.py49CODE
LOWlibs/text-splitters/langchain_text_splitters/konlpy.py3CODE
LOW…bs/text-splitters/langchain_text_splitters/markdown.py3CODE
LOWlibs/text-splitters/langchain_text_splitters/python.py3CODE
LOW…s/text-splitters/langchain_text_splitters/character.py3CODE
LOW…ters/langchain_text_splitters/sentence_transformers.py3CODE
LOWlibs/text-splitters/langchain_text_splitters/spacy.py3CODE
LOWlibs/text-splitters/langchain_text_splitters/latex.py3CODE
LOWlibs/text-splitters/langchain_text_splitters/json.py3CODE
LOWlibs/text-splitters/langchain_text_splitters/base.py3CODE
LOW…nit_tests/language_models/test_chat_model_v3_stream.py3CODE
LOW…tests/unit_tests/language_models/test_compat_bridge.py26CODE
LOW…tests/unit_tests/language_models/test_compat_bridge.py26CODE
LOW…tests/unit_tests/language_models/test_compat_bridge.py26CODE
LOW…tests/unit_tests/language_models/test_compat_bridge.py26CODE
LOW…tests/unit_tests/language_models/test_compat_bridge.py26CODE
LOW…tests/unit_tests/language_models/test_compat_bridge.py26CODE
LOW…tests/unit_tests/language_models/test_compat_bridge.py26CODE
LOW…ore/tests/unit_tests/language_models/test_v1_parity.py7CODE
LOW…s/unit_tests/language_models/test_chat_model_stream.py3CODE
LOW…s/unit_tests/language_models/test_chat_model_stream.py19CODE
LOW…unit_tests/language_models/test_chat_model_streamer.py3CODE
LOW…unit_tests/language_models/test_chat_model_streamer.py22CODE
LOW…sts/unit_tests/messages/block_translators/test_groq.py8CODE
LOW…s/core/tests/unit_tests/callbacks/test_handle_event.py11CODE
LOWlibs/core/tests/unit_tests/runnables/test_imports.py43CODE
LOW…/tests/unit_tests/runnables/test_runnable_events_v3.py3CODE
LOW…re/tests/unit_tests/runnables/test_tracing_interops.py1CODE
LOWlibs/core/tests/unit_tests/runnables/test_config.py16CODE
LOW…core/tests/unit_tests/vectorstores/test_vectorstore.py7CODE
LOW…ore/tests/unit_tests/tracers/test_async_base_tracer.py3CODE
LOWlibs/core/tests/unit_tests/tracers/test_base_tracer.py3CODE
3517 more matches not shown…
Self-Referential Comments939 hits · 2792 pts
SeverityFileLineSnippetContext
MEDIUMlibs/text-splitters/scripts/lint_imports.sh5# Initialize a variable to keep track of errorsCOMMENT
MEDIUM…ts/unit_tests/language_models/chat_models/test_base.py652 # Create a message with v0 format image contentCOMMENT
MEDIUM…s/unit_tests/language_models/chat_models/test_cache.py321 # Create a simple fake chat model that we can controlCOMMENT
MEDIUM…ore/tests/unit_tests/language_models/llms/test_base.py396 # Create a custom LLM that supports streamingCOMMENT
MEDIUM…ts/unit_tests/callbacks/test_async_callback_manager.py179 """This method is decorated with @shielded in the run manager."""STRING
MEDIUM…ts/unit_tests/callbacks/test_async_callback_manager.py185 """This method is decorated with @shielded in the run manager."""STRING
MEDIUM…s/core/tests/unit_tests/utils/test_function_calling.py1192 # Define a custom Python class that isn't JSON-serializableCOMMENT
MEDIUMlibs/core/tests/unit_tests/runnables/test_history.py29# This module is the compatibility test suite for `RunnableWithMessageHistory`,COMMENT
MEDIUMlibs/core/tests/unit_tests/runnables/test_graph.py645 # Create a simple graphCOMMENT
MEDIUMlibs/core/langchain_core/messages/system.py24 # Define a chat model and invoke it with the messagesSTRING
MEDIUMlibs/core/langchain_core/messages/content.py66 # Create a text content block with provider-specific fieldsSTRING
MEDIUM…gchain_core/messages/block_translators/google_genai.py82 # Create a citation for each referenced chunkCOMMENT
MEDIUMlibs/core/langchain_core/callbacks/manager.py237 # Create the coroutineCOMMENT
MEDIUMlibs/core/langchain_core/callbacks/manager.py243 # Create a task with the captured context to preserve context variablesCOMMENT
MEDIUMlibs/core/langchain_core/utils/utils.py96 # Create a copy of dt_value.COMMENT
MEDIUMlibs/core/langchain_core/runnables/graph_png.py139 # Create a directed graphCOMMENT
MEDIUMlibs/core/langchain_core/runnables/base.py4253 # Create the transform() generator for each stepCOMMENT
MEDIUMlibs/core/langchain_core/runnables/base.py4318 # Create the transform() generator for each stepCOMMENT
MEDIUMlibs/core/langchain_core/runnables/base.py6393 # Create a Runnable binding that invokes the chat model with theSTRING
MEDIUM…core/langchain_core/prompts/few_shot_with_templates.py146 # Create the overall prefix.COMMENT
MEDIUM…core/langchain_core/prompts/few_shot_with_templates.py157 # Create the overall suffixCOMMENT
MEDIUM…core/langchain_core/prompts/few_shot_with_templates.py190 # Create the overall prefix.COMMENT
MEDIUM…core/langchain_core/prompts/few_shot_with_templates.py201 # Create the overall suffixCOMMENT
MEDIUMlibs/core/langchain_core/prompts/few_shot.py201 # Create the overall template.COMMENT
MEDIUMlibs/core/langchain_core/prompts/few_shot.py229 # Create the overall template.COMMENT
MEDIUMlibs/core/langchain_core/prompts/few_shot.py362 # Define the overall prompt.STRING
MEDIUMlibs/core/langchain_core/indexing/api.py606# Define an asynchronous generator functionCOMMENT
MEDIUMlibs/core/langchain_core/tracers/langchain.py305 # This method is only really useful for debugging flows, so we will assumeCOMMENT
MEDIUMlibs/core/scripts/lint_imports.sh5# Initialize a variable to keep track of errorsCOMMENT
MEDIUM…ain/tests/unit_tests/agents/output_parsers/test_xml.py41 # Create an AgentAction with XML tags in the tool nameCOMMENT
MEDIUM…/langchain/tests/unit_tests/storage/test_filesystem.py13 # Create a temporary directory for testingCOMMENT
MEDIUM…/langchain/tests/unit_tests/storage/test_filesystem.py40 # Create a temporary directory for testingCOMMENT
MEDIUM…/langchain/tests/unit_tests/storage/test_filesystem.py63 # Create a temporary directory for testingCOMMENT
MEDIUM…bs/langchain/tests/unit_tests/storage/test_lc_store.py14 # Create a temporary directory for testingCOMMENT
MEDIUMlibs/langchain/scripts/lint_imports.sh5# Initialize a variable to keep track of errorsCOMMENT
MEDIUMlibs/langchain/langchain_classic/serpapi.py10# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUMlibs/langchain/langchain_classic/cache.py25# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUMlibs/langchain/langchain_classic/sql_database.py10# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUMlibs/langchain/langchain_classic/requests.py14# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUM…s/langchain/langchain_classic/chat_loaders/whatsapp.py8# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUM…s/langchain/langchain_classic/chat_loaders/telegram.py8# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUM…/langchain/langchain_classic/chat_loaders/langsmith.py11# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUM…s/langchain/langchain_classic/chat_loaders/imessage.py8# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUMlibs/langchain/langchain_classic/chat_loaders/gmail.py8# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUMlibs/langchain/langchain_classic/chat_loaders/utils.py13# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUMlibs/langchain/langchain_classic/chat_loaders/slack.py8# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUMlibs/langchain/langchain_classic/retrievers/bm25.py9# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUMlibs/langchain/langchain_classic/retrievers/docarray.py9# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUM…chain/langchain_classic/retrievers/remote_retriever.py8# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUM…ngchain_classic/retrievers/chatgpt_plugin_retriever.py8# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUMlibs/langchain/langchain_classic/retrievers/milvus.py9# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUM…s/langchain/langchain_classic/retrievers/embedchain.py8# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUM…langchain_classic/retrievers/weaviate_hybrid_search.py8# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUMlibs/langchain/langchain_classic/retrievers/pubmed.py8# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUM…langchain_classic/retrievers/pinecone_hybrid_search.py8# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUMlibs/langchain/langchain_classic/retrievers/arxiv.py8# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUM…bs/langchain/langchain_classic/retrievers/chaindesk.py8# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUM…langchain/langchain_classic/retrievers/web_research.py12# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUM…/langchain/langchain_classic/retrievers/llama_index.py11# Create a way to dynamically look up deprecated imports.COMMENT
MEDIUM…angchain_classic/retrievers/google_vertex_ai_search.py12# Create a way to dynamically look up deprecated imports.COMMENT
879 more matches not shown…
Cross-File Repetition381 hits · 1905 pts
SeverityFileLineSnippetContext
HIGHlibs/text-splitters/tests/unit_tests/conftest.py0add implementations for handling custom markers. at the moment, this adds support for a custom `requires` marker. the `rSTRING
HIGHlibs/core/tests/unit_tests/conftest.py0add implementations for handling custom markers. at the moment, this adds support for a custom `requires` marker. the `rSTRING
HIGHlibs/langchain/tests/unit_tests/conftest.py0add implementations for handling custom markers. at the moment, this adds support for a custom `requires` marker. the `rSTRING
HIGHlibs/langchain_v1/tests/unit_tests/conftest.py0add implementations for handling custom markers. at the moment, this adds support for a custom `requires` marker. the `rSTRING
HIGH…text-splitters/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGHlibs/core/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGHlibs/langchain/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…s/langchain_v1/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…artners/chroma/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…ners/mistralai/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…ers/openrouter/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…s/partners/exa/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…ners/fireworks/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…/partners/groq/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…tners/deepseek/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…s/partners/xai/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…partners/nomic/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…ers/perplexity/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…artners/qdrant/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…ners/anthropic/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…rs/huggingface/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…artners/ollama/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…artners/openai/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…standard-tests/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGH…model-profiles/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.STRING
HIGHlibs/core/langchain_core/prompt_values.py0get the namespace of the langchain object. returns: `["langchain", "prompts", "chat"]`STRING
HIGHlibs/core/langchain_core/prompts/message.py0get the namespace of the langchain object. returns: `["langchain", "prompts", "chat"]`STRING
HIGHlibs/core/langchain_core/prompts/chat.py0get the namespace of the langchain object. returns: `["langchain", "prompts", "chat"]`STRING
HIGHlibs/core/langchain_core/stores.py0async get the values associated with the given keys. args: keys: a sequence of keys. returns: a sequence of optional valSTRING
HIGH…/langchain/langchain_classic/storage/encoder_backed.py0async get the values associated with the given keys. args: keys: a sequence of keys. returns: a sequence of optional valSTRING
HIGHlibs/langchain/langchain_classic/storage/file_system.py0async get the values associated with the given keys. args: keys: a sequence of keys. returns: a sequence of optional valSTRING
HIGHlibs/core/langchain_core/stores.py0async set the values for the given keys. args: key_value_pairs: a sequence of key-value pairs.STRING
HIGH…/langchain/langchain_classic/storage/encoder_backed.py0async set the values for the given keys. args: key_value_pairs: a sequence of key-value pairs.STRING
HIGHlibs/langchain/langchain_classic/storage/file_system.py0async set the values for the given keys. args: key_value_pairs: a sequence of key-value pairs.STRING
HIGHlibs/core/langchain_core/stores.py0async delete the given keys and their associated values. args: keys: a sequence of keys to delete.STRING
HIGH…/langchain/langchain_classic/storage/encoder_backed.py0async delete the given keys and their associated values. args: keys: a sequence of keys to delete.STRING
HIGHlibs/langchain/langchain_classic/storage/file_system.py0async delete the given keys and their associated values. args: keys: a sequence of keys to delete.STRING
HIGHlibs/core/langchain_core/stores.py0async get an iterator over keys that match the given prefix. args: prefix: the prefix to match. yields: keys that match STRING
HIGH…/langchain/langchain_classic/storage/encoder_backed.py0async get an iterator over keys that match the given prefix. args: prefix: the prefix to match. yields: keys that match STRING
HIGHlibs/langchain/langchain_classic/storage/file_system.py0async get an iterator over keys that match the given prefix. args: prefix: the prefix to match. yields: keys that match STRING
HIGH…gchain_core/messages/block_translators/google_genai.py0derive standard content blocks from a chunk with bedrock converse content. args: message: the message chunk to translateSTRING
HIGH…core/langchain_core/messages/block_translators/groq.py0derive standard content blocks from a chunk with bedrock converse content. args: message: the message chunk to translateSTRING
HIGH…re/langchain_core/messages/block_translators/openai.py0derive standard content blocks from a chunk with bedrock converse content. args: message: the message chunk to translateSTRING
HIGH…langchain_core/messages/block_translators/anthropic.py0derive standard content blocks from a chunk with bedrock converse content. args: message: the message chunk to translateSTRING
HIGH…in_core/messages/block_translators/bedrock_converse.py0derive standard content blocks from a chunk with bedrock converse content. args: message: the message chunk to translateSTRING
HIGH…e/langchain_core/messages/block_translators/bedrock.py0derive standard content blocks from a chunk with bedrock converse content. args: message: the message chunk to translateSTRING
HIGH…core/langchain_core/messages/block_translators/groq.py0register the bedrock translator with the central registry. run automatically when the module is imported.STRING
HIGH…re/langchain_core/messages/block_translators/openai.py0register the bedrock translator with the central registry. run automatically when the module is imported.STRING
HIGH…langchain_core/messages/block_translators/anthropic.py0register the bedrock translator with the central registry. run automatically when the module is imported.STRING
HIGH…in_core/messages/block_translators/bedrock_converse.py0register the bedrock translator with the central registry. run automatically when the module is imported.STRING
HIGH…e/langchain_core/messages/block_translators/bedrock.py0register the bedrock translator with the central registry. run automatically when the module is imported.STRING
HIGH…re/langchain_core/messages/block_translators/openai.py0convert bedrock converse format blocks to v1 format. during the `content_blocks` parsing process, we wrap blocks not recSTRING
HIGH…langchain_core/messages/block_translators/anthropic.py0convert bedrock converse format blocks to v1 format. during the `content_blocks` parsing process, we wrap blocks not recSTRING
HIGH…in_core/messages/block_translators/bedrock_converse.py0convert bedrock converse format blocks to v1 format. during the `content_blocks` parsing process, we wrap blocks not recSTRING
HIGH…re/langchain_core/messages/block_translators/openai.py0convert a v1 message to the chat completions format.STRING
HIGHlibs/partners/fireworks/langchain_fireworks/_compat.py0convert a v1 message to the chat completions format.STRING
HIGH…artners/openai/langchain_openai/chat_models/_compat.py0convert a v1 message to the chat completions format.STRING
HIGHlibs/core/langchain_core/callbacks/streaming_stdout.py0callback handler streams to stdout on new llm token.STRING
HIGH…gchain/langchain_classic/callbacks/streaming_stdout.py0callback handler streams to stdout on new llm token.STRING
HIGH…chain_classic/callbacks/streaming_stdout_final_only.py0callback handler streams to stdout on new llm token.STRING
321 more matches not shown…
Docstring Block Structure272 hits · 1360 pts
SeverityFileLineSnippetContext
HIGHAGENTS.md222Send an email to a recipient with specified priority. Any additional context about the function can go here. ASTRING
HIGHCLAUDE.md222Send an email to a recipient with specified priority. Any additional context about the function can go here. ASTRING
HIGHlibs/text-splitters/langchain_text_splitters/html.py209Fetch text content from a URL and split it into documents. Args: url: The URL to fetch content fromSTRING
HIGHlibs/text-splitters/langchain_text_splitters/html.py253Private method that performs a DFS traversal over the DOM and yields. Document objects on-the-fly. This approacSTRING
HIGHlibs/text-splitters/langchain_text_splitters/html.py455Split an HTML document into sections based on specified header tags. This method uses BeautifulSoup to parse thSTRING
HIGHlibs/text-splitters/langchain_text_splitters/html.py517Convert specific HTML tags to headers using an XSLT transformation. This method uses an XSLT file to transform STRING
HIGH…s/text-splitters/langchain_text_splitters/character.py184Retrieve a list of separators specific to the given language. Args: language: The language for whicSTRING
HIGHlibs/text-splitters/langchain_text_splitters/base.py242Build a `tiktoken`-based length function. Shared by `from_tiktoken_encoder` on both `TextSplitter` and STRING
HIGHlibs/text-splitters/langchain_text_splitters/base.py290Text splitter that uses `tiktoken` encoder to count length. Args: encoding_name: The name of the tiSTRING
HIGHlibs/text-splitters/langchain_text_splitters/base.py379Text splitter that uses `tiktoken` encoder to count length. Unlike the base implementation, this also seeds theSTRING
HIGHlibs/core/langchain_core/retrievers.py182Invoke the retriever to get relevant documents. Main entry point for synchronous retriever invocations. STRING
HIGHlibs/core/langchain_core/retrievers.py243Asynchronously invoke the retriever to get relevant documents. Main entry point for asynchronous retriever invoSTRING
HIGHlibs/core/langchain_core/_import_utils.py9Import an attribute from a module located in a package. This utility function is used in custom `__getattr__` methoSTRING
HIGHlibs/core/langchain_core/language_models/chat_models.py207Generate from a stream. Args: stream: Iterator of `ChatGenerationChunk`. Raises: ValueError: ISTRING
HIGHlibs/core/langchain_core/language_models/chat_models.py2364Model wrapper that returns outputs formatted to match the given schema. Args: schema: The output scSTRING
HIGHlibs/core/langchain_core/language_models/llms.py82Create a retry decorator for a given LLM and provided a list of error types. Args: error_types: List of errSTRING
HIGHlibs/core/langchain_core/language_models/llms.py164Get prompts that are already cached. Args: params: Dictionary of parameters. prompts: List of prompSTRING
HIGHlibs/core/langchain_core/language_models/llms.py200Get prompts that are already cached. Async version. Args: params: Dictionary of parameters. promptsSTRING
HIGHlibs/core/langchain_core/language_models/llms.py238Update the cache and get the LLM output. Args: cache: Cache object. existing_prompts: Dictionary ofSTRING
HIGHlibs/core/langchain_core/language_models/llms.py271Update the cache and get the LLM output. Async version. Args: cache: Cache object. existing_promptsSTRING
HIGHlibs/core/langchain_core/language_models/llms.py864Pass a sequence of prompts to a model and return generations. This method should make use of batched calls for STRING
HIGHlibs/core/langchain_core/language_models/llms.py1147Asynchronously pass a sequence of prompts to a model and return generations. This method should make use of batSTRING
HIGHlibs/core/langchain_core/tools/convert.py90Convert Python functions and `Runnables` to LangChain tools. Can be used as a decorator with or without arguments tSTRING
HIGHlibs/core/langchain_core/tools/structured.py148Create tool from a given function. A classmethod that helps to create a tool from a function. Args: STRING
HIGHlibs/core/langchain_core/tools/simple.py75Convert tool input to Pydantic model. Args: tool_input: The input to the tool. tool_calSTRING
HIGHlibs/core/langchain_core/tools/simple.py180Initialize tool from a function. Args: func: The function to create the tool from. nameSTRING
HIGHlibs/core/langchain_core/tools/base.py225Check if all Pydantic annotations in a function are from v1. Args: signature: The function signature to cheSTRING
HIGHlibs/core/langchain_core/tools/base.py755Parse and validate tool input using the args schema. Args: tool_input: The raw input to the tool. STRING
HIGHlibs/core/langchain_core/tools/base.py941Convert tool input to positional and keyword arguments. Args: tool_input: The input to the tool. STRING
HIGHlibs/core/langchain_core/tools/base.py993Run the tool. Args: tool_input: The input to the tool. verbose: Whether to log the toolSTRING
HIGHlibs/core/langchain_core/tools/base.py1121Run the tool asynchronously. Args: tool_input: The input to the tool. verbose: Whether STRING
HIGHlibs/core/langchain_core/tools/base.py1254Handle validation errors based on the configured flag. Args: e: The validation error that occurred. STRING
HIGHlibs/core/langchain_core/tools/base.py1289Convert a `ToolException` into handled tool output content. Args: e: The tool exception that occurred. STRING
HIGHlibs/core/langchain_core/messages/content.py1005Create an `ImageContentBlock`. Args: url: URL of the image. base64: Base64-encoded image data. STRING
HIGHlibs/core/langchain_core/messages/content.py1067Create a `VideoContentBlock`. Args: url: URL of the video. base64: Base64-encoded video data. STRING
HIGHlibs/core/langchain_core/messages/content.py1133Create an `AudioContentBlock`. Args: url: URL of the audio. base64: Base64-encoded audio data. STRING
HIGHlibs/core/langchain_core/messages/content.py1199Create a `FileContentBlock`. Args: url: URL of the file. base64: Base64-encoded file data. STRING
HIGHlibs/core/langchain_core/messages/utils.py255Get the type string for XML message element. Args: m: The message to get the type string for. humanSTRING
HIGHlibs/core/langchain_core/messages/utils.py298Convert a sequence of messages to strings and concatenate them into one string. Args: messages: Messages toSTRING
HIGHlibs/core/langchain_core/messages/utils.py602Create a message from a `Message` type and content string. Args: message_type: the type of the message (e.gSTRING
HIGHlibs/core/langchain_core/messages/utils.py707Instantiate a `Message` from a variety of message formats. The message format can be one of the following: - `STRING
HIGHlibs/core/langchain_core/messages/utils.py868Filter messages based on `name`, `type` or `id`. Args: messages: Sequence Message-like objects to filter. STRING
HIGHlibs/core/langchain_core/messages/utils.py1148Trim messages to be below a token count. `trim_messages` can be used to reduce the size of a chat history to a specSTRING
HIGHlibs/core/langchain_core/messages/utils.py1556Convert LangChain messages into OpenAI message dicts. Args: messages: Message-like object or iterable of obSTRING
HIGHlibs/core/langchain_core/messages/base.py413Message chunks support concatenation with other message chunks. This functionality is useful to combine messageSTRING
HIGH…re/langchain_core/messages/block_translators/openai.py23Convert `ImageContentBlock` to format expected by OpenAI Chat Completions. Args: block: The image content bSTRING
HIGH…re/langchain_core/messages/block_translators/openai.py62Format standard data content block to format expected by OpenAI. "Standard data content block" can include old-stylSTRING
HIGH…angchain_core/example_selectors/semantic_similarity.py155Create k-shot example selector using example list and embeddings. Reshuffles examples dynamically based on querSTRING
HIGH…angchain_core/example_selectors/semantic_similarity.py199Async create k-shot example selector using example list and embeddings. Reshuffles examples dynamically based oSTRING
HIGH…angchain_core/example_selectors/semantic_similarity.py288Create k-shot example selector using example list and embeddings. Reshuffles examples dynamically based on Max STRING
HIGH…angchain_core/example_selectors/semantic_similarity.py335Create k-shot example selector using example list and embeddings. Reshuffles examples dynamically based on Max STRING
HIGHlibs/core/langchain_core/callbacks/manager.py2403Configure the callback manager. Args: callback_manager_cls: The callback manager class. inheritableSTRING
HIGHlibs/core/langchain_core/_security/_ssrf_protection.py47Validate a URL for SSRF protection. This function validates URLs to prevent Server-Side Request Forgery (SSRF) attaSTRING
HIGHlibs/core/langchain_core/_api/__init__.py61Dynamically import and return an attribute from a submodule. This function enables lazy loading of API functions frSTRING
HIGHlibs/core/langchain_core/utils/env.py61Get a value from a dictionary or an environment variable. Args: key: The key to look up in the dictionary. STRING
HIGHlibs/core/langchain_core/utils/formatting.py26Format a string using only keyword arguments. Overrides the base `vformat` to reject positional arguments, ensuSTRING
HIGHlibs/core/langchain_core/utils/_merge.py7Merge dictionaries. Merge many dicts, handling specific scenarios where a key exists in both dictionaries but hSTRING
HIGHlibs/core/langchain_core/utils/_merge.py171Merge two objects. It handles specific scenarios where a key exists in both dictionaries but has a value of `NoSTRING
HIGHlibs/core/langchain_core/utils/function_calling.py164Converts a Pydantic model to a function description for the OpenAI API. Args: model: The Pydantic model to STRING
HIGHlibs/core/langchain_core/utils/function_calling.py327Format tool into the OpenAI function API. Args: tool: The tool to format. Raises: ValueError: STRING
212 more matches not shown…
Modern Structural Boilerplate1125 hits · 1120 pts
SeverityFileLineSnippetContext
LOW…bs/text-splitters/langchain_text_splitters/__init__.py51__all__ = [CODE
LOWlibs/text-splitters/langchain_text_splitters/base.py27logger = logging.getLogger(__name__)CODE
LOW…re/tests/unit_tests/runnables/test_tracing_interops.py304 def _setup(self) -> None:CODE
LOWlibs/core/langchain_core/globals.py18def set_verbose(value: bool) -> None: # noqa: FBT001CODE
LOWlibs/core/langchain_core/globals.py37def set_debug(value: bool) -> None: # noqa: FBT001CODE
LOWlibs/core/langchain_core/globals.py56def set_llm_cache(value: Optional["BaseCache"]) -> None:CODE
LOWlibs/core/langchain_core/rate_limiters.py253__all__ = [CODE
LOWlibs/core/langchain_core/language_models/llms.py66logger = logging.getLogger(__name__)CODE
LOW…/core/langchain_core/language_models/_compat_bridge.py837__all__ = [CODE
LOW…s/core/langchain_core/language_models/model_profile.py10logger = logging.getLogger(__name__)CODE
LOW…re/langchain_core/language_models/chat_model_stream.py238 def set_start(self, cb: Callable[[], None] | None) -> None:CODE
LOW…re/langchain_core/language_models/chat_model_stream.py242 def set_request_more(self, cb: Callable[[], bool] | None) -> None:CODE
LOW…re/langchain_core/language_models/chat_model_stream.py336 def set_start(self, cb: Callable[[], Awaitable[None]] | None) -> None:CODE
LOW…re/langchain_core/language_models/chat_model_stream.py340 def set_arequest_more(self, cb: Callable[[], Awaitable[bool]] | None) -> None:CODE
LOW…re/langchain_core/language_models/chat_model_stream.py547 def set_message_id(self, message_id: str) -> None:CODE
LOW…re/langchain_core/language_models/chat_model_stream.py1104 def set_start(self, cb: Callable[[], None] | None) -> None:CODE
LOW…re/langchain_core/language_models/chat_model_stream.py1111 def set_request_more(self, cb: Callable[[], bool]) -> None:CODE
LOW…re/langchain_core/language_models/chat_model_stream.py1252 def set_arequest_more(self, cb: Callable[[], Awaitable[bool]] | None) -> None:CODE
LOW…re/langchain_core/language_models/chat_model_stream.py1273 def set_start(self, cb: Callable[[], Awaitable[None]] | None) -> None:CODE
LOW…re/langchain_core/language_models/chat_model_stream.py1435__all__ = [CODE
LOWlibs/core/langchain_core/messages/ai.py35logger = logging.getLogger(__name__)CODE
LOWlibs/core/langchain_core/messages/utils.py65logger = logging.getLogger(__name__)CODE
LOWlibs/core/langchain_core/callbacks/manager.py48logger = logging.getLogger(__name__)CODE
LOWlibs/core/langchain_core/_security/__init__.py25__all__ = [CODE
LOWlibs/core/langchain_core/utils/html.py8logger = logging.getLogger(__name__)CODE
LOWlibs/core/langchain_core/utils/function_calling.py42logger = logging.getLogger(__name__)CODE
LOWlibs/core/langchain_core/utils/mustache.py21logger = logging.getLogger(__name__)CODE
LOWlibs/core/langchain_core/utils/uuid.py57__all__ = ["uuid7"]CODE
LOWlibs/core/langchain_core/runnables/graph_png.py205 def update_styles(viz: Any, graph: Graph) -> None:CODE
LOWlibs/core/langchain_core/vectorstores/utils.py36logger = logging.getLogger(__name__)CODE
LOWlibs/core/langchain_core/vectorstores/base.py38logger = logging.getLogger(__name__)CODE
LOWlibs/core/langchain_core/load/serializable.py17logger = logging.getLogger(__name__)CODE
LOWlibs/core/langchain_core/output_parsers/openai_tools.py23logger = logging.getLogger(__name__)CODE
LOWlibs/core/langchain_core/output_parsers/__init__.py52__all__ = [CODE
LOWlibs/core/langchain_core/output_parsers/pydantic.py137__all__ = [CODE
LOWlibs/core/langchain_core/output_parsers/json.py134__all__ = [CODE
LOWlibs/core/langchain_core/prompts/loading.py19logger = logging.getLogger(__name__)CODE
LOW…s/core/langchain_core/document_loaders/blob_loaders.py38__all__ = ["Blob", "BlobLoader", "PathLike"]CODE
LOWlibs/core/langchain_core/tracers/evaluation.py26logger = logging.getLogger(__name__)CODE
LOWlibs/core/langchain_core/tracers/core.py35logger = logging.getLogger(__name__)CODE
LOWlibs/core/langchain_core/tracers/_streaming.py50__all__ = [CODE
LOWlibs/core/langchain_core/tracers/event_stream.py55logger = logging.getLogger(__name__)CODE
LOWlibs/core/langchain_core/tracers/schemas.py12__all__ = [CODE
LOWlibs/core/langchain_core/tracers/langchain.py35logger = logging.getLogger(__name__)CODE
LOWlibs/core/langchain_core/tracers/langchain.py342 def _update_run_single(run: Run) -> None:CODE
LOWlibs/core/langchain_core/tracers/base.py30logger = logging.getLogger(__name__)CODE
LOWlibs/langchain/langchain_classic/serpapi.py23__all__ = [CODE
LOWlibs/langchain/langchain_classic/text_splitter.py29__all__ = [CODE
LOWlibs/langchain/langchain_classic/example_generator.py5__all__ = ["generate_example"]CODE
LOWlibs/langchain/langchain_classic/globals.py12__all__ = [CODE
LOWlibs/langchain/langchain_classic/cache.py55__all__ = [CODE
LOWlibs/langchain/langchain_classic/__init__.py377__all__ = [CODE
LOWlibs/langchain/langchain_classic/formatting.py5__all__ = ["StrictFormatter", "formatter"]CODE
LOWlibs/langchain/langchain_classic/sql_database.py23__all__ = [CODE
LOWlibs/langchain/langchain_classic/base_language.py7__all__ = ["BaseLanguageModel"]CODE
LOWlibs/langchain/langchain_classic/input.py10__all__ = [CODE
LOWlibs/langchain/langchain_classic/requests.py31__all__ = [CODE
LOW…n/langchain_classic/chat_loaders/facebook_messenger.py32__all__ = ["FolderFacebookMessengerChatLoader", "SingleFileFacebookMessengerChatLoader"]CODE
LOW…s/langchain/langchain_classic/chat_loaders/whatsapp.py21__all__ = [CODE
LOW…s/langchain/langchain_classic/chat_loaders/telegram.py21__all__ = [CODE
1065 more matches not shown…
Decorative Section Separators242 hits · 814 pts
SeverityFileLineSnippetContext
MEDIUM…s/text-splitters/langchain_text_splitters/character.py523 # ---------------COMMENT
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py143# ---------------------------------------------------------------------------COMMENT
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py145# ---------------------------------------------------------------------------COMMENT
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py233# ---------------------------------------------------------------------------COMMENT
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py235# ---------------------------------------------------------------------------COMMENT
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py353# ---------------------------------------------------------------------------COMMENT
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py355# ---------------------------------------------------------------------------COMMENT
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py193# ---------------------------------------------------------------------------COMMENT
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py196# ---------------------------------------------------------------------------COMMENT
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py272# ---------------------------------------------------------------------------COMMENT
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py274# ---------------------------------------------------------------------------COMMENT
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py315# ---------------------------------------------------------------------------COMMENT
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py317# ---------------------------------------------------------------------------COMMENT
MEDIUM…tests/unit_tests/language_models/test_compat_bridge.py43# ---------------------------------------------------------------------------COMMENT
MEDIUM…tests/unit_tests/language_models/test_compat_bridge.py45# ---------------------------------------------------------------------------COMMENT
MEDIUM…tests/unit_tests/language_models/test_compat_bridge.py146# ---------------------------------------------------------------------------COMMENT
MEDIUM…tests/unit_tests/language_models/test_compat_bridge.py148# ---------------------------------------------------------------------------COMMENT
MEDIUM…tests/unit_tests/language_models/test_compat_bridge.py844# ---------------------------------------------------------------------------COMMENT
MEDIUM…tests/unit_tests/language_models/test_compat_bridge.py846# ---------------------------------------------------------------------------COMMENT
MEDIUM…tests/unit_tests/language_models/test_compat_bridge.py1107# ---------------------------------------------------------------------------COMMENT
MEDIUM…tests/unit_tests/language_models/test_compat_bridge.py1109# ---------------------------------------------------------------------------COMMENT
MEDIUM…s/unit_tests/language_models/test_chat_model_stream.py21# ---------------------------------------------------------------------------COMMENT
MEDIUM…s/unit_tests/language_models/test_chat_model_stream.py23# ---------------------------------------------------------------------------COMMENT
MEDIUM…s/unit_tests/language_models/test_chat_model_stream.py294# ---------------------------------------------------------------------------COMMENT
MEDIUM…s/unit_tests/language_models/test_chat_model_stream.py296# ---------------------------------------------------------------------------COMMENT
MEDIUM…s/unit_tests/language_models/test_chat_model_stream.py789# ---------------------------------------------------------------------------COMMENT
MEDIUM…s/unit_tests/language_models/test_chat_model_stream.py791# ---------------------------------------------------------------------------COMMENT
MEDIUMlibs/core/tests/unit_tests/messages/test_utils.py2964# ---------------------------------------------------------------------------COMMENT
MEDIUMlibs/core/tests/unit_tests/messages/test_utils.py2966# ---------------------------------------------------------------------------COMMENT
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py91# ---------------------------------------------------------------------------COMMENT
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py93# ---------------------------------------------------------------------------COMMENT
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py147# ---------------------------------------------------------------------------COMMENT
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py149# ---------------------------------------------------------------------------COMMENT
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py224# ---------------------------------------------------------------------------COMMENT
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py226# ---------------------------------------------------------------------------COMMENT
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py462# ---------------------------------------------------------------------------COMMENT
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py464# ---------------------------------------------------------------------------COMMENT
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py525# ---------------------------------------------------------------------------COMMENT
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py527# ---------------------------------------------------------------------------COMMENT
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py585# ---------------------------------------------------------------------------COMMENT
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py587# ---------------------------------------------------------------------------COMMENT
MEDIUM…re/langchain_core/language_models/chat_model_stream.py48# ---------------------------------------------------------------------------COMMENT
MEDIUM…re/langchain_core/language_models/chat_model_stream.py50# ---------------------------------------------------------------------------COMMENT
MEDIUM…re/langchain_core/language_models/chat_model_stream.py160# ---------------------------------------------------------------------------COMMENT
MEDIUM…re/langchain_core/language_models/chat_model_stream.py162# ---------------------------------------------------------------------------COMMENT
MEDIUM…re/langchain_core/language_models/chat_model_stream.py213# ---------------------------------------------------------------------------COMMENT
MEDIUM…re/langchain_core/language_models/chat_model_stream.py215# ---------------------------------------------------------------------------COMMENT
MEDIUM…re/langchain_core/language_models/chat_model_stream.py308# ---------------------------------------------------------------------------COMMENT
MEDIUM…re/langchain_core/language_models/chat_model_stream.py310# ---------------------------------------------------------------------------COMMENT
MEDIUM…re/langchain_core/language_models/chat_model_stream.py468# ---------------------------------------------------------------------------COMMENT
MEDIUM…re/langchain_core/language_models/chat_model_stream.py470# ---------------------------------------------------------------------------COMMENT
MEDIUM…re/langchain_core/language_models/chat_model_stream.py1037# ---------------------------------------------------------------------------COMMENT
MEDIUM…re/langchain_core/language_models/chat_model_stream.py1039# ---------------------------------------------------------------------------COMMENT
MEDIUM…re/langchain_core/language_models/chat_model_stream.py1193# ---------------------------------------------------------------------------COMMENT
MEDIUM…re/langchain_core/language_models/chat_model_stream.py1195# ---------------------------------------------------------------------------COMMENT
MEDIUMlibs/core/langchain_core/_security/_policy.py12# ---------------------------------------------------------------------------COMMENT
MEDIUMlibs/core/langchain_core/_security/_policy.py14# ---------------------------------------------------------------------------COMMENT
MEDIUMlibs/core/langchain_core/_security/_policy.py97# ---------------------------------------------------------------------------COMMENT
MEDIUMlibs/core/langchain_core/_security/_policy.py99# ---------------------------------------------------------------------------COMMENT
MEDIUMlibs/core/langchain_core/_security/_policy.py120# ---------------------------------------------------------------------------COMMENT
182 more matches not shown…
Excessive Try-Catch Wrapping273 hits · 446 pts
SeverityFileLineSnippetContext
LOWlibs/text-splitters/scripts/check_imports.py13 except Exception: # noqa: BLE001CODE
LOWlibs/core/tests/unit_tests/conftest.py92 except Exception:CODE
LOW…/tests/unit_tests/runnables/test_runnable_events_v1.py1556 except Exception:CODE
LOW…/tests/unit_tests/runnables/test_runnable_events_v1.py1673 except Exception:CODE
LOW…/tests/unit_tests/runnables/test_runnable_events_v2.py1513 except Exception:CODE
LOW…/tests/unit_tests/runnables/test_runnable_events_v2.py1630 except Exception:CODE
LOW…/tests/unit_tests/runnables/test_runnable_events_v2.py1975 except Exception as e:CODE
LOWlibs/core/langchain_core/sys_info.py96 except Exception:CODE
LOWlibs/core/langchain_core/sys_info.py105 except Exception:CODE
LOWlibs/core/langchain_core/sys_info.py129 except Exception:CODE
LOWlibs/core/langchain_core/retrievers.py227 except Exception as e:CODE
LOWlibs/core/langchain_core/retrievers.py288 except Exception as e:CODE
LOWlibs/core/langchain_core/agents.py231 except Exception:CODE
LOWlibs/core/langchain_core/agents.py251 except Exception:CODE
LOWlibs/core/langchain_core/language_models/chat_models.py115 except Exception:CODE
LOWlibs/core/langchain_core/language_models/chat_models.py118 except Exception:CODE
LOWlibs/core/langchain_core/language_models/chat_models.py123 except Exception:CODE
LOWlibs/core/langchain_core/language_models/llms.py114 except Exception as e:CODE
LOWlibs/core/langchain_core/language_models/llms.py446 except Exception as e:CODE
LOWlibs/core/langchain_core/language_models/llms.py492 except Exception as e:CODE
LOW…/core/langchain_core/language_models/_compat_bridge.py187 except Exception:CODE
LOWlibs/core/langchain_core/tools/base.py928 except Exception:CODE
LOWlibs/core/langchain_core/tools/base.py1450 except Exception:CODE
LOWlibs/core/langchain_core/tools/base.py1467 except Exception:CODE
LOWlibs/core/langchain_core/messages/ai.py328 except Exception:CODE
LOWlibs/core/langchain_core/messages/ai.py568 except Exception:CODE
LOW…gchain_core/messages/block_translators/google_genai.py413 except Exception:CODE
LOWlibs/core/langchain_core/callbacks/manager.py126 except Exception as e:CODE
LOWlibs/core/langchain_core/callbacks/manager.py209 except Exception as e:CODE
LOWlibs/core/langchain_core/callbacks/manager.py340 except Exception as e:CODE
LOWlibs/core/langchain_core/callbacks/manager.py388 except Exception as e:CODE
LOWlibs/core/langchain_core/callbacks/manager.py400 except Exception as e:CODE
LOWlibs/core/langchain_core/callbacks/manager.py442 except Exception as e:CODE
LOWlibs/core/langchain_core/callbacks/manager.py2543 except Exception as e:CODE
LOWlibs/core/langchain_core/utils/html.py107 except Exception as e:CODE
LOWlibs/core/langchain_core/utils/function_calling.py274 except Exception:CODE
LOWlibs/core/langchain_core/runnables/configurable.py185 except Exception as e:CODE
LOWlibs/core/langchain_core/runnables/configurable.py228 except Exception as e:CODE
LOWlibs/core/langchain_core/runnables/router.py159 except Exception as e:CODE
LOWlibs/core/langchain_core/runnables/router.py196 except Exception as e:CODE
LOWlibs/core/langchain_core/runnables/base.py957 except Exception as e:CODE
LOWlibs/core/langchain_core/runnables/base.py1028 except Exception as e:CODE
LOWlibs/core/langchain_core/runnables/base.py1094 except Exception as e:CODE
LOWlibs/core/langchain_core/runnables/base.py1166 except Exception as e:CODE
LOWlibs/core/langchain_core/load/serializable.py78 except Exception as _:CODE
LOWlibs/core/langchain_core/load/serializable.py81 except Exception as _:CODE
LOWlibs/core/langchain_core/load/serializable.py84 except Exception as _:CODE
LOWlibs/core/langchain_core/load/serializable.py321 except Exception as _:CODE
LOWlibs/core/langchain_core/load/serializable.py377 except Exception:CODE
LOWlibs/core/langchain_core/document_loaders/langsmith.py182 except Exception:CODE
LOWlibs/core/langchain_core/indexing/api.py216 except Exception as e:CODE
LOWlibs/core/langchain_core/tracers/evaluation.py147 except Exception:CODE
LOWlibs/core/langchain_core/tracers/core.py121 except Exception:CODE
LOWlibs/core/langchain_core/tracers/stdout.py26 except Exception:CODE
LOWlibs/core/langchain_core/tracers/langchain.py336 except Exception as e:CODE
LOWlibs/core/langchain_core/tracers/langchain.py348 except Exception as e:CODE
MEDIUMlibs/core/scripts/check_version.py63 print(f"Error: {pyproject_path} not found")CODE
MEDIUMlibs/core/scripts/check_version.py67 print(f"Error: {version_path} not found")CODE
MEDIUMlibs/core/scripts/check_version.py74 print("Error: Could not find version in pyproject.toml")CODE
MEDIUMlibs/core/scripts/check_version.py78 print("Error: Could not find VERSION in langchain_core/version.py")CODE
213 more matches not shown…
Cross-Language Confusion65 hits · 412 pts
SeverityFileLineSnippetContext
HIGH…text-splitters/tests/unit_tests/test_text_splitters.py1092 else if (age >= 18 && age < 65)CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py31 proj.push("a")CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py32 proj.push("b")CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py38 proj.push("x")CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py132 proj.push("a")CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py142 proj.push("x")CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py144 proj.push("y")CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py162 proj.push("partial")CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py176 proj.push(next(deltas))CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py199 proj.push(value)CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py215 proj.push("only")CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py51 proj.push(val)CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py60 proj.push("partial")CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py73 proj.push("a")CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py74 proj.push("b")CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py91 proj.push("Hello")CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py92 proj.push(" world")CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py103 proj.push("Hi")CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py115 proj.push("x")CODE
HIGH…s/unit_tests/language_models/test_chat_model_stream.py120 proj.push("hello")CODE
HIGH…ests/unit_tests/output_parsers/test_pydantic_parser.py130 "additional_fields": null,CODE
HIGH…re/langchain_core/language_models/chat_model_stream.py785 self._reasoning_proj.push(full_r)CODE
HIGH…re/langchain_core/language_models/chat_model_stream.py789 self._reasoning_proj.push(tail)CODE
HIGH…re/langchain_core/language_models/chat_model_stream.py631 self._text_proj.push(delta_text)CODE
HIGH…re/langchain_core/language_models/chat_model_stream.py640 self._reasoning_proj.push(delta_r)CODE
HIGH…re/langchain_core/language_models/chat_model_stream.py660 self._tool_calls_proj.push(chunk_block)CODE
HIGH…re/langchain_core/language_models/chat_model_stream.py690 self._tool_calls_proj.push(legacy_chunk_block)CODE
HIGH…re/langchain_core/language_models/chat_model_stream.py728 self._tool_calls_proj.push(fallback_chunk_block)CODE
HIGH…re/langchain_core/language_models/chat_model_stream.py756 self._text_proj.push(full_text)CODE
HIGH…re/langchain_core/language_models/chat_model_stream.py762 self._text_proj.push(tail)CODE
HIGH…re/langchain_core/language_models/chat_model_stream.py1420 self._events_proj.push(cast("MessagesData", event))CODE
HIGHlibs/core/langchain_core/utils/json_schema.py184 # Case 4: Primitive value (string, number, boolean, null) - return unchangedCOMMENT
HIGH…s/langchain/langchain_classic/chains/natbot/crawler.py101 "(document.scrollingElement || document.body).scrollTop = "CODE
HIGH…s/langchain/langchain_classic/chains/natbot/crawler.py102 "(document.scrollingElement || document.body).scrollTop - "CODE
HIGH…s/langchain/langchain_classic/chains/natbot/crawler.py107 "(document.scrollingElement || document.body).scrollTop = "CODE
HIGH…s/langchain/langchain_classic/chains/natbot/crawler.py108 "(document.scrollingElement || document.body).scrollTop + "CODE
HIGH…langchain_v1/langchain/agents/_subagent_transformer.py195 self._log.push(handle)CODE
HIGH…langchain_v1/langchain/agents/_subagent_transformer.py279 handle._mux.push(event) # noqa: SLF001CODE
HIGHlibs/partners/groq/langchain_groq/chat_models.py1469 # Groq sends 'null' (JSON null) for tools with no arguments, but weSTRING
HIGHlibs/partners/groq/langchain_groq/chat_models.py1548 # Groq sends 'null' (JSON null) for tools with no arguments, but weSTRING
HIGH…rtners/perplexity/tests/unit_tests/test_chat_models.py271 # Empty content alongside tool_calls must be sent as null, not "".COMMENT
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py453DEEPSEEK_STREAM_DATA = """{"id":"d3610c24e6b42518a7883ea57c3ea2c3","choices":[{"index":0,"delta":{"content":"","role":"aCODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py454{"choices":[{"delta":{"content":"我是","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":1721CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py455{"choices":[{"delta":{"content":"Deep","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":17CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py456{"choices":[{"delta":{"content":"Seek","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":17CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py457{"choices":[{"delta":{"content":" Chat","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":1CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py458{"choices":[{"delta":{"content":",","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":17216CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py459{"choices":[{"delta":{"content":"一个","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":1721CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py460{"choices":[{"delta":{"content":"由","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":17216CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py461{"choices":[{"delta":{"content":"深度","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":1721CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py462{"choices":[{"delta":{"content":"求","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":17216CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py463{"choices":[{"delta":{"content":"索","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":17216CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py464{"choices":[{"delta":{"content":"公司","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":1721CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py465{"choices":[{"delta":{"content":"开发的","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":172CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py466{"choices":[{"delta":{"content":"智能","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":1721CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py467{"choices":[{"delta":{"content":"助手","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":1721CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py468{"choices":[{"delta":{"content":"。","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":17216CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py469{"choices":[{"delta":{"content":"","role":null},"finish_reason":"stop","index":0,"logprobs":null}],"created":1721630271,CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py532OPENAI_STREAM_DATA = """{"id":"chatcmpl-9nhARrdUiJWEMd5plwV1Gc9NCjb9M","object":"chat.completion.chunk","created":172163CODE
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py533{"id":"chatcmpl-9nhARrdUiJWEMd5plwV1Gc9NCjb9M","object":"chat.completion.chunk","created":1721631035,"model":"gpt-5.5","CODE
5 more matches not shown…
Deep Nesting325 hits · 286 pts
SeverityFileLineSnippetContext
LOWlibs/text-splitters/tests/unit_tests/conftest.py23CODE
LOWlibs/text-splitters/langchain_text_splitters/html.py252CODE
LOWlibs/text-splitters/langchain_text_splitters/html.py428CODE
LOWlibs/text-splitters/langchain_text_splitters/html.py874CODE
LOWlibs/text-splitters/langchain_text_splitters/html.py927CODE
LOW…bs/text-splitters/langchain_text_splitters/markdown.py134CODE
LOW…bs/text-splitters/langchain_text_splitters/markdown.py372CODE
LOWlibs/text-splitters/langchain_text_splitters/json.py85CODE
LOWlibs/text-splitters/langchain_text_splitters/base.py167CODE
LOWlibs/core/tests/unit_tests/conftest.py49CODE
LOWlibs/core/tests/unit_tests/pydantic_utils.py18CODE
LOWlibs/core/tests/unit_tests/pydantic_utils.py40CODE
LOWlibs/core/tests/unit_tests/test_pydantic_imports.py7CODE
LOWlibs/core/tests/unit_tests/messages/test_utils.py593CODE
LOWlibs/core/tests/unit_tests/messages/test_utils.py605CODE
LOWlibs/core/tests/unit_tests/utils/test_utils.py190CODE
LOW…re/tests/unit_tests/runnables/test_tracing_interops.py343CODE
LOW…/tests/unit_tests/runnables/test_runnable_events_v2.py2156CODE
LOWlibs/core/langchain_core/sys_info.py11CODE
LOWlibs/core/langchain_core/language_models/chat_models.py108CODE
LOWlibs/core/langchain_core/language_models/chat_models.py138CODE
LOWlibs/core/langchain_core/language_models/chat_models.py715CODE
LOWlibs/core/langchain_core/language_models/chat_models.py842CODE
LOWlibs/core/langchain_core/language_models/chat_models.py1864CODE
LOWlibs/core/langchain_core/language_models/chat_models.py2023CODE
LOWlibs/core/langchain_core/language_models/llms.py77CODE
LOWlibs/core/langchain_core/language_models/llms.py135CODE
LOWlibs/core/langchain_core/language_models/llms.py97CODE
LOWlibs/core/langchain_core/language_models/llms.py514CODE
LOW…ore/langchain_core/language_models/fake_chat_models.py266CODE
LOW…/core/langchain_core/language_models/_compat_bridge.py152CODE
LOW…/core/langchain_core/language_models/_compat_bridge.py301CODE
LOW…re/langchain_core/language_models/chat_model_stream.py246CODE
LOW…re/langchain_core/language_models/chat_model_stream.py422CODE
LOW…re/langchain_core/language_models/chat_model_stream.py580CODE
LOW…re/langchain_core/language_models/chat_model_stream.py615CODE
LOW…re/langchain_core/language_models/chat_model_stream.py793CODE
LOW…re/langchain_core/language_models/chat_model_stream.py1155CODE
LOWlibs/core/langchain_core/language_models/_utils.py33CODE
LOWlibs/core/langchain_core/language_models/_utils.py140CODE
LOWlibs/core/langchain_core/tools/structured.py133CODE
LOWlibs/core/langchain_core/tools/base.py752CODE
LOWlibs/core/langchain_core/tools/base.py902CODE
LOWlibs/core/langchain_core/tools/base.py977CODE
LOWlibs/core/langchain_core/tools/base.py1105CODE
LOWlibs/core/langchain_core/messages/ai.py243CODE
LOWlibs/core/langchain_core/messages/ai.py509CODE
LOWlibs/core/langchain_core/messages/ai.py604CODE
LOWlibs/core/langchain_core/messages/utils.py287CODE
LOWlibs/core/langchain_core/messages/utils.py593CODE
LOWlibs/core/langchain_core/messages/utils.py706CODE
LOWlibs/core/langchain_core/messages/utils.py857CODE
LOWlibs/core/langchain_core/messages/utils.py1002CODE
LOWlibs/core/langchain_core/messages/utils.py1549CODE
LOWlibs/core/langchain_core/messages/utils.py1965CODE
LOWlibs/core/langchain_core/messages/utils.py2239CODE
LOWlibs/core/langchain_core/messages/tool.py92CODE
LOWlibs/core/langchain_core/messages/base.py366CODE
LOWlibs/core/langchain_core/messages/base.py200CODE
LOW…gchain_core/messages/block_translators/langchain_v0.py46CODE
265 more matches not shown…
Hallucination Indicators19 hits · 195 pts
SeverityFileLineSnippetContext
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py345 run = self.client.beta.threads.runs.submit_tool_outputs(**tool_outputs)CODE
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py362 _ = self.client.beta.threads.messages.create(CODE
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py372 run = self.client.beta.threads.runs.submit_tool_outputs(**input)CODE
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py477 run = await self.async_client.beta.threads.runs.submit_tool_outputs(CODE
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py495 _ = await self.async_client.beta.threads.messages.create(CODE
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py505 run = await self.async_client.beta.threads.runs.submit_tool_outputs(CODE
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py562 return self.client.beta.threads.runs.create(CODE
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py603 messages = self.client.beta.threads.messages.list(CODE
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py673 run = self.client.beta.threads.runs.retrieve(run_id, thread_id=thread_id)CODE
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py719 return await self.async_client.beta.threads.runs.create(CODE
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py760 messages = await self.async_client.beta.threads.messages.list(CODE
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py826 run = await self.async_client.beta.threads.runs.retrieve(CODE
CRITICAL…plexity/tests/unit_tests/test_chat_models_responses.py251 llm.client.chat.completions.create.assert_called_once()CODE
CRITICAL…plexity/tests/unit_tests/test_chat_models_responses.py185 llm.client.chat.completions.create.assert_called_once()CODE
CRITICAL…plexity/tests/unit_tests/test_chat_models_responses.py205 llm.client.chat.completions.create.assert_not_called()CODE
CRITICAL…s/partners/openai/langchain_openai/chat_models/base.py1646 response_stream = self.root_client.beta.chat.completions.stream(CODE
CRITICAL…s/partners/openai/langchain_openai/chat_models/base.py1710 self.root_client.chat.completions.with_raw_response.parse(**payload)CODE
CRITICAL…s/partners/openai/langchain_openai/chat_models/base.py1906 response_stream = self.root_async_client.beta.chat.completions.stream(CODE
CRITICAL…s/partners/openai/langchain_openai/chat_models/base.py1974 raw_response = await self.root_async_client.chat.completions.with_raw_response.parse( # noqa: E501CODE
Redundant / Tautological Comments64 hits · 100 pts
SeverityFileLineSnippetContext
LOWlibs/text-splitters/tests/unit_tests/conftest.py58 # Iterate through the list of required packagesCOMMENT
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3512# Check if a file existsCOMMENT
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3523 '# Check if a file exists\n$filePath = "C:\\temp\\file.txt"',STRING
LOW…ers/tests/integration_tests/test_nlp_text_splitters.py21 # Check if en_core_web_sm model is availableCOMMENT
LOW…bs/text-splitters/langchain_text_splitters/markdown.py193 # Check if line matches either standard or custom header patternCOMMENT
LOWlibs/core/tests/unit_tests/conftest.py84 # Iterate through the list of required packagesCOMMENT
LOW…s/unit_tests/indexing/test_in_memory_record_manager.py153 # Check if the keys exist in the databaseCOMMENT
LOW…s/unit_tests/indexing/test_in_memory_record_manager.py168 # Check if the keys exist in the databaseCOMMENT
LOW…s/unit_tests/indexing/test_in_memory_record_manager.py262 # Check if the deleted keys are no longer in the databaseCOMMENT
LOW…s/unit_tests/indexing/test_in_memory_record_manager.py277 # Check if the deleted keys are no longer in the databaseCOMMENT
LOWlibs/core/langchain_core/language_models/chat_models.py550 # Check if streaming is implemented.COMMENT
LOWlibs/core/langchain_core/tools/base.py844 # Check if field has an explicit default defined in the schema.COMMENT
LOWlibs/core/langchain_core/messages/utils.py454 # Check if this is an AIMessage with tool callsSTRING
LOWlibs/core/langchain_core/messages/utils.py1978 # Check if all messages already fit within token limitSTRING
LOW…gchain_core/messages/block_translators/langchain_v0.py70 # Check if this is actually a v0 format blockCOMMENT
LOWlibs/core/langchain_core/callbacks/file.py77 # Open the file in the specified mode with UTF-8 encoding.COMMENT
LOWlibs/core/langchain_core/utils/pydantic.py161 # Check if allow_population_by_field_name is enabledCOMMENT
LOWlibs/core/langchain_core/utils/function_calling.py824 # Check if 'required' is a key at the current level or if the schema is empty,COMMENT
LOWlibs/core/langchain_core/runnables/graph_mermaid.py437 # Check if the background color is a hexadecimal color code using regexCOMMENT
LOWlibs/core/langchain_core/load/_validation.py88 # Check if dict needs escaping BEFORE recursing into values.COMMENT
LOWlibs/core/langchain_core/prompts/loading.py90 # Check if template_path exists in config.COMMENT
LOWlibs/langchain/tests/unit_tests/conftest.py72 # Iterate through the list of required packagesCOMMENT
LOW…ngchain/tests/unit_tests/agents/test_agent_iterator.py284 # Check if properties are updatedCOMMENT
LOW…ngchain/tests/unit_tests/agents/test_agent_iterator.py292 # Check if properties are resetCOMMENT
LOW…ngchain/tests/unit_tests/agents/test_agent_iterator.py337 assert outputs[-1]["output"] # Check if there is an outputCODE
LOW…ngchain/tests/unit_tests/agents/test_agent_iterator.py352 assert len(outputs) == 2 # Check if the custom stopping condition is respectedCODE
LOW…/langchain/tests/unit_tests/storage/test_filesystem.py93 # Check if the deleted key is presentCOMMENT
LOW…gchain_classic/callbacks/streaming_aiter_final_only.py92 # Check if the last n tokens match the answer_prefix_tokens list ...COMMENT
LOW…chain_classic/callbacks/streaming_stdout_final_only.py88 # Check if the last n tokens match the answer_prefix_tokens list ...COMMENT
LOW…n/langchain_classic/output_parsers/pandas_dataframe.py54 # Check if the format is [1,3,5]COMMENT
LOW…n/langchain_classic/output_parsers/pandas_dataframe.py57 # Check if the format is [1..5]COMMENT
LOW…n/langchain_classic/output_parsers/pandas_dataframe.py67 # Check if the format is ["column_name"]COMMENT
LOW…/langchain_classic/evaluation/comparison/eval_chain.py263 # Check if the model is GPT-4 if not raise a warningSTRING
LOWlibs/langchain_v1/langchain/agents/factory.py1302 # Check if any requested tools are unknown CLIENT-SIDE toolsCOMMENT
LOW…angchain_v1/langchain/agents/middleware/model_retry.py238 # Check if we should retry this exceptionCOMMENT
LOW…angchain_v1/langchain/agents/middleware/model_retry.py243 # Check if we have more retries leftCOMMENT
LOW…angchain_v1/langchain/agents/middleware/model_retry.py288 # Check if we should retry this exceptionCOMMENT
LOW…angchain_v1/langchain/agents/middleware/model_retry.py293 # Check if we have more retries leftCOMMENT
LOW…gchain_v1/langchain/agents/middleware/tool_emulator.py126 # Check if this tool should be emulatedCOMMENT
LOW…gchain_v1/langchain/agents/middleware/tool_emulator.py178 # Check if this tool should be emulatedCOMMENT
LOW…hain_v1/langchain/agents/middleware/tool_call_limit.py422 # Check if there are tool calls to other tools that would continue executingCOMMENT
LOW…langchain_v1/langchain/agents/middleware/tool_retry.py308 # Check if retry should apply to this toolCOMMENT
LOW…langchain_v1/langchain/agents/middleware/tool_retry.py325 # Check if we should retry this exceptionCOMMENT
LOW…langchain_v1/langchain/agents/middleware/tool_retry.py330 # Check if we have more retries leftCOMMENT
LOW…langchain_v1/langchain/agents/middleware/tool_retry.py370 # Check if retry should apply to this toolCOMMENT
LOW…langchain_v1/langchain/agents/middleware/tool_retry.py387 # Check if we should retry this exceptionCOMMENT
LOW…langchain_v1/langchain/agents/middleware/tool_retry.py392 # Check if we have more retries leftCOMMENT
LOW…ain_v1/langchain/agents/middleware/model_call_limit.py189 # Check if any limits will be exceeded after the next callCOMMENT
LOWlibs/langchain_v1/tests/unit_tests/conftest.py124 # Iterate through the list of required packagesCOMMENT
LOW…perplexity/tests/integration_tests/test_chat_models.py45 # Check if any chunk has reasoning_stepsCOMMENT
LOWlibs/partners/qdrant/langchain_qdrant/vectorstores.py1715 # Check if the vector configuration has the same dimensionality.COMMENT
LOWlibs/partners/qdrant/langchain_qdrant/vectorstores.py1882 # Check if the vector configuration has the same dimensionality.COMMENT
LOW…/partners/anthropic/langchain_anthropic/chat_models.py1652 # Assign citations to a list if presentCOMMENT
LOW…opic/langchain_anthropic/middleware/anthropic_tools.py443 # Read fileCOMMENT
LOW…opic/langchain_anthropic/middleware/anthropic_tools.py493 # Read fileCOMMENT
LOW…opic/langchain_anthropic/middleware/anthropic_tools.py568 # Read fileCOMMENT
LOW…opic/langchain_anthropic/middleware/anthropic_tools.py898 # Read fileCOMMENT
LOW…opic/langchain_anthropic/middleware/anthropic_tools.py935 # Write fileCOMMENT
LOW…opic/langchain_anthropic/middleware/anthropic_tools.py962 # Read fileCOMMENT
LOW…opic/langchain_anthropic/middleware/anthropic_tools.py999 # Read fileCOMMENT
4 more matches not shown…
Fake / Example Data55 hits · 63 pts
SeverityFileLineSnippetContext
LOW…plitters/tests/integration_tests/test_text_splitter.py88 text = "Lorem ipsum"CODE
LOW…plitters/tests/integration_tests/test_text_splitter.py104 text = "lorem ipsum"CODE
LOW…plitters/tests/integration_tests/test_text_splitter.py151 text = "lorem ipsum"CODE
LOW…/tests/unit_tests/example_selectors/test_similarity.py36 return ["dummy_id"]CODE
LOW…e/tests/unit_tests/output_parsers/test_openai_tools.py1109 "street": "123 Main St",CODE
LOW…e/tests/unit_tests/output_parsers/test_openai_tools.py1125 assert result_v1[0].address.street == "123 Main St" # type: ignore[attr-defined,unused-ignore]CODE
LOWlibs/core/tests/unit_tests/examples/example-utf8.txt1Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod temporCODE
LOWlibs/core/tests/unit_tests/examples/example-utf8.txt1Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod temporCODE
LOWlibs/core/tests/unit_tests/prompts/test_chat.py1093 prompt = ChatPromptTemplate([("placeholder", "{convo}")])CODE
LOWlibs/core/tests/unit_tests/prompts/test_chat.py1101 optional_prompt = ChatPromptTemplate([("placeholder", ["{convo}", False])])CODE
LOWlibs/core/tests/unit_tests/prompts/test_chat.py1110 prompt = ChatPromptTemplate([{"role": "placeholder", "content": "{convo}"}])CODE
LOWlibs/core/tests/unit_tests/prompts/test_chat.py1119 [{"role": "placeholder", "content": ["{convo}", False]}]CODE
LOWlibs/core/tests/unit_tests/prompts/test_chat.py1203 assert dumpd(MessagesPlaceholder("bar")) == snapshot(name="placeholder")CODE
LOWlibs/core/tests/unit_tests/prompts/test_chat.py1256 ("placeholder", "{chat_history}"),CODE
LOW…core/tests/unit_tests/indexing/test_hashed_document.py9 uid="123", page_content="Lorem ipsum dolor sit amet", metadata={"key": "value"}CODE
LOW…core/tests/unit_tests/indexing/test_hashed_document.py9 uid="123", page_content="Lorem ipsum dolor sit amet", metadata={"key": "value"}CODE
LOW…core/tests/unit_tests/indexing/test_hashed_document.py18 page_content="Lorem ipsum dolor sit amet", metadata={"key": "value"}CODE
LOW…core/tests/unit_tests/indexing/test_hashed_document.py18 page_content="Lorem ipsum dolor sit amet", metadata={"key": "value"}CODE
LOW…core/tests/unit_tests/indexing/test_hashed_document.py23 assert hashed_doc.page_content == "Lorem ipsum dolor sit amet"CODE
LOW…core/tests/unit_tests/indexing/test_hashed_document.py23 assert hashed_doc.page_content == "Lorem ipsum dolor sit amet"CODE
LOW…core/tests/unit_tests/indexing/test_hashed_document.py30 page_content="Lorem ipsum dolor sit amet", metadata={"key": "value"}CODE
LOW…core/tests/unit_tests/indexing/test_hashed_document.py30 page_content="Lorem ipsum dolor sit amet", metadata={"key": "value"}CODE
LOW…core/tests/unit_tests/indexing/test_hashed_document.py61 page_content="Lorem ipsum dolor sit amet", metadata={"key": "like a duck"}CODE
LOW…core/tests/unit_tests/indexing/test_hashed_document.py61 page_content="Lorem ipsum dolor sit amet", metadata={"key": "like a duck"}CODE
LOWlibs/core/langchain_core/prompts/chat.py842 ("placeholder", "{conversation}"),STRING
LOWlibs/core/langchain_core/prompts/chat.py1371 elif message_type == "placeholder":CODE
LOW…s/langchain/tests/unit_tests/examples/example-utf8.txt1Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod temporCODE
LOW…s/langchain/tests/unit_tests/examples/example-utf8.txt1Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod temporCODE
LOW…hain/tests/unit_tests/evaluation/qa/test_eval_chain.py27 example = {"query": "What's my name", "answer": "John Doe"}CODE
LOW…hain/tests/unit_tests/evaluation/qa/test_eval_chain.py28 prediction = {"result": "John Doe"}CODE
LOW…hain/tests/unit_tests/evaluation/qa/test_eval_chain.py48 prediction = {"result": "John Doe"}CODE
LOW…in/langchain_classic/agents/tool_calling_agent/base.py53 ("placeholder", "{chat_history}"),STRING
LOW…in/langchain_classic/agents/tool_calling_agent/base.py55 ("placeholder", "{agent_scratchpad}"),STRING
LOW…s/langchain/langchain_classic/chains/natbot/crawler.py341 attributes[index], ["type", "placeholder", "aria-label", "title", "alt"]CODE
LOW…s/agents/middleware/implementations/test_shell_tool.py133 assert "user@example.com" not in messageCODE
LOW…it_tests/agents/middleware/implementations/test_pii.py283 assert "user@example.com" not in contentCODE
LOW…artners/fireworks/tests/unit_tests/test_chat_models.py83 llm = ChatFireworks(model="foo", api_key="fake-key") # type: ignore[arg-type]CODE
LOW…artners/fireworks/tests/unit_tests/test_chat_models.py86 llm = ChatFireworks(model_name="foo", api_key="fake-key") # type: ignore[call-arg, arg-type]CODE
LOW…artners/fireworks/tests/unit_tests/test_chat_models.py124 os.environ.setdefault("FIREWORKS_API_KEY", "fake-key")CODE
LOW…artners/fireworks/tests/unit_tests/test_chat_models.py48 defaults: dict[str, Any] = {"model": MODEL_NAME, "api_key": "fake-key"}CODE
LOW…artners/fireworks/tests/unit_tests/test_chat_models.py625 api_key="fake-key", # type: ignore[arg-type]CODE
LOW…artners/fireworks/tests/unit_tests/test_chat_models.py1809 ChatFireworks(model=MODEL_NAME, api_key="fake-key") # type: ignore[arg-type]CODE
LOW…artners/fireworks/tests/unit_tests/test_chat_models.py1830 api_key="fake-key", # type: ignore[arg-type]CODE
LOWlibs/partners/groq/tests/unit_tests/test_chat_models.py36 os.environ["GROQ_API_KEY"] = "fake-key"CODE
LOW…ers/perplexity/tests/unit_tests/test_output_parsers.py199 text = '{"name": "John Doe", "age": 30, "email": "john@example.com"}'CODE
LOW…ers/perplexity/tests/unit_tests/test_output_parsers.py203 assert result.name == "John Doe"CODE
LOW…ers/perplexity/tests/unit_tests/test_output_parsers.py213 object</think>{"name": "John Doe", "age": 30}'CODE
LOW…ers/perplexity/tests/unit_tests/test_output_parsers.py217 assert result.name == "John Doe"CODE
LOW…tegration_tests/qdrant_vector_store/test_from_texts.py26 ["Lorem ipsum dolor sit amet", "Ipsum dolor sit amet"],CODE
LOW…tegration_tests/qdrant_vector_store/test_from_texts.py26 ["Lorem ipsum dolor sit amet", "Ipsum dolor sit amet"],CODE
LOW…openai/tests/integration_tests/chat_models/conftest.py105 fake_token = chatgpt_oauth._ChatGPTToken(CODE
LOW…openai/tests/integration_tests/chat_models/conftest.py115 return fake_tokenCODE
LOW…openai/tests/integration_tests/chat_models/conftest.py120 return fake_tokenCODE
LOW…openai/tests/integration_tests/chat_models/conftest.py125 return fake_token.access_tokenCODE
LOW…openai/tests/integration_tests/chat_models/conftest.py130 return fake_token.access_tokenCODE
Magic Placeholder Names18 hits · 62 pts
SeverityFileLineSnippetContext
HIGH…s/partners/mistralai/langchain_mistralai/embeddings.py68 export MISTRAL_API_KEY="your-api-key"STRING
HIGH…artners/openrouter/langchain_openrouter/chat_models.py120 export OPENROUTER_API_KEY="your-api-key"STRING
HIGHlibs/partners/exa/langchain_exa/tools.py29 export EXA_API_KEY="your-api-key"CODE
HIGH…s/partners/fireworks/langchain_fireworks/embeddings.py18 export FIREWORKS_API_KEY="your-api-key"STRING
HIGHlibs/partners/groq/langchain_groq/chat_models.py141 export GROQ_API_KEY="your-api-key"CODE
HIGH…bs/partners/deepseek/langchain_deepseek/chat_models.py56 export DEEPSEEK_API_KEY="your-api-key"STRING
HIGHlibs/partners/xai/langchain_xai/chat_models.py72 export XAI_API_KEY="your-api-key"CODE
HIGH…artners/perplexity/langchain_perplexity/chat_models.py605 export PPLX_API_KEY=your_api_keySTRING
HIGH…partners/perplexity/langchain_perplexity/embeddings.py32 export PPLX_API_KEY=your_api_keySTRING
HIGH…/partners/anthropic/langchain_anthropic/chat_models.py890 # export ANTHROPIC_API_KEY="your-api-key"STRING
HIGH…ners/openai/tests/unit_tests/chat_models/test_azure.py207 api_key=SecretStr("your_api_key"),CODE
HIGH…ners/openai/tests/unit_tests/chat_models/test_azure.py227 api_key=SecretStr("your_api_key"),CODE
HIGH…s/partners/openai/langchain_openai/embeddings/azure.py35 export AZURE_OPENAI_API_KEY="your-api-key"STRING
HIGH…bs/partners/openai/langchain_openai/embeddings/base.py94 export OPENAI_API_KEY="your-api-key"STRING
HIGH…/partners/openai/langchain_openai/chat_models/azure.py50 export AZURE_OPENAI_API_KEY="your-api-key"CODE
HIGH…s/partners/openai/langchain_openai/chat_models/base.py2637 export OPENAI_API_KEY="your-api-key"CODE
HIGHlibs/partners/openai/langchain_openai/llms/base.py65 export OPENAI_API_KEY="your-api-key"STRING
HIGHlibs/partners/openai/langchain_openai/llms/base.py795 export OPENAI_API_KEY="your-api-key"STRING
Over-Commented Block83 hits · 58 pts
SeverityFileLineSnippetContext
LOW…/core/langchain_core/language_models/_compat_bridge.py621 continueCOMMENT
LOW…re/langchain_core/language_models/chat_model_stream.py881 # Backfill the wire index onto the finalized block when theCOMMENT
LOWlibs/core/langchain_core/tools/convert.py361 # @toolCOMMENT
LOWlibs/core/langchain_core/callbacks/manager.py361 # running coroutine, which we cannot interrupt to run this one.COMMENT
LOWlibs/core/langchain_core/utils/_merge.py41 f'additional_kwargs["{right_k}"] already exists in this message,'COMMENT
LOWlibs/core/langchain_core/prompts/chat.py821 # messages=[COMMENT
LOW…gchain/tests/unit_tests/agents/test_structured_chat.py181 """, # noqa: E501COMMENT
LOW…chain_v1/langchain/agents/middleware/model_fallback.py241# `_llm_type` values that indicate a model speaks an Anthropic-compatible APICOMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py1# import dataclassesCOMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py21# from langchain_core.tools import BaseTool, InjectedToolCallId, ToolExceptionCOMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py41# )COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py61# )COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py81# assert saved.pending_writes == []COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py101# }COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py121# agent = create_agent(FakeToolCallingModel(), [], system_prompt=prompt)COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py141# async def prompt(state):COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py161# assert response == expected_responseCOMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py181# model = FakeToolCallingModel()COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py201# assert response["messages"][-1].content == "foo-hi"COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py221# model = FakeToolCallingModel()COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py241# model = FakeToolCallingModel(tool_style=tool_style)COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py261# "allowed_tools": [COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py281COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py301COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py321# expected = (ValueError,)COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py341# _infer_handled_types(handler)COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py361# """Get the weather"""COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py381# "ai", # "What's the weather?"COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py401# sync_checkpointer: BaseCheckpointSaver,COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py421# system_msg = f"User name is {user_name}"COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py441# tool_message: ToolMessage = response["messages"][-2]COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py461COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py481# )COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py501# assert message_types == [COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py521# def tool1(COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py541# store=store,COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py561# """A normal tool."""COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py581COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py601# model = FakeToolCallingModel(tool_calls=[second_tool_call, []])COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py621# ),COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py641# content="Normal result: Test both normal",COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py661# assert _get_state_args(foo) == {"a": None, "b": "bar"}COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py681# def add(state):COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py701COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py721# model,COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py741# content="6",COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py761# [{"args": {"city": "Tokyo"}, "id": "1", "name": "get_weather"}],COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py781# stream_mode="messages",COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py801# assert "assistant" in str(result["messages"][1])COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py821# for event in compiled_workflow.stream(COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py841# def get_weather(city: str) -> str:COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py861# """Node that runs the React agent and collects streaming output."""COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py881COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py901# {"messages": [("user", "What is the weather in Tokyo?")]},COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py921# assert msg.content.startswith("You are a helpful travel assistant")COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py941# ToolCall(name="tool_interrupt", args={"some_val": 0}, id="1"),COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py961# "name": "tool_interrupt",COMMENT
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py981# assert task.name == "tools"COMMENT
LOW…tners/groq/tests/integration_tests/test_chat_models.py801 "server_tool_call",COMMENT
LOW…/partners/anthropic/langchain_anthropic/chat_models.py121COMMENT
23 more matches not shown…
AI Structural Patterns68 hits · 56 pts
SeverityFileLineSnippetContext
LOWlibs/text-splitters/langchain_text_splitters/html.py619CODE
LOWlibs/core/langchain_core/tools/convert.py18CODE
LOWlibs/core/langchain_core/tools/convert.py32CODE
LOWlibs/core/langchain_core/tools/convert.py48CODE
LOWlibs/core/langchain_core/tools/convert.py63CODE
LOWlibs/core/langchain_core/tools/convert.py77CODE
LOWlibs/core/langchain_core/tools/structured.py133CODE
LOWlibs/core/langchain_core/tools/base.py977CODE
LOWlibs/core/langchain_core/tools/base.py1105CODE
LOWlibs/core/langchain_core/messages/content.py1255CODE
LOWlibs/core/langchain_core/callbacks/manager.py2390CODE
LOWlibs/core/langchain_core/callbacks/manager.py1683CODE
LOWlibs/core/langchain_core/callbacks/manager.py2212CODE
LOWlibs/core/langchain_core/_api/deprecation.py120CODE
LOWlibs/core/langchain_core/_api/deprecation.py480CODE
LOWlibs/core/langchain_core/_api/deprecation.py190CODE
LOWlibs/core/langchain_core/utils/mustache.py468CODE
LOWlibs/core/langchain_core/runnables/graph_mermaid.py277CODE
LOWlibs/core/langchain_core/runnables/graph.py632CODE
LOWlibs/core/langchain_core/runnables/base.py1225CODE
LOWlibs/core/langchain_core/runnables/base.py1242CODE
LOWlibs/core/langchain_core/runnables/base.py1258CODE
LOWlibs/core/langchain_core/runnables/base.py1331CODE
LOWlibs/core/langchain_core/runnables/base.py1356CODE
LOWlibs/core/langchain_core/runnables/base.py1603CODE
LOWlibs/core/langchain_core/runnables/base.py1662CODE
LOWlibs/core/langchain_core/runnables/base.py1687CODE
LOWlibs/core/langchain_core/document_loaders/langsmith.py40CODE
LOWlibs/core/langchain_core/tracers/log_stream.py235CODE
LOWlibs/langchain/langchain_classic/chat_models/base.py961CODE
LOWlibs/langchain/langchain_classic/chat_models/base.py978CODE
LOWlibs/langchain/langchain_classic/chat_models/base.py995CODE
LOWlibs/langchain/langchain_classic/chat_models/base.py1026CODE
LOW…chain/langchain_classic/agents/structured_chat/base.py122CODE
LOW…gchain/langchain_classic/agents/conversational/base.py121CODE
LOW…n/langchain_classic/chains/question_answering/chain.py102CODE
LOW…n/langchain_classic/chains/question_answering/chain.py186CODE
LOW…/langchain/langchain_classic/chains/summarize/chain.py68CODE
LOW…in/langchain_classic/chains/qa_with_sources/loading.py83CODE
LOWlibs/langchain_v1/langchain/chat_models/base.py927CODE
LOWlibs/langchain_v1/langchain/chat_models/base.py945CODE
LOWlibs/langchain_v1/langchain/chat_models/base.py962CODE
LOWlibs/langchain_v1/langchain/chat_models/base.py993CODE
LOWlibs/langchain_v1/langchain/agents/factory.py740CODE
LOWlibs/langchain_v1/langchain/agents/factory.py762CODE
LOWlibs/langchain_v1/langchain/agents/factory.py786CODE
LOWlibs/langchain_v1/langchain/agents/factory.py808CODE
LOWlibs/langchain_v1/langchain/agents/middleware/types.py105CODE
LOW…langchain_v1/langchain/agents/middleware/tool_retry.py129CODE
LOW…langchain_v1/langchain/agents/middleware/shell_tool.py537CODE
LOWlibs/partners/chroma/langchain_chroma/vectorstores.py302CODE
LOWlibs/partners/chroma/langchain_chroma/vectorstores.py1273CODE
LOWlibs/partners/chroma/langchain_chroma/vectorstores.py1375CODE
LOWlibs/partners/exa/langchain_exa/tools.py101CODE
LOWlibs/partners/exa/langchain_exa/tools.py183CODE
LOW…partners/deepseek/tests/unit_tests/test_chat_models.py26CODE
LOWlibs/partners/qdrant/langchain_qdrant/vectorstores.py1193CODE
LOWlibs/partners/qdrant/langchain_qdrant/vectorstores.py1373CODE
LOWlibs/partners/qdrant/langchain_qdrant/vectorstores.py1430CODE
LOWlibs/partners/qdrant/langchain_qdrant/vectorstores.py1614CODE
8 more matches not shown…
Modern AI Meta-Vocabulary13 hits · 32 pts
SeverityFileLineSnippetContext
MEDIUMlibs/core/langchain_core/embeddings/fake.py3# Please do not add additional fake embedding model implementations here.COMMENT
MEDIUM…sts/unit_tests/examples/test_specs/zapier/apispec.json6 "description": "<img src=\"https://cdn.zappy.app/945f9bf9e44126873952ec5113949c3f.png\" width=\"100\" />\n\n## HelCODE
MEDIUM…hain_classic/memory/vectorstore_token_buffer_memory.py173 # that will overflow the context windowCOMMENT
MEDIUM…ngchain/langchain_classic/agents/mrkl/output_parser.py48 # if final answer is before the hallucination, return final answerCOMMENT
MEDIUM…angchain_classic/chains/elasticsearch_database/base.py166 # improvement of few shot prompt seedsCOMMENT
MEDIUM…ain/langchain_classic/chains/constitutional_ai/base.py27 "https://docs.langchain.com/oss/python/langchain/guardrails"CODE
MEDIUMlibs/langchain_v1/README.md23We recommend you use LangChain if you want to quickly build agents and autonomous applications. Use [LangGraph](https://CODE
MEDIUMlibs/langchain_v1/langchain/agents/middleware/pii.py329 # Reasoning content (chain-of-thought from extended-thinkingCOMMENT
MEDIUM…/anthropic/tests/integration_tests/test_chat_models.py1338 image_url = "https://raw.githubusercontent.com/langchain-ai/docs/4d11d08b6b0e210bd456943f7a22febbd168b543/src/imagesCODE
MEDIUM…penai/tests/integration_tests/chat_models/test_base.py748 image_url = "https://raw.githubusercontent.com/langchain-ai/docs/4d11d08b6b0e210bd456943f7a22febbd168b543/src/imagesCODE
MEDIUM…tests/langchain_tests/integration_tests/chat_models.py2913 image_url = "https://raw.githubusercontent.com/langchain-ai/docs/4d11d08b6b0e210bd456943f7a22febbd168b543/src/imCODE
MEDIUM…tests/langchain_tests/integration_tests/chat_models.py3021 image_url = "https://raw.githubusercontent.com/langchain-ai/docs/4d11d08b6b0e210bd456943f7a22febbd168b543/src/imCODE
MEDIUM…tests/langchain_tests/integration_tests/chat_models.py3260 image_url = "https://raw.githubusercontent.com/langchain-ai/docs/4d11d08b6b0e210bd456943f7a22febbd168b543/srCODE
Overly Generic Function Names14 hits · 15 pts
SeverityFileLineSnippetContext
LOW…s/core/tests/unit_tests/utils/test_function_calling.py421 def my_function(arg1: NestedV2) -> None:CODE
LOW…s/core/tests/unit_tests/utils/test_function_calling.py434 def my_function(arg1: Nested) -> None:CODE
LOW…s/core/tests/unit_tests/utils/test_function_calling.py392 def my_function(_: str) -> str:CODE
LOW…s/core/tests/unit_tests/utils/test_function_calling.py471 def my_function(arg1: Nested) -> None:CODE
LOW…s/core/tests/unit_tests/utils/test_function_calling.py514 def my_function(my_arg: NestedA | NestedB | NestedC) -> None:CODE
LOW…s/core/tests/unit_tests/utils/test_function_calling.py1132 def my_function(arg1: dict[str, Any], arg2: dict[str, Any] | None) -> None:CODE
LOWlibs/core/tests/unit_tests/runnables/test_runnable.py3542 def my_function(_: Any, **kwargs: Any) -> int:CODE
LOWlibs/core/tests/unit_tests/runnables/test_runnable.py3552 def my_function(_: Any, **kwargs: Any) -> int:CODE
LOW…re/tests/unit_tests/runnables/test_tracing_interops.py73 def my_function(a: int) -> int:CODE
LOW…re/tests/unit_tests/runnables/test_tracing_interops.py145 def my_function(a: int) -> int:CODE
LOW…re/tests/unit_tests/runnables/test_tracing_interops.py222 async def my_function(a: int) -> int:CODE
LOWlibs/core/langchain_core/_security/_transport.py144 def handle_request(CODE
LOW…hropic/tests/unit_tests/middleware/test_file_search.py40 "content": ["def helper(): pass"],CODE
LOW…partners/openai/tests/unit_tests/test_chatgpt_oauth.py927 def handle_request(self) -> None:CODE
AI Response Leakage2 hits · 15 pts
SeverityFileLineSnippetContext
HIGHlibs/core/langchain_core/utils/aiter.py76 # all methods of the iterator protocol. In this implementationCOMMENT
HIGH…sts/unit_tests/examples/test_specs/zapier/apispec.json6 "description": "<img src=\"https://cdn.zappy.app/945f9bf9e44126873952ec5113949c3f.png\" width=\"100\" />\n\n## HelCODE
Slop Phrases9 hits · 15 pts
SeverityFileLineSnippetContext
MEDIUMlibs/core/langchain_core/runnables/fallbacks.py65 # And you can also use fallbacks at the level of a chain.STRING
MEDIUMlibs/core/langchain_core/runnables/base.py3099 Here is a simple example that uses simple functions to illustrate the use ofSTRING
MEDIUMlibs/core/langchain_core/runnables/base.py3864 Here is a simple example that uses functions to illustrate the use ofSTRING
MEDIUM…sts/unit_tests/examples/test_specs/zapier/apispec.json6 "description": "<img src=\"https://cdn.zappy.app/945f9bf9e44126873952ec5113949c3f.png\" width=\"100\" />\n\n## HelCODE
MEDIUMlibs/langchain/langchain_classic/memory/prompt.py5You are designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth CODE
MEDIUM…langchain_classic/agents/conversational_chat/prompt.py3Assistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-dCODE
MEDIUM…s/langchain/langchain_classic/agents/json_chat/base.py96 topics. As a language model, Assistant is able to generate human-like text based onCODE
MEDIUM…hain/langchain_classic/agents/conversational/prompt.py3Assistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-dCODE
LOWlibs/partners/ollama/langchain_ollama/chat_models.py427 content="It's been a blast chatting with you! Say goodbye to the world for me, and don't forget to come CODE
AI Slop Vocabulary9 hits · 14 pts
SeverityFileLineSnippetContext
MEDIUM…sts/unit_tests/output_parsers/test_openai_functions.py17 """Test the JSON output function parser is configured with robust defaults."""STRING
LOWlibs/core/langchain_core/tools/base.py929 # If we can't get annotations, just use FILTERED_ARGSCOMMENT
LOWlibs/core/langchain_core/utils/mustache.py376 # Then just return the current scopeCOMMENT
LOWlibs/core/langchain_core/tracers/event_stream.py231 # otherwise just pass throughCOMMENT
LOWlibs/core/langchain_core/tracers/event_stream.py281 # otherwise just pass throughCOMMENT
MEDIUM…sts/unit_tests/examples/test_specs/zapier/apispec.json6 "description": "<img src=\"https://cdn.zappy.app/945f9bf9e44126873952ec5113949c3f.png\" width=\"100\" />\n\n## HelCODE
LOW…hain/langchain_classic/callbacks/streamlit/__init__.py59 # This is the official handler, so we can just return it.COMMENT
LOWlibs/langchain/langchain_classic/agents/agent.py967 # we just return the full outputCOMMENT
LOW…in/langchain_classic/chains/history_aware_retriever.py62 # If no chat history, then we just pass input to retrieverCOMMENT
Dead Code5 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUMlibs/core/tests/unit_tests/runnables/test_runnable.py3830CODE
MEDIUMlibs/core/langchain_core/runnables/base.py5719CODE
MEDIUM…artners/fireworks/tests/unit_tests/test_chat_models.py1731CODE
MEDIUM…artners/fireworks/tests/unit_tests/test_chat_models.py726CODE
MEDIUM…artners/fireworks/tests/unit_tests/test_chat_models.py878CODE
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGH…gchain/tests/unit_tests/chains/test_qa_with_sources.py54 # The following text was generated by gpt-3.5-turboCOMMENT
Verbosity Indicators3 hits · 4 pts
SeverityFileLineSnippetContext
LOWlibs/core/langchain_core/utils/pydantic.py107 # Before we can use issubclass on the cls we need to check if it is a classCOMMENT
LOW.github/workflows/check_release_deps.yml88 # Step 1: detect packages whose own version is bumped by this PR. TheirCOMMENT
LOW.github/workflows/check_release_deps.yml151 # Step 2: rebuild a resolver-equivalent manifest that drops only theCOMMENT
Structural Annotation Overuse3 hits · 4 pts
SeverityFileLineSnippetContext
LOWlibs/core/langchain_core/tracers/core.py206 # WARNING: This is valid ONLY for streaming_events.COMMENT
LOW.github/workflows/check_release_deps.yml88 # Step 1: detect packages whose own version is bumped by this PR. TheirCOMMENT
LOW.github/workflows/check_release_deps.yml151 # Step 2: rebuild a resolver-equivalent manifest that drops only theCOMMENT
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOW…gchain_classic/chains/conversational_retrieval/base.py327 # Usage:COMMENT
LOWlibs/partners/openai/scripts/record_codex_cassettes.sh6# Usage:COMMENT
TODO Padding2 hits · 2 pts
SeverityFileLineSnippetContext
LOWlibs/core/langchain_core/language_models/chat_models.py399 # TODO: consider adding a `_model_identifier` property on BaseChatModelSTRING
LOW…ngchain/langchain_classic/callbacks/streaming_aiter.py57 # TODO: implement the other methodsCOMMENT