Skip to content

llm_orchestrator / llm_vector_store / ml_traditional / dl_frameworks match provider names anywhere on an import line #4150

Closed

Description

@squid-protocol

Same root cause as #4137, in the four sibling AI/ML rules that #4137's fix (PR #4149) left alone to stay in scope: llm_orchestrator, llm_vector_store, ml_traditional and dl_frameworks.

All four are built from _IMPORT_WRAPPER in gitgalaxy/standards/language_standards/_shared_patterns.py:

_IMPORT_WRAPPER = r"\b(?:import|require|from)\b.*?(?:{names})\b"

That matches when the package name appears anywhere on an import line, not when it is the imported package. The rules are wired into python, javascript and typescript.

Lines that match on current main (checked against GLOBAL_* directly), none of which use the SDK:

Rule False positive
llm_orchestrator from .langchain import chain
llm_vector_store from airflow.providers.pinecone.hooks import PineconeHook
llm_vector_store from airflow.providers.chromadb import x
ml_traditional const x = require('../sklearn')
dl_frameworks from myproj.models.torch import Net
dl_frameworks import { load } from './keras/loader'

Fix: anchor each rule on the package's top-level name the way PR #4149 does for llm_api (PY_LLM_API / JS_LLM_API). That means the module after from / in an import list, or the quoted specifier after from / require( / import(, must start with the package. Relative and alias paths (./, ../, @/, ~/) should never match. Reuse #4149's pattern shape rather than inventing a second one, and decide per rule which scoped npm packages count (e.g. @tensorflow/tfjs, @langchain/*, @pinecone-database/pinecone).

Note that llm_orchestrator's langchain\b doesn't currently see langchain_openai / langchain_community, so splitting these packages needs an explicit decision about which rule owns them (#4149 put langchain_openai/langchain_anthropic under llm_api).

Depends on / follows: #4137 (PR #4149).

Activity

  1. added
    bug
    on Oct 2, 2026
  2. added
    scope:infra
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugscope:infra

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions