Skip to content

Add Phase Router model provider plugin (phase/phase_router 0.1.0) - #4110

Open
evgeniy-phase-ai wants to merge 2 commits into
langgenius:mainfrom
evgeniy-phase-ai:phase-router-0.1.0
Open

evgeniy-phase-ai wants to merge 2 commits into
langgenius:mainfrom
evgeniy-phase-ai:phase-router-0.1.0

Conversation

@evgeniy-phase-ai

@evgeniy-phase-ai evgeniy-phase-ai commented Dec 4, 2026 •

Copy link
Copy Markdown

Plugin Submission

Plugin information

Submission type

  • New plugin
  • Version update

What changed

New model provider plugin for Phase Router (https://router.phase.xyz), an OpenAI-compatible API with 350+ models behind one key (368 in GET https://router.phase.xyz/v1/models today). The model auto sends each request to the cheapest model that can handle it.

The plugin is a thin wrapper over OAICompatLargeLanguageModel with the endpoint fixed to https://router.phase.xyz/v1. It ships six predefined LLMs (auto, glm-5.3, kimi-k3.1-pro, deepseek-v4.1-flash, qwen3-coder-480b, gpt-oss-120b) with context sizes, output limits and prices taken from /v1/models, and supports adding any other catalog model as a customizable model. Credentials are validated with GET /v1/key, which is not billed.

Disclosure: this PR comes from the Phase Router team (the vendor). The plugin and this PR were prepared by an AI agent (Claude) working for the team, from the team's AI-assisted GitHub account; submission approved by the team.

Risk level

  • Low risk
  • Medium risk
  • High risk

Medium because the plugin sends user prompts to an external service (router.phase.xyz, which forwards them to the model's host). It calls only that one fixed HTTPS host.

Required checks

  • I have read and followed the Marketplace submission requirements.
  • I have read and comply with the Plugin Development Guidelines.
  • I tested this plugin on Dify Community Edition and Dify Cloud, or documented any limitation 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, or I explained why they are required below.
  • The plugin README includes setup steps, usage instructions, required APIs or credentials, connection requirements, and the source repository link.
  • The plugin includes PRIVACY.md or a hosted privacy policy, and manifest.yaml references it.
  • All user-facing text is primarily in English, with any localized README files following the i18n guidance.

Security and privacy notes

None of the sensitive capabilities listed in the requirements. The plugin sends the prompts, tool definitions and model parameters of each request, with the user's API key, to the single fixed host router.phase.xyz (declared in manifest.yaml under network.domains). No arbitrary URLs, no file or command access. The API key is a Dify secret-input credential and is not logged. Requests use timeouts. Details in PRIVACY.md.

Local validation

# package (Dify plugin CLI v0.6.15)
dify-plugin plugin package ./dify-plugin -o phase_router-0.1.0.difypkg
-> plugin packaged successfully

# marketplace toolkit validator (langgenius/dify-marketplace-toolkit, main of 2026-12-04)
python3 validator/validate-difypkg.py phase_router-0.1.0.difypkg --pr-body-file pr_body.md --output-dir out
-> 0 blocking failures; 4 warning categories, explained under Reviewer notes

# schemas loaded with dify_plugin 0.10.2 (manifest, provider, all six model YAMLs): OK

# live calls through the plugin classes (dify_plugin 0.10.2, Python 3.12), streaming, tool call then answer:
auto          turn 1 tool call get_weather({"city":"Paris"}); turn 2 answer, 247 tokens
gpt-oss-120b  turn 1 tool call get_weather({"city":"Paris"}); turn 2 answer, 235 tokens
glm-5.3       turn 1 tool call get_weather({"city":"Paris"}); turn 2 answer, 264 tokens

# credential check
valid key   -> accepted (GET /v1/key 200)
invalid key -> CredentialsValidateFailedError "Phase Router rejected the key: 401"

Reviewer notes

Validator warnings:

  • sensitive_capabilities / access_domains: the one requests.get is GET https://router.phase.xyz/v1/key; the host is a constant (ENDPOINT_URL), not user input.
  • python_safety: the two flagged lines pass credentials to the SDK base class (OAICompatLargeLanguageModel); nothing is returned to the user or logged.
  • dependency_vulnerabilities: one pinned dependency (dify_plugin==0.10.2), no known vulnerabilities.

Limitation, stated plainly: I have not installed this package in a running Dify Community Edition or on Dify Cloud. We have no Docker host available for Dify CE right now. What was tested is listed above: packaging with the official CLI, the marketplace toolkit validator, and the plugin's provider and LLM classes run directly with the dify_plugin SDK against the live API. If you need a CE install test before review, say so and we will run it and report back here.

evgeniy-phase-ai and others added 2 commits December 4, 2026 08:57
…skills/dify-plugin

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@evgeniy-phase-ai

Copy link
Copy Markdown
Author

The plugin source moved to https://github.com/devcells/phase-router-skills/tree/main/dify-plugin (our single public repo for Phase Router integrations). I re-packaged 0.1.0 with the updated repo field in manifest.yaml and README link; no code changes. Toolkit validator: 0 blocking failures, same warnings as described above.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant