Use the CometAPI Dify plugin before inventing a provider adapter
If the goal is to connect Dify to CometAPI, start with the documented plugin path and treat model registration as a separate checkpoint. This keeps a configuration mismatch from looking like a downstream workflow problem.
Before you start
You need a Dify workspace that can install model plugins, a CometAPI API key, and the current model identifiers you intend to register. Store the key in a credential store or a server-side secret rather than in a prompt, source file, or shared screenshot. These are documented prerequisites, not a guarantee that a particular Dify deployment has access to every feature.
1. Install the intended plugin
In Dify, look in Marketplace or Plugins for CometAPI and install the linked langgenius/cometapi model-provider plugin. The navigation label can differ between Dify Cloud and self-hosted installations, so confirm that you are configuring the CometAPI provider rather than a generic OpenAI-compatible connector. The marketplace listing itself was not independently fetched for this guide.
2. Configure the provider
Save the CometAPI key in the plugin configuration. For the dedicated plugin, CometAPI’s guide says the compatible chat workload uses https://api.cometapi.com/v1 internally, so do not add a second base-URL change unless the installed plugin’s own instructions require it. No authenticated request or plugin execution was performed for this walkthrough; if the UI differs, follow the current plugin documentation and verify the setting without exposing the key.
3. Register exact model identifiers
A provider credential is not the same thing as a model registration. Enable the predefined IDs shown by the plugin, or use its custom-model option to enter the exact current IDs. Set Completion mode to Chat. For a custom model, use a context size that is checked against the live catalog, and enable multimodal capabilities only when the catalog and plugin expose them. Shared chat compatibility does not prove that every model has the same context or modality support, and the example IDs in the source guide should not be treated as a current availability list.
A useful troubleshooting order
Before writing a custom provider adapter or debugging a larger Dify workflow, check these three layers independently:
- The CometAPI plugin is installed and selected.
- The provider credential is saved without leaking the key.
- Each intended model has an exact, currently supported identifier and compatible Chat configuration.
If the first two checks pass but a model still fails, re-check the live model catalog, context-size setting, and capability toggles before changing application code. This sequence is a documented-setup reading and editorial troubleshooting framework, not a report of a tested deployment or runtime result.