Skip to content

Add HAI model provider plugin - #2849

Open
rluisr wants to merge 3 commits into
langgenius:mainfrom
rluisr:feat/add-hai-provider
Open

Add HAI model provider plugin#2849
rluisr wants to merge 3 commits into
langgenius:mainfrom
rluisr:feat/add-hai-provider

Conversation

@rluisr

@rluisr rluisr commented Aug 9, 2026

Copy link
Copy Markdown

Plugin information

Submission type

  • New plugin
  • Version update

What changed

HAI is a Japan-based OpenAI-compatible LLM Inference API with JPY billing.

This plugin adds a predefined-model provider that points at https://hai-api.hcloud.ltd/v1 and ships catalog entries for:

  • kimi-k2.6 (default validation model)
  • kimi-k3
  • deepseek-v4-flash
  • qwen3.6-35b-a3b
  • qwen3.6-35b-a3b-uncensored
  • gemma-4-31b-it

Website: https://hai.hcloud.ltd
Docs: https://hai.hcloud.ltd/docs
Console / API keys: https://hai.hcloud.ltd/console/

Risk level

  • Low risk
  • Medium risk
  • High risk

The plugin only calls the fixed HAI HTTPS API endpoint and does not execute user-controlled code, commands, SQL, file operations, browser automation, or arbitrary network requests.

Required checks

  • I have read and followed the Marketplace submission requirements.
  • I have read and comply with the Plugin Developer Agreement.
  • I tested this plugin package contents and documented limitations below.
  • The package contains only files needed at runtime.
  • The package does not contain secrets, local credentials, .env files, .git directories, virtual environments, caches, logs, or IDE files.
  • The package does not contain executables or bundled binaries.
  • The plugin README includes setup steps, usage instructions, required APIs or credentials, connection requirements, and the source repository link.
  • The plugin includes PRIVACY.md.
  • All user-facing text is primarily in English, with Japanese README under readme/README_ja_JP.md.

Security and privacy notes

None beyond transmitting prompt content and the API key to the configured HAI endpoint (https://hai-api.hcloud.ltd). See PRIVACY.md inside the package.

Local validation

  • Packaged as rluisr/hai/hai-0.0.1.difypkg (zip of plugin root with manifest, provider, models, README, PRIVACY.md, assets).
  • Live credential validation against production HAI requires a hai_... key from the console; not included in this PR.

Reviewer notes

  • Author is rluisr (not reserved).
  • Implementation uses OAICompatLargeLanguageModel with default base URL https://hai-api.hcloud.ltd/v1.

Add HAI (https://hai.hcloud.ltd) OpenAI-compatible model provider for Dify Marketplace.

- API: https://hai-api.hcloud.ltd/v1
- Models: kimi-k2.6, kimi-k3, deepseek-v4-flash, qwen3.6-35b-a3b,
  qwen3.6-35b-a3b-uncensored, gemma-4-31b-it
- Package: rluisr/hai/hai-0.0.1.difypkg
@github-actions github-actions Bot added the risk: low Low-risk Marketplace submission label Aug 9, 2026

@crazywoola crazywoola left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

❌ Request Changes

Decision: Request changes

Failed Checks

Check Status Detail Required action
dify_plugin version ❌ Fail dify_plugin must be installed and >= 0.9.0, but it was not found. Use dify_plugin >= 0.9.0 in the packaged plugin environment.

Full Check Results

Check Status Detail Required action
PR content language ✅ Pass PR title/body CJK ratio=0.0% (zh=0, en=1777, ignored_zh=0, allowed_zh<=0) None.
Project structure ✅ Pass All expected files present: manifest.yaml, README.md, PRIVACY.md. _assets/: yes. None.
Manifest author ✅ Pass author is valid. None.
Icon validation ✅ Pass icon exists: _assets/icon_s_en.svg None.
Version check ✅ Pass version 0.0.1 is available. None.
README language ✅ Pass README.md CJK ratio=0.0% (zh=0, en=630, allowed_zh<=0) None.
PRIVACY.md ✅ Pass PRIVACY.md exists and is non-empty. None.
Dependency install ✅ Pass requirements.txt not found; skipped. None.
dify_plugin version ❌ Fail dify_plugin must be installed and >= 0.9.0, but it was not found. Use dify_plugin >= 0.9.0 in the packaged plugin environment.
Install test ✅ Pass requirements.txt not found; skipped. None.
Packaging test ✅ Pass packaging check passed. None.

Next steps

  • dify_plugin version: Use dify_plugin >= 0.9.0 in the packaged plugin environment.

Please address these issues and push an update.

@crazywoola
crazywoola dismissed their stale review August 10, 2026 09:56

Superseded by a fresh full review of all open PRs on 2026-08-10.

@crazywoola crazywoola left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

❌ Request Changes

Decision: Request changes

Failed Checks

Check Status Detail Required action
dify_plugin version ❌ Fail dify_plugin must be installed and >= 0.9.0, but it was not found. Use dify_plugin >= 0.9.0 in the packaged plugin environment.

Full Check Results

Check Status Detail Required action
PR content language ✅ Pass PR title/body CJK ratio=0.0% (zh=0, en=1777, ignored_zh=0, allowed_zh<=0) None.
Project structure ✅ Pass All expected files present: manifest.yaml, README.md, PRIVACY.md. _assets/: yes. None.
Manifest author ✅ Pass author is valid. None.
Icon validation ✅ Pass icon exists: _assets/icon_s_en.svg None.
Version check ✅ Pass version 0.0.1 is available. None.
README language ✅ Pass README.md CJK ratio=0.0% (zh=0, en=630, allowed_zh<=0) None.
PRIVACY.md ✅ Pass PRIVACY.md exists and is non-empty. None.
Dependency install ✅ Pass requirements.txt not found; skipped. None.
dify_plugin version ❌ Fail dify_plugin must be installed and >= 0.9.0, but it was not found. Use dify_plugin >= 0.9.0 in the packaged plugin environment.
Install test ✅ Pass requirements.txt not found; skipped. None.
Packaging test ✅ Pass packaging check passed. None.

Next steps

  • dify_plugin version: Use dify_plugin >= 0.9.0 in the packaged plugin environment.

Please address these issues and push an update.

@crazywoola

Copy link
Copy Markdown
Member

Hi @rluisr — thanks for the new provider contribution! The package is very close. The remaining blocker is that dify_plugin is not installed by the package; please include dify_plugin>=0.9.0 in requirements.txt and repack the .difypkg. Once updated, we will be happy to take another look. 🙏

Address review feedback: package now installs dify_plugin via requirements.txt.
@rluisr

rluisr commented Aug 10, 2026

Copy link
Copy Markdown
Author

Thanks for the review @crazywoola — updated.

  • Added requirements.txt with dify_plugin>=0.9.0
  • Bumped the same pin in pyproject.toml
  • Repacked rluisr/hai/hai-0.0.1.difypkg

Ready for another look.

Copy link
Copy Markdown
Member

Hi @rluisr — here is the current CI summary for commit 27858db.

❌ Blocking errors

  • manifest.yaml is missing the required repo and contact fields.

⚠️ Warnings / review items

  • Add the recommended meta.minimum_dify_version field.
  • dify_plugin>=0.9.0 has a lower-bound-only constraint in both requirements.txt and pyproject.toml.
  • Python-safety review: models/llm/llm.py:21 may return credential-like values through super()._invoke(... credentials ...).
  • Workflow infrastructure warning (not caused by this PR): checkout/setup-python still target deprecated Node.js 20 and are being forced onto Node.js 24.

The current log no longer reports the earlier missing-dify_plugin dependency problem; the manifest fields above are the remaining blockers in this run.

Open the failed pre-check-plugin job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low Low-risk Marketplace submission

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants