Repository Analysis

langchain-ai/langchainjs

The agent engineering platform

2.5 Likely human-written View on GitHub
2.5
Adjusted Score
2.5
Raw Score
100%
Time Factor
2026-05-29
Last Push
17,734
Stars
TypeScript
Language
472,821
Lines of Code
2449
Files
550
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 6HIGH 84MEDIUM 81LOW 379

Pattern Findings

550 matches across 14 categories. Click a row to expand file-level details.

Magic Placeholder Names71 hits · 398 pts
SeverityFileLineSnippet
HIGHlibs/create-langchain-integration/template/README.md46export <ADD_ENV_NAME_HERE>=your-api-key
HIGHlibs/providers/langchain-cohere/README.md46export COHERE_API_KEY=your-api-key
HIGHlibs/providers/langchain-cohere/src/chat_models.ts282 * export COHERE_API_KEY="your-api-key"
HIGHlibs/providers/langchain-deepseek/src/chat_models.ts71 * export DEEPSEEK_API_KEY="your-api-key"
HIGHlibs/providers/langchain-groq/src/chat_models.ts622 * export GROQ_API_KEY="your-api-key"
HIGHlibs/providers/langchain-anthropic/README.md46export ANTHROPIC_API_KEY=your-api-key
HIGHlibs/providers/langchain-anthropic/src/chat_models.ts452 * export ANTHROPIC_API_KEY="your-api-key"
HIGHlibs/providers/langchain-anthropic/src/utils/prompts.ts28 * apiKey: 'your_api_key',
HIGHlibs/providers/langchain-openrouter/README.md46export OPENROUTER_API_KEY=your-api-key
HIGHlibs/providers/langchain-ibm/README.md25 watsonxAIApikey: "your-api-key",
HIGHlibs/providers/langchain-ibm/README.md86 watsonxAIApikey: "your-api-key",
HIGHlibs/providers/langchain-ibm/README.md98 watsonxAIApikey: "your-api-key",
HIGHlibs/providers/langchain-ibm/README.md115 watsonxAIApikey: "your-api-key",
HIGHlibs/providers/langchain-ibm/README.md137 watsonxAIApikey: "your-api-key",
HIGHlibs/providers/langchain-ibm/README.md158 watsonxAIApikey: "your-api-key",
HIGHlibs/providers/langchain-ibm/README.md184 watsonxAIApikey: "your-api-key",
HIGHlibs/providers/langchain-ibm/README.md201 watsonxAIApikey: "your-api-key",
HIGHlibs/providers/langchain-google/src/clients/node.ts99 * apiKey: 'your-api-key'
HIGHlibs/providers/langchain-google/src/clients/node.ts215 * apiKey: 'your-api-key'
HIGHlibs/providers/langchain-google/src/clients/index.ts132 * apiKey: 'your-api-key'
HIGHlibs/providers/langchain-google/src/clients/index.ts217 * apiKey: 'your-api-key'
HIGH…providers/langchain-xai/src/chat_models/completions.ts236 * export XAI_API_KEY="your-api-key"
HIGHlibs/providers/langchain-mistralai/README.md46export MISTRAL_API_KEY=your-api-key
HIGHlibs/providers/langchain-mistralai/src/chat_models.ts593 * export MISTRAL_API_KEY="your-api-key"
HIGHlibs/providers/langchain-perplexity/README.md16export PERPLEXITY_API_KEY="your-api-key"
HIGHlibs/providers/langchain-fireworks/README.md21export FIREWORKS_API_KEY="your-api-key"
HIGHlibs/providers/langchain-fireworks/src/llms.ts48 * export FIREWORKS_API_KEY="your-api-key"
HIGHlibs/providers/langchain-fireworks/src/embeddings.ts57 * export FIREWORKS_API_KEY="your-api-key"
HIGHlibs/providers/langchain-fireworks/src/chat_models.ts55 * export FIREWORKS_API_KEY="your-api-key"
HIGHlibs/providers/langchain-openai/README.md46export OPENAI_API_KEY=your-api-key
HIGH…viders/langchain-openai/src/azure/chat_models/index.ts26 * export AZURE_OPENAI_API_KEY="your-api-key"
HIGH…bs/providers/langchain-openai/src/chat_models/index.ts62 * export OPENAI_API_KEY="your-api-key"
HIGHlibs/providers/langchain-google-genai/README.md46export GOOGLE_API_KEY=your-api-key
HIGH…bs/providers/langchain-google-genai/src/chat_models.ts227 * export GOOGLE_API_KEY="your-api-key"
HIGHlibs/providers/langchain-together-ai/README.md18export TOGETHER_AI_API_KEY="your-api-key"
HIGHlibs/providers/langchain-together-ai/src/chat_models.ts62 * export TOGETHER_AI_API_KEY="your-api-key"
HIGHlibs/providers/langchain-tavily/README.md27process.env.TAVILY_API_KEY = "YOUR_API_KEY";
HIGHlibs/providers/langchain-tavily/src/tavily-search.ts306 * tavilyApiKey: "YOUR_API_KEY"
HIGH…/providers/langchain-tavily/src/tavily-get-research.ts71 * tavilyApiKey: "YOUR_API_KEY"
HIGHlibs/providers/langchain-tavily/src/tavily-research.ts190 * tavilyApiKey: "YOUR_API_KEY"
HIGHlibs/langchain-mcp-adapters/README.md163export OPENAI_API_KEY=<your_api_key>
HIGHexamples/openai_openapi.yaml33 -H 'Authorization: Bearer YOUR_API_KEY'
HIGHexamples/openai_openapi.yaml102 -H 'Authorization: Bearer YOUR_API_KEY'
HIGHexamples/openai_openapi.yaml150 -H 'Authorization: Bearer YOUR_API_KEY' \
HIGHexamples/openai_openapi.yaml239 -H 'Authorization: Bearer YOUR_API_KEY' \
HIGHexamples/openai_openapi.yaml315 -H 'Authorization: Bearer YOUR_API_KEY' \
HIGHexamples/openai_openapi.yaml386 -H 'Authorization: Bearer YOUR_API_KEY' \
HIGHexamples/openai_openapi.yaml455 -H 'Authorization: Bearer YOUR_API_KEY' \
HIGHexamples/openai_openapi.yaml519 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHexamples/openai_openapi.yaml610 -H 'Authorization: Bearer YOUR_API_KEY' \
HIGHexamples/openai_openapi.yaml684 -H 'Authorization: Bearer YOUR_API_KEY'
HIGHexamples/openai_openapi.yaml746 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHexamples/openai_openapi.yaml807 -H 'Authorization: Bearer YOUR_API_KEY'
HIGHexamples/openai_openapi.yaml852 -H 'Authorization: Bearer YOUR_API_KEY'
HIGHexamples/openai_openapi.yaml902 -H 'Authorization: Bearer YOUR_API_KEY' > file.jsonl
HIGHexamples/openai_openapi.yaml947 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHexamples/openai_openapi.yaml1059 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHexamples/openai_openapi.yaml1175 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHexamples/openai_openapi.yaml1251 -H 'Authorization: Bearer YOUR_API_KEY'
HIGHexamples/openai_openapi.yaml1320 -H "Authorization: Bearer YOUR_API_KEY"
11 more matches not shown…
Hyper-Verbose Identifiers228 hits · 228 pts
SeverityFileLineSnippet
LOW…ts/scripts/langchain/node/update_resolutions_latest.js33function rewritePackageWorkspaceDependencies(packageJsonPath) {
LOW…ts/scripts/langchain/node/update_resolutions_lowest.js33function rewritePackageWorkspaceDependencies(packageJsonPath) {
LOW…ain-core/src/structured_query/tests/functional.test.ts211 function generateComparatorTestsForType(
LOWlibs/langchain-core/src/language_models/compat.ts54function extractImageBlocksFromToolOutputs(message: unknown): ContentBlock[] {
LOW…angchain-core/src/language_models/tests/stream.test.ts161function providerThinkingStreamEvents(): ChatModelStreamEvent[] {
LOWlibs/langchain-core/src/messages/base.ts95function contentBlocksFromNonStringFirst(
LOWlibs/langchain-core/src/messages/base.ts572function hasMismatchedMergeableType(left: unknown, right: unknown): boolean {
LOWlibs/langchain-core/src/messages/utils.ts300export function coerceMessageLikeToMessage(
LOWlibs/langchain-core/src/messages/utils.ts450export function mapStoredMessageToChatMessage(message: StoredMessage) {
LOWlibs/langchain-core/src/messages/utils.ts488export function mapStoredMessagesToChatMessages(
LOWlibs/langchain-core/src/messages/utils.ts500export function mapChatMessagesToStoredMessages(
LOWlibs/langchain-core/src/messages/metadata.ts48function mergeModalitiesTokenDetails(
LOWlibs/langchain-core/src/messages/content/data.ts232export function convertToOpenAIImageBlock(
LOW…ore/src/messages/block_translators/bedrock_converse.ts16function convertFileFormatToMimeType(format: string): string {
LOW…ore/src/messages/block_translators/bedrock_converse.ts72function convertConverseDocumentBlock(
LOW…ore/src/messages/block_translators/bedrock_converse.ts128function convertConverseImageBlock(block: ContentBlock): ContentBlock.Standard {
LOW…ore/src/messages/block_translators/bedrock_converse.ts159function convertConverseVideoBlock(block: ContentBlock): ContentBlock.Standard {
LOW…chain-core/src/messages/block_translators/anthropic.ts15function convertAnthropicAnnotation(
LOW…angchain-core/src/messages/block_translators/openai.ts177function convertResponsesAnnotation(
LOWlibs/langchain-core/src/callbacks/base.ts325export function callbackHandlerPrefersStreaming(x: BaseCallbackHandler) {
LOWlibs/langchain-core/src/callbacks/base.ts337export function callbackHandlerPrefersChatModelStreamEvents(
LOWlibs/langchain-core/src/utils/event_source_parse.ts251export function convertEventStreamToIterableReadableDataStream(
LOWlibs/langchain-core/src/utils/types/zod.ts955function interopZodTransformInputSchemaImpl(
LOWlibs/langchain-core/src/utils/types/zod.ts1072export function interopZodTransformInputSchema(
LOW…langchain-core/src/utils/tests/standard_schema.test.ts25function makeStandardJsonSchemaOnly() {
LOW…langchain-core/src/utils/tests/standard_schema.test.ts47function makeCallableStandardSchema() {
LOW…langchain-core/src/utils/tests/standard_schema.test.ts73function makeCallableSerializableSchema() {
LOW…in-core/src/utils/zod-to-json-schema/parsers/object.ts76function decideAdditionalProperties(def: ZodObjectDef, refs: Refs) {
LOW…angchain-core/src/utils/fast-json-patch/src/helpers.ts152function patchErrorMessageFormatter(message: String, args: Object): string {
LOWlibs/langchain-core/src/runnables/config.ts33export async function getCallbackManagerForConfig(config?: RunnableConfig) {
LOW…tput_parsers/openai_tools/json_output_tools_parsers.ts92export function convertLangChainToolCallToOpenAI(toolCall: ToolCall) {
LOWlibs/langchain-core/src/caches/index.ts9export function deserializeStoredGeneration(
LOWlibs/langchain/src/agents/utils.ts302export function validateLLMHasNoBoundTools(llm: LanguageModelLike): void {
LOWlibs/langchain/src/agents/stream.ts142function isHeadlessToolInterruptError(
LOWlibs/langchain/src/agents/stream.ts209export function createToolCallTransformer(
LOWlibs/langchain/src/agents/responses.ts693export function hasSupportForJsonSchemaOutput(
LOWlibs/langchain/src/agents/middleware/toolCallLimit.ts42function buildFinalAIMessageContent(
LOWlibs/langchain/src/agents/middleware/llmToolSelector.ts37function createToolSelectionResponse(tools: StructuredToolInterface[]) {
LOWlibs/langchain/src/agents/middleware/llmToolSelector.ts124export function llmToolSelectorMiddleware(options: LLMToolSelectorConfig) {
LOW…hain/src/agents/middleware/tests/summarization.test.ts16function createMockSummarizationModel() {
LOW…angchain/src/agents/middleware/tests/toolRetry.test.ts50function createTemporaryFailureTool(failCount: number) {
LOW…ain/src/agents/middleware/tests/contextEditing.test.ts24 function createToolCallConversation() {
LOW…/agents/middleware/provider/anthropic/promptCaching.ts166export function anthropicPromptCachingMiddleware(
LOW…in/src/agents/middleware/provider/openai/moderation.ts255export function openAIModerationMiddleware(
LOWlibs/langchain/src/agents/nodes/utils.ts26export async function initializeMiddlewareStates(
LOWlibs/langchain/src/agents/tests/agent.bench.test.ts32function createLargeMessageHistory(count: number) {
LOWlibs/langchain/src/storage/encoder_backed.ts87export function createDocumentStoreFromByteStore(
LOWlibs/langchain/src/hub/base.ts139export function generateOptionalImportMap(
LOWlibs/langchain/src/hub/node.ts45export function inferModelProviderFromNamespace(
LOW…s/langchain-cloudflare/src/utils/event_source_parse.ts255export function convertEventStreamToIterableReadableDataStream(
LOW…s/providers/langchain-aws/src/utils/message_outputs.ts13export function convertConverseMessageToLangChainMessage(
LOW…s/providers/langchain-aws/src/utils/message_outputs.ts135export function handleConverseStreamContentBlockDelta(
LOW…s/providers/langchain-aws/src/utils/message_outputs.ts185export function handleConverseStreamContentBlockStart(
LOW…s/providers/langchain-aws/src/utils/message_outputs.ts208export function handleConverseStreamMetadata(
LOW…s/providers/langchain-aws/src/utils/message_outputs.ts251export function bedrockReasoningDeltaToLangchainPartialReasoningBlock(
LOW…s/providers/langchain-aws/src/utils/message_outputs.ts278export function bedrockReasoningBlockToLangchainReasoningBlock(
LOWlibs/providers/langchain-aws/src/utils/errors.ts1function extractBedrockErrorMessage(error: unknown): string | undefined {
LOW…bs/providers/langchain-aws/src/utils/message_inputs.ts75function createConverseCachePointBlock(
LOW…bs/providers/langchain-aws/src/utils/message_inputs.ts91export function applyCachePointsToConversePayload(fields: {
LOW…bs/providers/langchain-aws/src/utils/message_inputs.ts241function convertMultimodalVideoBlock(
168 more matches not shown…
Decorative Section Separators69 hits · 192 pts
SeverityFileLineSnippet
MEDIUMlibs/langchain-core/src/language_models/stream.ts253// ─── Sub-Stream: Text ───────────────────────────────────────────
MEDIUMlibs/langchain-core/src/language_models/stream.ts319// ─── Sub-Stream: Tool Calls ─────────────────────────────────────
MEDIUMlibs/langchain-core/src/language_models/stream.ts393// ─── Sub-Stream: Reasoning ──────────────────────────────────────
MEDIUMlibs/langchain-core/src/language_models/stream.ts495// ─── Sub-Stream: Usage ──────────────────────────────────────────
MEDIUMlibs/langchain-core/src/language_models/stream.ts549// ─── ChatModelStream ────────────────────────────────────────────
MEDIUMlibs/langchain-core/src/language_models/event.ts42// ─── Message Lifecycle ──────────────────────────────────────────
MEDIUMlibs/langchain-core/src/language_models/event.ts81// ─── Content Block Lifecycle ────────────────────────────────────
MEDIUMlibs/langchain-core/src/language_models/event.ts101// ─── Content Block Deltas ───────────────────────────────────────
MEDIUMlibs/langchain-core/src/language_models/event.ts205// ─── Usage ──────────────────────────────────────────────────────
MEDIUMlibs/langchain-core/src/language_models/event.ts217// ─── Provider Passthrough ───────────────────────────────────────
MEDIUMlibs/langchain-core/src/language_models/event.ts232// ─── Error ──────────────────────────────────────────────────────
MEDIUMlibs/langchain-core/src/language_models/event.ts245// ─── Union ──────────────────────────────────────────────────────
MEDIUM…-anthropic/src/tests/chat_models_stream_events.test.ts40// ─── Fixtures (native Anthropic SSE events) ─────────────────────
MEDIUM…-anthropic/src/tests/chat_models_stream_events.test.ts233// ─── Tests ───────────────────────────────────────────────────────
MEDIUM…oviders/langchain-anthropic/src/utils/stream_events.ts17// ─── Public API ─────────────────────────────────────────────────
MEDIUM…oviders/langchain-anthropic/src/utils/stream_events.ts44 // ── Message lifecycle ──────────────────────────────────
MEDIUM…oviders/langchain-anthropic/src/utils/stream_events.ts110 // ── Content block lifecycle ───────────────────────────
MEDIUM…oviders/langchain-anthropic/src/utils/stream_events.ts154 // ── Unhandled → provider passthrough ───────────────────
MEDIUM…oviders/langchain-anthropic/src/utils/stream_events.ts168// ─── Internal helpers ───────────────────────────────────────────
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts140 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts142 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts149 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts151 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts469 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts471 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts477 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts479 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts8 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts10 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts21 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts23 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts183 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts185 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts214 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts216 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts261 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts263 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts278 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts280 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts300 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts302 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts321 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts323 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts341 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts343 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts363 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts365 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts413 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts415 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts456 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts458 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts531 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts533 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts552 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts554 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts585 // ═══════════════════════════════════════════════════════════════════════
MEDIUMlibs/providers/langchain-openrouter/src/api-types.ts587 // ═══════════════════════════════════════════════════════════════════════
MEDIUM…ngchain-openrouter/src/chat_models/tests/index.test.ts43// ─── Constructor ─────────────────────────────────────────────────────
MEDIUM…ngchain-openrouter/src/chat_models/tests/index.test.ts218// ─── invocationParams ────────────────────────────────────────────────
MEDIUM…ngchain-openrouter/src/chat_models/tests/index.test.ts369// ─── getLsParams ─────────────────────────────────────────────────────
9 more matches not shown…
Cross-Language Confusion (JS/TS)13 hits · 82 pts
SeverityFileLineSnippet
HIGH…/langchain/src/agents/middleware/todoListMiddleware.ts118print("Hello World")
HIGH…ain-textsplitters/src/tests/code_text_splitter.test.ts10 print("Hello, World!")
HIGH…ain-textsplitters/src/tests/code_text_splitter.test.ts260 print("Hello, World!")
HIGH…chain-anthropic/src/tools/tests/textEditor.int.test.ts24 return False
HIGH…chain-anthropic/src/tools/tests/textEditor.int.test.ts26 return True
HIGH…chain-anthropic/src/tools/tests/textEditor.int.test.ts28 return False
HIGH…chain-anthropic/src/tools/tests/textEditor.int.test.ts32 return False
HIGH…chain-anthropic/src/tools/tests/textEditor.int.test.ts34 return True
HIGH…chain-anthropic/src/tools/tests/textEditor.int.test.ts48print(helper())
HIGH…langchain-classic/src/tests/code_text_splitter.test.ts11 print("Hello, World!")
HIGH…langchain-classic/src/tests/code_text_splitter.test.ts261 print("Hello, World!")
HIGHlibs/langchain-classic/src/agents/executor.ts752 // Invalid tools won't be in the map, so we return False.
HIGH…/src/langchain-classic/indexes/python_text_splitter.ts4 print("Hello, World!")
Fake / Example Data54 hits · 64 pts
SeverityFileLineSnippet
LOW…chain-core/src/output_parsers/tests/structured.test.ts419 '{"name": "John Doe", "biograph": "john doe is a cool dude"}';
LOW…chain-core/src/output_parsers/tests/structured.test.ts423 expect(result).toHaveProperty("name", "John Doe");
LOW…chain-core/src/output_parsers/tests/structured.test.ts431 '```json\n{"name": "John Doe", "biograph": "john doe is a cool dude"}```';
LOW…chain-core/src/output_parsers/tests/structured.test.ts435 expect(result).toHaveProperty("name", "John Doe");
LOW…chain-core/src/output_parsers/tests/structured.test.ts443 '{"name": "John Doe", "biograph": "john doe is a ```cool dude```"}';
LOW…chain-core/src/output_parsers/tests/structured.test.ts447 expect(result).toHaveProperty("name", "John Doe");
LOWlibs/langchain/src/agents/index.ts138 * // { name: 'John Doe', email: 'john@example.com', phone: '(555) 123-4567' }
LOWlibs/langchain/src/agents/middleware/piiRedaction.ts299 * return { name: "John Doe", account: "active" };
LOWlibs/langchain/src/agents/middleware/hitl.ts162 * { name: "send_email", args: { to: "user@example.com", subject: "Hello" } }
LOWlibs/langchain/src/agents/middleware/tests/pii.test.ts300 expect(content).not.toContain("user@example.com");
LOW…n/src/agents/middleware/tests/piiRedaction.int.test.ts13 name: "John Doe",
LOW…n/src/agents/middleware/tests/piiRedaction.int.test.ts124 name: "John Doe",
LOWlibs/langchain/src/agents/tests/middleware.int.test.ts16 name: "Jane Doe",
LOWlibs/langchain/src/agents/tests/middleware.int.test.ts34 expect(result.structuredResponse.name).toBe("Jane Doe");
LOWlibs/providers/langchain-neo4j/README.md78 properties: { name: "Acme Corp" },
LOW…/langchain-anthropic/src/tests/chat_models.int.test.ts1793 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " +
LOW…/langchain-anthropic/src/tests/chat_models.int.test.ts1793 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " +
LOW…in-classic/src/output_parsers/tests/structured.test.ts12 const text = '```json\n{"name": "John Doe", "age": 30}```';
LOW…in-classic/src/output_parsers/tests/structured.test.ts16 expect(result).toHaveProperty("name", "John Doe");
LOW…in-classic/src/output_parsers/tests/structured.test.ts27 const text = '{"name": "John Doe", "age": 30}';
LOW…in-classic/src/output_parsers/tests/structured.test.ts31 expect(result).toHaveProperty("name", "John Doe");
LOW…in-classic/src/output_parsers/tests/structured.test.ts43 const text = '```json\n{"name": "John Doe", "age": }```';
LOW…in-classic/src/output_parsers/tests/structured.test.ts68 const text = 'Some random text ```json\n{"name": "John Doe", "age": 30}```';
LOW…in-classic/src/output_parsers/tests/structured.test.ts71 expect(result).toHaveProperty("name", "John Doe");
LOW…/langchain-classic/src/chains/openai_functions/base.ts98 * // { name: 'John Doe', age: 30, fav_food: 'chocolate chip cookies' }
LOW…/langchain-classic/src/chains/openai_functions/base.ts210 * // { name: 'John Doe', age: 30, fav_food: 'chocolate chip cookies' }
LOW…hain-classic/src/chains/tests/sql_db_chain.int.test.ts90const veryLongString = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam orci nisi, vulputate ac pulvina
LOW…hain-classic/src/chains/tests/sql_db_chain.int.test.ts90const veryLongString = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam orci nisi, vulputate ac pulvina
LOW…hain-classic/src/chains/tests/sql_db_chain.int.test.ts95Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam orci nisi, vulputate ac pulvinar eu, maximus a tortor.
LOW…hain-classic/src/chains/tests/sql_db_chain.int.test.ts95Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam orci nisi, vulputate ac pulvinar eu, maximus a tortor.
LOW…hain-classic/src/chains/tests/sql_db_chain.int.test.ts100Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam orci nisi, vulputate ac pulvinar eu, maximus a tortor.
LOW…hain-classic/src/chains/tests/sql_db_chain.int.test.ts100Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam orci nisi, vulputate ac pulvinar eu, maximus a tortor.
LOW…hain-classic/src/chains/tests/sql_db_chain.int.test.ts105Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam orci nisi, vulputate ac pulvinar eu, maximus a tortor.
LOW…hain-classic/src/chains/tests/sql_db_chain.int.test.ts105Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam orci nisi, vulputate ac pulvinar eu, maximus a tortor.
LOWlibs/langchain-mcp-adapters/src/tests/tools.test.ts496 name: "Jane Doe",
LOWlibs/langchain-mcp-adapters/src/tests/tools.test.ts498 street: "123 Main St",
LOW…amples/src/createAgent/accessExternalContextInTools.ts122 user123: { name: "John Doe", memberSince: "2023-01-15", totalOrders: 3 },
LOWexamples/src/createAgent/middleware/contextEditing.ts28 return `Search results for "${query}":\n${"Lorem ipsum dolor sit amet consectetur. ".repeat(
LOWexamples/src/createAgent/middleware/contextEditing.ts28 return `Search results for "${query}":\n${"Lorem ipsum dolor sit amet consectetur. ".repeat(
LOWexamples/src/createAgent/middleware/summarization.ts6// Initialize lorem ipsum generator
LOWexamples/src/createAgent/middleware/summarization.ts57// Generate several exchanges with lorem ipsum content
LOW…les/src/langchain-classic/prompts/xml_output_parser.ts33 "name": "John Doe"
LOW…/langchain-classic/chains/openai_functions_runnable.ts47 { name: 'John Doe', age: 30, fav_food: 'chocolate chip cookies' }
LOW…ngchain-classic/chains/openai_functions_json_schema.ts39 { name: 'John Doe', age: 30, fav_food: 'chocolate chip cookies' }
LOW…sic/indexes/vector_stores/redis/redis_index_options.ts25 pageContent: "lorem ipsum dolor sit amet",
LOW…sic/indexes/vector_stores/redis/redis_index_options.ts25 pageContent: "lorem ipsum dolor sit amet",
LOW…in-classic/indexes/vector_stores/redis/redis_delete.ts25 pageContent: "lorem ipsum dolor sit amet",
LOW…in-classic/indexes/vector_stores/redis/redis_delete.ts25 pageContent: "lorem ipsum dolor sit amet",
LOW…ain-classic/indexes/vector_stores/redis/redis_query.ts43 pageContent: "lorem ipsum dolor sit amet",
LOW…ain-classic/indexes/vector_stores/redis/redis_query.ts43 pageContent: "lorem ipsum dolor sit amet",
LOW…ain-classic/indexes/vector_stores/redis/redis_query.ts81 pageContent: 'lorem ipsum dolor sit amet',
LOW…ain-classic/indexes/vector_stores/redis/redis_query.ts81 pageContent: 'lorem ipsum dolor sit amet',
LOW…langchain-classic/indexes/vector_stores/redis/redis.ts25 pageContent: "lorem ipsum dolor sit amet",
LOW…langchain-classic/indexes/vector_stores/redis/redis.ts25 pageContent: "lorem ipsum dolor sit amet",
Over-Commented Block63 hits · 63 pts
SeverityFileLineSnippet
LOWdependency_range_tests/docker-compose.yml41
LOWdependency_range_tests/docker-compose.yml61 # environment:
LOWdependency_range_tests/docker-compose.yml81 # PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
LOWdependency_range_tests/docker-compose.yml161 # cohere-lowest-deps:
LOWenvironment_tests/test-exports-cf/tsconfig.json21 // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory func
LOWenvironment_tests/test-exports-cf/tsconfig.json41 "checkJs": false /* Enable error reporting in type-checked JavaScript files. */,
LOWenvironment_tests/test-exports-cf/tsconfig.json61 // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their
LOWenvironment_tests/test-exports-cf/tsconfig.json81 // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. *
LOWenvironment_tests/test-zod-compat/run.sh1#!/usr/bin/env bash
LOWlibs/create-langchain-integration/template/src/llms.ts81 // text: chunk.response,
LOW…eate-langchain-integration/template/src/chat_models.ts81 }
LOW…eate-langchain-integration/template/src/chat_models.ts101 // });
LOW…ain-core/src/language_models/tests/chat_models.test.ts141 const response = await model.invoke("Hello there!");
LOW…s/langchain-core/src/messages/tests/messages.test-d.ts401 // $MergeOutputVersion<"v0", MessageOutputVersion>
LOW…src/messages/block_translators/tests/anthropic.test.ts401 type: "url",
LOW…src/messages/block_translators/tests/anthropic.test.ts461 {
LOWlibs/langchain-core/src/utils/types/zod.ts21import { SerializableSchema } from "../standard_schema.js";
LOWlibs/langchain-core/src/utils/types/zod.ts41//
LOW…s/langchain-core/src/utils/fast-json-patch/src/core.ts681// of this software and associated documentation files (the "Software"), to deal
LOWlibs/langchain-core/src/utils/uuid/v1.ts101 state.nsecs++;
LOW…viders/langchain-aws/src/tests/chat_models.int.test.ts161 const response = await model.invoke("Hell");
LOW…oviders/langchain-aws/src/tests/embeddings.int.test.ts61 // const client = getClient();
LOW…s/providers/langchain-groq/src/tests/agent.int.test.ts1// import { AgentExecutor, createOpenAIToolsAgent } from "langchain/agents";
LOW…s/providers/langchain-groq/src/tests/agent.int.test.ts21 // const currentWeatherTool = new DynamicStructuredTool({
LOW…s/providers/langchain-groq/src/tests/agent.int.test.ts41 // const { output } = await agentExecutor.invoke({ input });
LOW…hain-anthropic/src/tests/chat_models-tools.int.test.ts841// const { createReactAgent } = await import("@langchain/langgraph/prebuilt");
LOW…chain-google-webauth/src/tests/chat_models.int.test.ts821 required: ["greeterName"],
LOW…chain-google-webauth/src/tests/chat_models.int.test.ts841 // const backingStore = new BlobStoreGoogleCloudStorage({
LOW…chain-google-webauth/src/tests/chat_models.int.test.ts861 // },
LOW…chain-google-webauth/src/tests/chat_models.int.test.ts881
LOW…gchain-google-vertexai-web/src/tests/agent.int.test.ts1// import { test, expect } from "@jest/globals";
LOW…gchain-google-vertexai-web/src/tests/agent.int.test.ts21 // llm,
LOW…l/generative_agents/tests/generative_agent.int.test.ts121 for (let i = 0; i < observations.length; i += 1) {
LOW…l/generative_agents/tests/generative_agent.int.test.ts181 // await interviewAgent(
LOW…ain-classic/src/memory/tests/entity_memory.int.test.ts21 // @ts-expect-error unused var
LOW…ain-classic/src/memory/tests/entity_memory.int.test.ts81 const res2 = await chain.call({
LOW…ain-classic/src/smith/tests/run_on_dataset.int.test.ts321 // evaluationConfig: evaluation,
LOW…agents/tests/create_openai_functions_agent.int.test.ts81 // console.log();
LOW…s/langchain-classic/src/agents/openai/output_parser.ts1// console.warn([
LOW…ples/src/langchain-classic/models/llm/llm_debugging.ts21});
LOW…ples/src/langchain-classic/models/llm/llm_debugging.ts41// }
LOW…es/src/langchain-classic/models/chat/chat_streaming.ts21// { token: '' }
LOW…amples/src/langchain-classic/use_cases/sql/large_db.ts201// You can see a LangSmith trace of the above chain here:
LOW.github/workflows/compatibility.yml81 - name: Install dependencies
LOW.github/workflows/compatibility.yml101 # cache: "pnpm"
LOW.github/workflows/compatibility.yml121 # cache: "pnpm"
LOW.github/workflows/compatibility.yml141 # node-version: ${{ env.NODE_VERSION }}
LOW.github/workflows/compatibility.yml161 # node-version: ${{ env.NODE_VERSION }}
LOW.github/workflows/compatibility.yml181 # with:
LOW.github/workflows/compatibility.yml201 # with:
LOW.github/workflows/compatibility.yml221 # uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
LOW.github/workflows/compatibility.yml241 # uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
LOW.github/workflows/benchmark-tests.yml1# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tes
LOW.github/actions/people/app/main.py21# query Q($after: String, $category_id: ID) {
LOW.github/actions/people/app/main.py41# url
LOW.github/actions/people/app/main.py61# """
LOW.github/actions/people/app/main.py81# createdAt
LOW.github/actions/people/app/main.py321 logging.error(data["errors"])
LOW.github/actions/people/app/main.py361
LOW.github/actions/people/app/main.py381# if issue.author:
3 more matches not shown…
Hallucination Indicators6 hits · 60 pts
SeverityFileLineSnippet
CRITICAL…ain-classic/src/experimental/openai_assistant/index.ts111 run = await this.client.beta.threads.runs.submitToolOutputs(
CRITICAL…ain-classic/src/experimental/openai_assistant/index.ts135 await this.client.beta.threads.messages.create(input.threadId, {
CRITICAL…ain-classic/src/experimental/openai_assistant/index.ts146 run = await this.client.beta.threads.runs.submitToolOutputs(input.runId, {
CRITICAL…ain-classic/src/experimental/openai_assistant/index.ts238 const run = this.client.beta.threads.runs.create(threadId, {
CRITICAL…ain-classic/src/experimental/openai_assistant/index.ts277 run = await this.client.beta.threads.runs.retrieve(runId, {
CRITICAL…ain-classic/src/experimental/openai_assistant/index.ts304 const messages = await this.client.beta.threads.messages.list(threadId, {
Verbosity Indicators24 hits · 36 pts
SeverityFileLineSnippet
LOWlibs/langchain/src/agents/middleware/tests/hitl.test.ts1412 // Step 1: Initial invocation - should interrupt
LOWlibs/langchain/src/agents/middleware/tests/hitl.test.ts1427 // Step 2: Get state before resume to see original order
LOWlibs/langchain/src/agents/middleware/tests/hitl.test.ts1441 // Step 3: Resume with approvals - this is where the middleware processes decisions
LOWlibs/langchain/src/agents/middleware/tests/hitl.test.ts1453 // Step 4: Check the messages returned by the resume
LOW…in/src/agents/middleware/provider/openai/moderation.ts48 * client may not yet be initialized, so we need to check if the model has a _getClientOptions method.
LOW…langchain-anthropic/src/tools/tests/memory.int.test.ts229 // Step 1: Ask to remember something
LOW…langchain-anthropic/src/tools/tests/memory.int.test.ts258 // Step 2: Ask to recall
LOW…angchain-openai/src/converters/tests/responses.test.ts1647 // Step 1: Convert OpenAI response -> LangChain AIMessage
LOW…angchain-openai/src/converters/tests/responses.test.ts1663 // Step 2: Convert LangChain AIMessage -> OpenAI Responses input (multi-turn)
LOW…angchain-openai/src/converters/tests/responses.test.ts2818 // Step 1: Simulate a response with phase
LOW…angchain-openai/src/converters/tests/responses.test.ts2847 // Step 2: Convert response to AIMessage (phase on top-level content block)
LOW…angchain-openai/src/converters/tests/responses.test.ts2852 // Step 3: Convert AIMessage back to input via raw provider path
LOWexamples/src/createAgent/supervisor.ts33// Step 1: Define low-level API tools (stubbed)
LOWexamples/src/createAgent/supervisor.ts95// Step 2: Create specialized sub-agents with human-in-the-loop middleware
LOWexamples/src/createAgent/supervisor.ts144// Step 3: Wrap sub-agents as tools for the supervisor
LOWexamples/src/createAgent/supervisor.ts228// Step 4: Create the supervisor agent with checkpointer
LOWexamples/src/createAgent/supervisor.ts246// Step 5: Demonstrate the complete workflow with human-in-the-loop
LOWexamples/src/createAgent/middleware/simpleHitl.ts67// Step 1: Initial invocation with incomplete information
LOWexamples/src/createAgent/middleware/simpleHitl.ts81// Step 2: Resume with the missing information
LOW…amples/src/multi-agent/subagents-personal-assistant.ts14// Step 1: Define low-level API tools (stubbed)
LOW…amples/src/multi-agent/subagents-personal-assistant.ts80// Step 2: Create specialized sub-agents
LOW…amples/src/multi-agent/subagents-personal-assistant.ts145// Step 3: Wrap sub-agents as tools for the supervisor agent
LOW…amples/src/multi-agent/subagents-personal-assistant.ts204// Step 4: Create the supervisor agent
LOW…amples/src/multi-agent/subagents-personal-assistant.ts214// Step 5: Use the supervisor
Slop Phrases8 hits · 18 pts
SeverityFileLineSnippet
MEDIUM…classic/src/experimental/masking/tests/masking.test.ts180 // This is just for demonstration purposes and not a secure hashing method.
MEDIUMlibs/langchain-classic/src/memory/prompt.ts32You are designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth
MEDIUMlibs/langchain-classic/src/agents/chat_convo/prompt.ts3Assistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-d
MEDIUMexamples/src/createAgent/streaming.ts246 * 🤖 Assistant: I'm unable to retrieve the weather data for New York City at the moment. Please try again later or check
MEDIUMexamples/src/createAgent/updateLongTermMemoryInTools.ts608 * Let me know if you need more information or if there's anything else I can assist you with!
MEDIUM…c/langchain-classic/memory/entity_memory_inspection.ts34 res: "As an AI language model, I don't have an office in the traditional sense. I exist entirely in digital space an
LOW…es/src/langchain-classic/prompts/use_with_llm_chain.ts28// Don't forget to include formatting instructions in the prompt!
LOW.github/ISSUE_TEMPLATE/bug-report.yml112 These will only surface LangChain.js packages, don't forget to include any other relevant
Self-Referential Comments3 hits · 8 pts
SeverityFileLineSnippet
MEDIUMdependency_range_tests/scripts/create-mock-tsconfigs.sh103# Create a mock tsconfig.json at the expected langchain-core location to prevent vite from looking for it
MEDIUM…ency_range_tests/scripts/with_standard_tests/shared.sh53# Create the top level monorepo directory
MEDIUM…ic/indexes/vector_stores/opensearch/docker-compose.yml35 OPENSEARCH_HOSTS: '["http://opensearch:9200"]' # Define the OpenSearch nodes that OpenSearch Dashboards will query
AI Slop Vocabulary3 hits · 7 pts
SeverityFileLineSnippet
MEDIUM…assic/src/retrievers/tests/parent_document.int.test.ts123 minSimilarityScore: 0.01, // Essentially no threshold
MEDIUM…etrievers/parent_document_retriever_score_threshold.ts15 minSimilarityScore: 0.01, // Essentially no threshold
MEDIUMexamples/src/langchain-classic/memory/summary_buffer.ts44// We can also utilize the predict_new_summary method directly.
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippet
LOWdependency_range_tests/scripts/create-mock-tsconfigs.sh52 # Check if this is the langchain package (needs JSON files included)
LOW…ency_range_tests/scripts/with_standard_tests/shared.sh6# Check if this is a provider package or a regular package
LOW.github/workflows/dev-release.yml49 # Check if there are any changeset files (excluding README.md)
LOW.github/workflows/unit-tests-integrations.yml61 # Check if standard-tests has changes - if so, run tests on all packages
Example Usage Blocks3 hits · 4 pts
SeverityFileLineSnippet
LOWenvironment_tests/test-zod-compat/run.sh24# Usage:
LOW…ples/src/createAgent/middleware/simpleSummarization.ts52// Example usage
LOWexamples/src/createAgent/middleware/promptCaching.ts4// Example usage
Overly Generic Function Names1 hit · 2 pts
SeverityFileLineSnippet
LOW…chain-anthropic/src/tools/tests/textEditor.int.test.ts44 "src/utils.py": `def helper():