[Bug] "does not have provider_credential_schema" in knowledge pipeline credential setup
Self Checks
- [x] I have read the Contributing Guide and Language Policy.
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report, otherwise it will be closed.
- [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
1.16.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
- Use the OpenAI API Compatible plugin and configure custom model endpoints; the API key has already been configured.
- Edit a Knowledge Pipeline and select the custom models; it still shows "Configuration required."
- Go to the API key authorization settings and enter a credential name.
- A red error toast appears, and the credential configuration form fails to render. The same models work fine when testing the knowledge base workflow, but become unavailable after the pipeline is published.
api-1 | 2026-08-20 01:32:15.136 ERROR [Dummy-429] [external_api.py:92] 20e8ce3cf6d75e25b6610794d8f0930f - value_error in request handler api-1 | Traceback (most recent call last): api-1 | File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request api-1 | rv = self.dispatch_request() api-1 | ^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request api-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/.venv/lib/python3.12/site-packages/flask_restx/api.py", line 404, in wrapper api-1 | resp = resource(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view api-1 | return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return] api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/.venv/lib/python3.12/site-packages/flask_restx/resource.py", line 41, in dispatch_request api-1 | resp = meth(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/controllers/console/wraps.py", line 335, in decorated api-1 | return view(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/libs/login.py", line 160, in decorated_view api-1 | return current_app.ensure_sync(func)(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/controllers/console/wraps.py", line 443, in decorated_function api-1 | return f(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/controllers/common/wraps.py", line 91, in decorated api-1 | return view(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/controllers/console/wraps.py", line 124, in decorated api-1 | return view(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/controllers/console/wraps.py", line 614, in decorated api-1 | return view(self, current_tenant_id, *args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/controllers/console/workspace/model_providers.py", line 182, in post api-1 | model_provider_service.create_provider_credential( api-1 | File "/app/api/services/model_provider_service.py", line 213, in create_provider_credential api-1 | provider_configuration.create_provider_credential(credentials, credential_name) api-1 | File "/app/api/core/entities/provider_configuration.py", line 526, in create_provider_credential api-1 | credentials = self.validate_provider_credentials(credentials=credentials) api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/core/entities/provider_configuration.py", line 401, in validate_provider_credentials api-1 | validated_credentials = model_provider_factory.provider_credentials_validate( api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/.venv/lib/python3.12/site-packages/graphon/model_runtime/model_providers/model_provider_factory.py", line 62, in provider_credentials_validate api-1 | raise ValueError(msg) api-1 | ValueError: Provider langgenius/openai_api_compatible/openai_api_compatible does not have provider_credential_schema
✔️ Expected Behavior
Expected behavior: After publishing the knowledge pipeline, the embedding and rerank models should be available for use.
❌ Actual Behavior
Hi @skylineneon — the root cause here is a mismatch between what the knowledge pipeline's credential UI expects and what the openai_api_compatible plugin actually declares.
What's happening: The knowledge pipeline's credential setup routes you through create_provider_credential, which calls validate_provider_credentials. That method calls model_provider_factory.provider_credentials_validate() [1], which requires the provider to declare a provider_credential_schema in its YAML.
However, the openai_api_compatible plugin only uses configurate_methods: [customizable-model] and declares a model_credential_schema — there is no provider_credential_schema at all [2]. This is correct for how this plugin works: credentials are set per custom model, not at the provider level. The knowledge pipeline UI is incorrectly funneling you into the provider-level credential flow for a plugin that doesn't support it.
This is a Dify API/UI bug, not a plugin issue — your cross-post on dify-official-plugins#3682 can likely be closed in favor of this issue [3].
Workaround: Instead of trying to add credentials from within the knowledge pipeline UI, configure the embedding/rerank models directly under Settings → Model Provider → OpenAI API Compatible → Add Model, setting the credentials per model. Once the models are authorized via that per-model flow, they should be selectable in the pipeline without triggering the provider-level credential path.
To reply, just mention @dosu.
Docs are dead. Just use Dosu.
@Dosu Hello,
I have completed all the settings: selecting the model provider, ensuring that the OpenAI API is compatible, and adding the model. The above errors no longer occur after the configuration is completed.
Glad to hear that resolved it! To recap what worked: adding model credentials individually via Settings → Model Provider → OpenAI API Compatible → Add Model before selecting them in the knowledge pipeline. This is expected because the OpenAI API Compatible provider only defines a model_credential_schema (per-model credentials) and has no provider-level credential schema [1].
The underlying issue — the knowledge pipeline UI prompting for provider-level credentials on a provider that only supports customizable-model — is still worth tracking as a bug [2], so leaving this open for maintainers to address the root cause.
To reply, just mention @dosu.
Share context across your team and agents. Try Dosu.
@dosu
Sorry, I made a mistake during the testing process. I chose a model that wasn’t what I intended to use. After switching to the model I configured myself, the problem still persists.
Thanks for clarifying — this confirms the bug is still present regardless of model selection.
The root cause is that the knowledge pipeline's credential setup flow routes to the provider-level credential creation endpoint, which calls create_provider_credential → validate_provider_credentials → model_provider_factory.provider_credentials_validate() [1]. However, openai_api_compatible only declares configurate_methods: [customizable-model] and a model_credential_schema — it has no provider_credential_schema at all [2]. So the validation always fails with the "does not have provider_credential_schema" error, no matter which model you select.
The pipeline UI is incorrectly forcing the provider-level credential path for a plugin that only supports model-level credentials. Pre-adding models from Settings doesn't help because the pipeline itself still tries to create a provider credential via ModelProviderCredentialApi.post [3], which delegates to ModelProviderService.create_provider_credential [4].
This requires a fix in the pipeline UI or backend. The credential setup flow needs to detect that openai_api_compatible uses customizable-model (no provider_credential_schema) and either:
- Skip the provider-level credential step entirely, or
- Route to the model-level credential creation flow instead.
I've also cross-posted this as a plugin-side issue for visibility. A maintainer should look at the knowledge pipeline's credential authorization flow to guard against providers that don't declare a provider_credential_schema.
To reply, just mention @dosu.
Docs are dead. Just use Dosu.
I'd like to work on this. The current report and code path point to the knowledge-pipeline credential flow treating a customizable-model provider as if it supported provider-level credentials. I plan to keep the fix scoped to selecting the correct credential flow for providers that only expose model_credential_schema, and add focused regression coverage so model-level credentials remain usable in published knowledge pipelines. Could you please assign this issue to GYJ99?