Feature/add hpc ai provider#3275
Open
lioZ129 wants to merge 3 commits intodeepset-ai:mainfrom
Open
Conversation
There was a problem hiding this comment.
Pull request overview
- Adds a new
hpc-ai-haystackintegration package underintegrations/hpc_ai, implementingHPCAIChatGeneratoras anOpenAIChatGeneratorsubclass 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
HPCAIChatGeneratorwith HPC-AI defaults (HPC_AI_API_KEY, optionalHPC_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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two related pr:
Proposed Changes:
hpc-ai-haystackintegration underintegrations/hpc_aiHPCAIChatGenerator, built on top of Haystack'sOpenAIChatGenerator, to support HPC-AI's OpenAI-compatible APIHPC_AI_API_KEYfor authenticationHPC_AI_BASE_URLas an optional overridehttps://api.hpc-ai.com/inference/v1as the default base URLSUPPORTED_MODELS:minimax/minimax-m2.5moonshotai/kimi-k2.5README.md.github/workflows/hpc_ai.yml.github/labeler.yml.github/workflows/CI_coverage_comment.ymlHow did you test it?
hatch run fmt-checkhatch run test:typeshatch run test:unithatch run test:integrationNotes for the reviewer
haystackandhaystack-integrationsrepositoriesChecklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.