Feature/add hpc ai provider#3275
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.
|
@julian-risch could u please review this? |
|
@lioZ129 Thank you for your suggestion and opening this issue. Thank you also for your patience while we discussed internally if we can maintain this integration. We recommend to publish and release this integration yourself using our repository template: https://github.com/deepset-ai/custom-component |
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:.