Skip to content

Feature/add hpc ai provider#3275

Open
lioZ129 wants to merge 3 commits intodeepset-ai:mainfrom
lioZ129:feature/add-hpc-ai-provider
Open

Feature/add hpc ai provider#3275
lioZ129 wants to merge 3 commits intodeepset-ai:mainfrom
lioZ129:feature/add-hpc-ai-provider

Conversation

@lioZ129
Copy link
Copy Markdown

@lioZ129 lioZ129 commented May 6, 2026

Two related pr:

Proposed Changes:

  • Add a new hpc-ai-haystack integration under integrations/hpc_ai
  • Introduce HPCAIChatGenerator, built on top of Haystack's OpenAIChatGenerator, to support HPC-AI's OpenAI-compatible API
  • Default the integration to:
    • HPC_AI_API_KEY for authentication
    • HPC_AI_BASE_URL as an optional override
    • https://api.hpc-ai.com/inference/v1 as the default base URL
  • Register the officially supported models via SUPPORTED_MODELS:
    • minimax/minimax-m2.5
    • moonshotai/kimi-k2.5
  • Add integration-specific tests, examples, README, and pydoc config
  • Wire the new integration into the repo-level inventory and CI configuration:
    • root README.md
    • .github/workflows/hpc_ai.yml
    • .github/labeler.yml
    • .github/workflows/CI_coverage_comment.yml

How did you test it?

  • Ran hatch run fmt-check
  • Ran hatch run test:types
  • Ran hatch run test:unit
  • Ran hatch run test:integration
  • Performed additional local sanity checks on serialization, async tests, examples, and generated package structure

Notes for the reviewer

  • This integration intentionally reuses the existing OpenAI-compatible chat generator flow rather than introducing a new transport layer
  • The scope of this PR is limited to the core integration package and repo wiring
  • Companion documentation changes are prepared separately in the haystack and haystack-integrations repositories

Checklist

Copilot AI review requested due to automatic review settings May 6, 2026 03:27
@lioZ129 lioZ129 requested a review from a team as a code owner May 6, 2026 03:27
@lioZ129 lioZ129 requested review from sjrl and removed request for a team May 6, 2026 03:27
@github-actions github-actions Bot added the type:documentation Improvements or additions to documentation label May 6, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

  • Adds a new hpc-ai-haystack integration package under integrations/hpc_ai, implementing HPCAIChatGenerator as an OpenAIChatGenerator subclass for HPC-AI’s OpenAI-compatible chat completions API.
  • Wires the integration into repo discovery and automation (inventory row in root README.md, labeler rules, dedicated CI workflow, and coverage-comment workflow allowlist).

Changes:

  • Introduce HPCAIChatGenerator with HPC-AI defaults (HPC_AI_API_KEY, optional HPC_AI_BASE_URL, default base URL) and a small supported-model registry.
  • Add examples + unit/integration tests (sync + async), including tool-calling and streaming coverage.
  • Add CI workflow + repo-level wiring for labels and coverage comments.

Reviewed changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Adds the hpc-ai-haystack integration row to the repo inventory table.
integrations/hpc_ai/src/haystack_integrations/components/generators/hpc_ai/chat/chat_generator.py Implements HPCAIChatGenerator on top of OpenAIChatGenerator, overriding request preparation for HPC-AI compatibility.
integrations/hpc_ai/src/haystack_integrations/components/generators/hpc_ai/__init__.py Exports HPCAIChatGenerator from the integration package.
integrations/hpc_ai/src/haystack_integrations/components/generators/hpc_ai/chat/__init__.py Declares the chat subpackage.
integrations/hpc_ai/src/haystack_integrations/components/generators/py.typed Marks the package as typed for type checkers.
integrations/hpc_ai/tests/test_hpc_ai_chat_generator.py Adds sync tests covering init/serde, tools, streaming chunk handling, and pipeline usage.
integrations/hpc_ai/tests/test_hpc_ai_chat_generator_async.py Adds async tests covering init and async run paths (incl. streaming + tools).
integrations/hpc_ai/tests/__init__.py Adds SPDX headers for the tests package.
integrations/hpc_ai/examples/hpc_ai_basic_example.py Adds a minimal usage example.
integrations/hpc_ai/examples/hpc_ai_with_tools_example.py Adds an example demonstrating tool calling + tool execution flow.
integrations/hpc_ai/README.md Documents the integration, links, and required environment variables.
integrations/hpc_ai/pyproject.toml Defines packaging, test/lint/type-check configuration, and dependencies for the new integration.
integrations/hpc_ai/pydoc/config_docusaurus.yml Adds pydoc configuration for generating the integration docs page.
integrations/hpc_ai/CHANGELOG.md Adds an initial (git-cliff managed) changelog scaffold.
integrations/hpc_ai/LICENSE.txt Adds Apache-2.0 license text for the package.
.github/workflows/hpc_ai.yml Adds dedicated CI workflow for linting, tests, and coverage reporting for hpc_ai.
.github/workflows/CI_coverage_comment.yml Adds Test / hpc_ai to the workflow-run allowlist for coverage comment posting.
.github/labeler.yml Adds integration:hpc-ai label rules for changes under integrations/hpc_ai/**.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread integrations/hpc_ai/tests/test_hpc_ai_chat_generator.py
Comment thread integrations/hpc_ai/tests/test_hpc_ai_chat_generator.py
Comment thread integrations/hpc_ai/tests/test_hpc_ai_chat_generator_async.py
Comment thread integrations/hpc_ai/tests/test_hpc_ai_chat_generator_async.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic:CI type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants