langchain - 💡(How to fix) Fix Feature request: Add HPC-AI as a chat model provider [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langchain-ai/langchain#36269Fetched 2026-04-08 01:36:22
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Author
Timeline (top)
commented ×2labeled ×2closed ×1issue_type_added ×1

Request to add first-party-style integration for HPC-AI (or the vendor’s public naming/docs you prefer) as a chat model provider in the LangChain Python monorepo, similar to other OpenAI-compatible partner packages.

Root Cause

Request to add first-party-style integration for HPC-AI (or the vendor’s public naming/docs you prefer) as a chat model provider in the LangChain Python monorepo, similar to other OpenAI-compatible partner packages.

RAW_BUFFERClick to expand / collapse

Checked other resources

  • This is a feature request, not a bug report or usage question.
  • I added a clear and descriptive title that summarizes the feature request.
  • I used the GitHub search to find a similar feature request and didn't find it.
  • I checked the LangChain documentation and API reference to see if this feature already exists.
  • This is not related to the langchain-community package.

Package (Required)

  • langchain
  • langchain-openai
  • langchain-anthropic
  • langchain-classic
  • langchain-core
  • langchain-model-profiles
  • langchain-tests
  • langchain-text-splitters
  • langchain-chroma
  • langchain-deepseek
  • langchain-exa
  • langchain-fireworks
  • langchain-groq
  • langchain-huggingface
  • langchain-mistralai
  • langchain-nomic
  • langchain-ollama
  • langchain-openrouter
  • langchain-perplexity
  • langchain-qdrant
  • langchain-xai
  • Other / not sure / general

Feature Description

Summary

Request to add first-party-style integration for HPC-AI (or the vendor’s public naming/docs you prefer) as a chat model provider in the LangChain Python monorepo, similar to other OpenAI-compatible partner packages.

Motivation

HPC-AI exposes an OpenAI-compatible HTTP API for chat completions. Users who already use BaseChatOpenAI-style integrations benefit from a dedicated package and stable entry points (ChatHPCAI, optional langchain-hpc-ai extra, and init_chat_model / provider registration) instead of ad-hoc ChatOpenAI + custom base URL configuration.

Proposed solution

  • New partner package under libs/partners/hpc_ai (publishable name: langchain-hpc-ai) implementing ChatHPCAI, extending the existing OpenAI-compatible chat stack with sensible defaults for the vendor inference endpoint and env-based configuration (e.g. API key / base URL).
  • Register provider id hpc_ai in langchain and langchain_v1 so init_chat_model("hpc_ai:...") (and any documented model-id patterns) resolves consistently with other providers.
  • Unit tests (no network) in the new package; optional integration test stub or compile check if that matches repo conventions.
  • CI/labeling updates as required for new partner packages (dependabot path, PR labeler, etc.), following existing partner PRs.

Alternatives considered

  • Document-only: users configure generic ChatOpenAI with base_url — works but lacks discoverability, typed defaults, and consistent init_chat_model routing.

Additional context

  • No breaking changes intended for existing public APIs.
  • Willing to adjust naming, env var names, and default base URL to match vendor documentation after maintainer feedback.

If this direction is approved, please assign the issue so an external contributor can open a PR referencing Fixes #<this-issue>.

Use Case

I'm building LLM apps that call HPC-AI's OpenAI-compatible inference API and want to use LangChain's standard chat abstractions and init_chat_model like other hosted providers.

Today I have to configure a generic OpenAI-compatible client with a custom base URL and env vars, which is easy to get wrong, harder to discover in docs, and doesn't participate in the same provider routing as first-class integrations.

A dedicated langchain-hpc-ai package and hpc_ai provider would let me (and other users) install one optional extra, set the documented env vars, and invoke models through the same patterns as the rest of the ecosystem.

Proposed Solution

No response

Alternatives Considered

No response

Additional Context

No response

extent analysis

Fix Plan

To integrate HPC-AI as a chat model provider in the LangChain Python monorepo, follow these steps:

  • Create a new partner package under libs/partners/hpc_ai with the publishable name langchain-hpc-ai.
  • Implement ChatHPCAI in the new package, extending the existing OpenAI-compatible chat stack with sensible defaults for the vendor inference endpoint and env-based configuration.
  • Register the provider id hpc_ai in langchain and langchain_v1 to enable consistent model-id patterns.

Example code for ChatHPCAI:

from langchain.chats import BaseChatOpenAI

class ChatHPCAI(BaseChatOpenAI):
    def __init__(self, api_key: str, base_url: str = "https://api.hpc-ai.com/v1"):
        super().__init__(api_key, base_url)

    def get_model(self, model_name: str):
        # Implement model retrieval logic for HPC-AI
        pass
  • Add unit tests (no network) in the new package to verify the implementation.
  • Update CI/labeling configurations as required for new partner packages.

Verification

To verify the fix, install the langchain-hpc-ai package and use the init_chat_model function with the hpc_ai provider id:

from langchain import init_chat_model

model = init_chat_model("hpc_ai:my_model")

This should resolve to the HPC-AI chat model with the specified id.

Extra Tips

  • Ensure that the langchain-hpc-ai package is properly documented and follows the existing conventions for partner packages.
  • Consider adding integration tests to verify the functionality of the ChatHPCAI implementation.
  • Review the vendor documentation for HPC-AI to ensure that the implementation aligns with their recommended practices.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

langchain - 💡(How to fix) Fix Feature request: Add HPC-AI as a chat model provider [2 comments, 3 participants]