[Bedrock Plugin] Bedrock plugin v0.0.42: TypeError in validate_credentials (“missing 1 required positional argument: ‘self’”) when saving provider credentials #734

Closed
opened 2026-02-16 10:20:20 -05:00 by yindo · 1 comment
Owner

Originally created by @stealthinu on GitHub (Oct 19, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues Dify issues & Dify Official Plugins, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.9.1 / 1.7.1

Plugin version

0.0.42

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When adding the Bedrock provider in Dify with bedrock plugin v0.0.42, saving credentials fails with a TypeError: “BedrockLargeLanguageModel.validate_credentials() missing 1 required positional argument: ‘self’”.

✔️ Error log

api-1 | 2025-10-17 07:33:29.294 ERROR [Dummy-1] [app.py:875] - Exception on /console/api/workspaces/current/model-providers/langgenius/bedrock/bedrock [POST]
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_restful/__init__.py", line 489, 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_restful/__init__.py", line 604, in dispatch_request
api-1 | resp = meth(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/controllers/console/wraps.py", line 210, in decorated
api-1 | return view(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/libs/login.py", line 61, 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 31, in decorated
api-1 | return view(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/controllers/console/workspace/model_providers.py", line 102, in post
api-1 | model_provider_service.save_provider_credentials(
api-1 | File "/app/api/services/model_provider_service.py", line 145, in save_provider_credentials
api-1 | provider_configuration.add_or_update_custom_credentials(credentials)
api-1 | File "/app/api/core/entities/provider_configuration.py", line 257, in add_or_update_custom_credentials
api-1 | provider_record, credentials = self.custom_credentials_validate(credentials)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/core/entities/provider_configuration.py", line 240, in custom_credentials_validate
api-1 | credentials = model_provider_factory.provider_credentials_validate(
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File "/app/api/core/model_runtime/model_providers/model_provider_factory.py", line 156, in provider_credentials_validate
api-1 | self.plugin_model_manager.validate_provider_credentials(
api-1 | File "/app/api/core/plugin/impl/model.py", line 97, in validate_provider_credentials
api-1 | for resp in response:
api-1 | ^^^^^^^^
api-1 | File "/app/api/core/plugin/impl/base.py", line 211, in _request_with_plugin_daemon_response_stream
api-1 | self._handle_plugin_daemon_error(error.error_type, error.message)
api-1 | File "/app/api/core/plugin/impl/base.py", line 245, in _handle_plugin_daemon_error
api-1 | raise PluginInvokeError(description=message)
api-1 | core.plugin.impl.exc.PluginInvokeError: PluginInvokeError: {"args":{},"error_type":"TypeError","message":"BedrockLargeLanguageModel.validate_credentials() missing 1 required positional argument: 'self'"}

Originally created by @stealthinu on GitHub (Oct 19, 2025). ### Self Checks - [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 [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.9.1 / 1.7.1 ### Plugin version 0.0.42 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When adding the Bedrock provider in Dify with bedrock plugin v0.0.42, saving credentials fails with a TypeError: “BedrockLargeLanguageModel.validate_credentials() missing 1 required positional argument: ‘self’”. ### ✔️ Error log api-1 | 2025-10-17 07:33:29.294 ERROR [Dummy-1] [app.py:875] - Exception on /console/api/workspaces/current/model-providers/langgenius/bedrock/bedrock [POST] 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_restful/__init__.py", line 489, 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_restful/__init__.py", line 604, in dispatch_request api-1 | resp = meth(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/controllers/console/wraps.py", line 210, in decorated api-1 | return view(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/libs/login.py", line 61, 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 31, in decorated api-1 | return view(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/controllers/console/workspace/model_providers.py", line 102, in post api-1 | model_provider_service.save_provider_credentials( api-1 | File "/app/api/services/model_provider_service.py", line 145, in save_provider_credentials api-1 | provider_configuration.add_or_update_custom_credentials(credentials) api-1 | File "/app/api/core/entities/provider_configuration.py", line 257, in add_or_update_custom_credentials api-1 | provider_record, credentials = self.custom_credentials_validate(credentials) api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/core/entities/provider_configuration.py", line 240, in custom_credentials_validate api-1 | credentials = model_provider_factory.provider_credentials_validate( api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/core/model_runtime/model_providers/model_provider_factory.py", line 156, in provider_credentials_validate api-1 | self.plugin_model_manager.validate_provider_credentials( api-1 | File "/app/api/core/plugin/impl/model.py", line 97, in validate_provider_credentials api-1 | for resp in response: api-1 | ^^^^^^^^ api-1 | File "/app/api/core/plugin/impl/base.py", line 211, in _request_with_plugin_daemon_response_stream api-1 | self._handle_plugin_daemon_error(error.error_type, error.message) api-1 | File "/app/api/core/plugin/impl/base.py", line 245, in _handle_plugin_daemon_error api-1 | raise PluginInvokeError(description=message) api-1 | core.plugin.impl.exc.PluginInvokeError: PluginInvokeError: {"args":{},"error_type":"TypeError","message":"BedrockLargeLanguageModel.validate_credentials() missing 1 required positional argument: 'self'"}
yindo added the bug label 2026-02-16 10:20:20 -05:00
yindo closed this issue 2026-02-16 10:20:20 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 5, 2025):

Hi, @stealthinu. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported a TypeError when saving Bedrock provider credentials using Bedrock plugin v0.0.42.
  • The error occurs with Dify versions 1.9.1 and 1.7.1 in a self-hosted Docker environment.
  • The traceback indicates a missing 'self' argument in the validate_credentials method during a POST request.
  • No further comments or updates have been provided since the initial report.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting below.
  • If I do not hear back within 5 days, I will automatically close this issue.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Nov 5, 2025): Hi, @stealthinu. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported a TypeError when saving Bedrock provider credentials using Bedrock plugin v0.0.42. - The error occurs with Dify versions 1.9.1 and 1.7.1 in a self-hosted Docker environment. - The traceback indicates a missing 'self' argument in the `validate_credentials` method during a POST request. - No further comments or updates have been provided since the initial report. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting below. - If I do not hear back within 5 days, I will automatically close this issue. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#734