Dify setup
Connect CanalAPI through the OpenAI-API-compatible provider and verify an LLM node before expanding workflows.
Dify provides a UI for AI applications, knowledge bases and workflows. Choose a deployment using the official project. A workspace owner or administrator configures models.
Checked on 2026-11-03; release snapshot 1.18.0. Official provider documentation and plugin fields were reviewed; a real CanalAPI call has not been tested. The Dify license adds multi-tenant-service and branding conditions to Apache-2.0. Review it before deployment or redistribution.
Install the provider and add a model
In the current UI, open Integrations → Model Provider, install the official OpenAI-API-compatible plugin and add a model. Older versions may place providers in settings; follow the installed version's UI.
| Field | Value |
|---|---|
| Model type | LLM |
| Model Name | Full model ID from the CanalAPI catalog |
| Model display name | Optional, for example CanalAPI Chat |
| API Key | Your CanalAPI key; CanalAPI requires it even if the plugin marks it optional |
| API Base URL | https://api.canalapi.com/v1 |
| Completion mode | Chat |
| Model context size | The model's actual context length |
The optional endpoint_model_name overrides the model name sent to the API. Leave it empty when using the full ID above to avoid a mismatch between the displayed and requested model. The older Completion mode is not Chat Completions.
Saving credentials may run validation and incur a charge. Start with a dedicated key with a spending limit; consult model capabilities for model-specific settings.
Start with one LLM node
- Create a minimal chat application, or a workflow with one LLM node receiving input and returning an answer.
- Explicitly select the new CanalAPI model and enter “Reply only OK”.
- Check run details and CanalAPI usage logs for the actual model and result.
- Add retrieval, tools and branches one at a time, checking requests and costs after each change.
Workspace defaults for system reasoning, embeddings, reranking and speech are separate settings. A chat model does not configure those model types. Knowledge bases need working embeddings; agents also need tool support.
Common issues
- Missing model settings: check workspace owner / administrator permissions and the version's menu location.
- Unexpected model is called: inspect
endpoint_model_name, the application node's selection and workspace defaults. - Credential validation fails: inspect plugin errors to distinguish URL, key, model and network issues. For self-hosting, check outbound access from the plugin runtime.
- Chat works but the knowledge base fails: inspect embeddings and document processing rather than changing only the chat model.
Official references: model providers, official plugin fields. Other errors: troubleshooting.