Repository navigation
Add QuickRouter model provider 0.0.1 - #4093
YunSongMax wants to merge 3 commits into
Conversation
|
Thank you for submitting QuickRouter. Pre Check Plugin now passes, but the latest Governance run is blocked because Please add 1–3 tags from the controlled vocabulary in docs/marketplace-curation-policy.md (choose one that the packaging CLI also accepts), rebuild the package, and push it so a fresh Governance run can pass. As this is a model gateway, please also briefly explain in the PR description which capabilities it adds beyond proxying (Section 4 of the same policy). |
|
Thanks for the review, @crazywoola. I added the controlled GitHub currently shows |
|
Thanks for adding the I'm still holding the merge under marketplace curation policy §4: QuickRouter is a new OpenAI-compatible multi-model gateway. The capabilities described (catalog, streaming, tools, vision) are the usual Chat Completions surface; please point to where the plugin itself adds routing, metering, resilience, caching, evaluation or governance beyond forwarding to |
|
Thanks for the guidance, @crazywoola. I rebuilt the 0.0.1 package with three plugin-level changes:
All 38 offline pytest tests pass, including the recovery and metering tests, and the Marketplace Toolkit reports zero blocking findings. Could you re-review the updated package for §4? GitHub marks the new Pre Check Plugin and Governance runs as |
Plugin Submission
Plugin information
Submission type
What changed
Adds a dedicated QuickRouter LLM provider for Dify workflows. It ships 13 QuickRouter catalog IDs, defaults to the QuickRouter HTTPS endpoint, and validates credentials through the model list. Users can add custom IDs and opt in to the capabilities of their routes. Compatible routes support streamed chat, function tools, inline image inputs, and native JSON Schema.
gpt-6.2-astra,gpt-6.2-sol,gpt-6.1-terraclaude-opus-5-5,claude-fable-5-2,claude-sonnet-5-5,claude-haiku-5-5gemini-4-carbon,gemini-4-hydrogen,gemini-4-neondeepseek-v4.1-flash,deepseek-v4-progrok-4.7Gateway differentiation (curation policy Section 4)
models/llm/llm.py→_invokeaccepts the optionalfallback_modelparameter. Withquickrouter_api.py→route_completion, an eligible failure can switch the request to that model on the configured key. The plugin never replays a stream once it has yielded any chunk to Dify.quickrouter_api.py→route_completionapplies the per-modelmax_retriessetting (default 2, range 0–3). Transient gateway statuses and connection failures are retried with exponential backoff.quickrouter_api.py→retry_after_secondshandles delay seconds and HTTP dates. When the delay exceeds the remaining 10-second wait budget, the plugin returns the error without replaying early. HTTP 400, 401, and 403 stop immediately.models/pricing.py→PricingCatalogcaches the public price catalog in memory.models/pricing.py→usage_pricesandmodels/llm/llm.py→usage_ofapply the successful model's configured public group rate to the reported token counts and return USD unit prices and total in Dify'sLLMUsage. Without a group override, the plugin selects the published group nearest multiplier 1.0. Unknown prices or a catalog failure produce zero cost fields. These estimates cover the successful response. The actual bill can include separate charges or failed attempts.The archive keeps the controlled
agenttag used on the previously reviewed package.Risk level
Required checks
.envfiles,.gitdirectories, virtual environments, caches, logs, or IDE files.PRIVACY.mdor a hosted privacy policy, andmanifest.yamlreferences it.Security and privacy notes
The plugin sends workflow inputs, tool data, and the API credential only to the fixed HTTPS inference host
api.quickrouter.ai. A retry or an explicitly configured fallback can resend those inputs on the same key. The public price request only reachesquickrouter.aiand sends no credentials, prompts, model IDs, or group IDs. Redirects and environment proxies are disabled for both hosts. The plugin caches public rates in memory and omits credentials and response bodies from errors. It does not persist prompts or credentials. Dify controls execution of model-requested tools.Local validation
Retry-After, immediate authentication failure, fallback in non-streaming and streaming calls, interruption after the first chunk, pricing cache expiry, group selection, USD usage fields, and timeout degradation. See the recovery and metering tests.quickrouter-0.0.1.difypkg. The unpacked provider loaded through the Dify SDK and exposed both recovery settings.Reviewer notes
The package is unsigned. These checks used the Dify SDK and mocked requests. Dify Community Edition and Dify Cloud UI installation and paid inference were outside this validation. The estimates use public rates for the successful model and depend on the configured group. GPT presets still use Chat Completions, which does not expose GPT tool calling in this plugin.