langgenius / langgenius/dify

[Bug] "does not have provider_credential_schema" in knowledge pipeline credential setup

Open
#40,985 6 comments 1 reaction 0 assignees View on GitHub
🐞 bug
Dominant language
TypeScript
Stars
156k
Forks
24.6k
Avg merge
22h 9m
Merged PRs (30d)
610

Description

### Self Checks

- [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542).
- [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general).
- [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/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

1. Use the OpenAI API Compatible plugin and configure custom model endpoints; the API key has already been configured.
2. Edit a Knowledge Pipeline and select the custom models; it still shows "Configuration required."
3. Go to the API key authorization settings and enter a credential name.
4. 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

Image

Image

Contributor guide

Open the contributing guide

Research direction

Start with api/controllers/console/workspace/model_providers.py and api/services/model_provider_service.py, then trace credential validation through api/core/entities/provider_configuration.py and the model provider factory shown in the stack trace. Reproduce the OpenAI API Compatible setup and verify that published knowledge pipelines can configure and use the selected embedding and rerank models without the provider_credential_schema error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.