Skip to content

[chore]: rm langchain deps#2123

Merged
seanmcguire12 merged 1 commit into
mainfrom
rm-langchain-export-and-example
May 14, 2026
Merged

[chore]: rm langchain deps#2123
seanmcguire12 merged 1 commit into
mainfrom
rm-langchain-export-and-example

Conversation

@seanmcguire12
Copy link
Copy Markdown
Member

@seanmcguire12 seanmcguire12 commented May 14, 2026

why

  • these were unneeded dependencies:
    • they were not used in library code at all
    • nor were they included in the public export surface

what changed

  • removed lanchain/core and langchain/openai from dependencies
  • removed langchain examples
  • updated lockfile

Summary by cubic

Removed unused LangChain dependencies and examples from packages/core to reduce install size and simplify the codebase. No API or runtime behavior changes.

  • Dependencies

    • Removed @langchain/core and @langchain/openai from packages/core/package.json.
    • Updated pnpm-lock.yaml to drop related transitive packages.
  • Refactors

    • Deleted LangChain examples: packages/core/examples/langchain-client.ts and packages/core/examples/custom-client-langchain.ts.

Written for commit e46cfa4. Summary will update on new commits.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 14, 2026

⚠️ No Changeset found

Latest commit: e46cfa4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.
Architecture diagram
sequenceDiagram
    participant Main as Application Code
    participant Stagehand as Stagehand Core
    participant LLMClient as LLMClient (Abstract)
    participant ConcreteClients as OpenAI / Anthropic / Google / Vercel Clients
    participant LLMProviders as LLM Provider APIs

    Note over Main,LLMProviders: Current Architecture: No LangChain integration

    Main->>Stagehand: Create Stagehand instance with desired LLM client

    alt Using Native Client (e.g., ChatOpenAI from package)
        Main->>ConcreteClients: Instantiate ChatOpenAI client
        Main->>Stagehand: Stagehand({ llmClient: chatOpenAI })
    else Using Vercel AI SDK client
        Main->>ConcreteClients: Create Vercel AI provider (openai, anthropic...)
        Main->>Stagehand: Stagehand({ llmClient: vercelAIClient })
    end

    Stagehand->>LLMClient: Calls createChatCompletion(options)
    LLMClient->>ConcreteClients: Dispatches to the correct provider implementation

    alt Successful request
        ConcreteClients->>LLMProviders: HTTP POST to LLM API (OpenAI, Anthropic, etc.)
        LLMProviders-->>ConcreteClients: LLM response (text + usage)
        ConcreteClients-->>LLMClient: Return ChatCompletion
        LLMClient-->>Stagehand: Return structured response
        Stagehand-->>Main: Return extracted result
    else Request fails / rate-limited
        ConcreteClients->>LLMProviders: HTTP POST
        LLMProviders-->>ConcreteClients: Error response (e.g. 429, 500)
        ConcreteClients-->>LLMClient: Throw error
        LLMClient-->>Stagehand: Propagate error
        Stagehand-->>Main: Return error
    end

    Note over Main,LLMProviders: Not in play: @langchain/core, @langchain/openai
    Note over ConcreteClients: Active integrations: OpenAI, Anthropic, Google, Vercel AI SDK
Loading

@seanmcguire12 seanmcguire12 merged commit 7ed26a8 into main May 14, 2026
214 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants