Dify plugin
Dify is a platform where you build AI apps and agents, mostly by clicking and filling in forms. A plugin adds a new ability to it.
The NuRoute model provider plugin makes Dify send its AI calls through your NuRoute gateway. Set the model to auto and NuRoute's routing engine picks the best model for each request, or name a model yourself. With auto, Artemis picks the model for each request.
Before you start
- Dify (Dify Cloud, or your own).
- Your NuRoute gateway address.
- An API key that starts with
aicp-, from your project's (or organisation's) API Keys page.
Step 1: Install the plugin
Once the plugin is listed on the Dify Marketplace:
- In Dify, go to Plugins → Marketplace.
- Search for NuRoute.
- Click install.
Running your own Dify? You can also install it from a .difypkg file: Plugins → Install from local package.
Step 2: Set it up
- Go to Settings → Model Provider → NuRoute → Add Model.
- Model Name:
auto, or a specific model ID from your NuRoute catalogue (for examplegpt-4oorclaude-sonnet-4-6). - NuRoute Gateway URL: your gateway's address including
/v1at the end, for examplehttps://your-nuroute-gateway/v1. - API Key: your
aicp-...key. - Model context size: the context window of the model you are routing to. (This is how much text the model can read at once.)
Add the plugin again with a different Model Name. Then you can have more than one NuRoute model in Dify's model dropdown. For example: auto for most apps, and one fixed model for an app that needs a particular provider.
Function calling
Function calling (also called tool calling) lets the AI ask your app to run a tool, like "look up the weather".
It is on by default in the plugin's settings, because NuRoute's gateway supports OpenAI-style tools and tool_choice. Turn it off only if the specific model you are routing to cannot make tool calls.
Which models can I use?
- Send
auto, or an Artemis option (artemis-cost,artemis-balanced,artemis-quality), and Artemis picks the model. - Or name any model in the model catalogue.
- Named models can run on your own provider keys (BYOK).
How it works inside
Dify plugins run as a separate program that the Dify platform talks to using its own plugin protocol. It is not something you host yourself.
This plugin is a thin layer on top of the Dify Plugin SDK's own OpenAI-compatible model class. NuRoute's /v1/chat/completions address already speaks that format, so the SDK does the real work of sending requests, getting answers and streaming.
What is not supported
This is a model provider only. It sends chat requests through NuRoute and nothing else. Projects, routing settings, policies, budgets and API keys are all still managed in the NuRoute dashboard.