Skip to content

feat: support oauth scope param#34995

Open
fatelei wants to merge 2 commits intolanggenius:mainfrom
fatelei:issue-34964
Open

feat: support oauth scope param#34995
fatelei wants to merge 2 commits intolanggenius:mainfrom
fatelei:issue-34964

Conversation

@fatelei
Copy link
Copy Markdown
Contributor

@fatelei fatelei commented Apr 12, 2026

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

fix #34964

Summary

support oauth scope param in mcp oauth config page

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. 💪 enhancement New feature or request labels Apr 12, 2026
@github-actions github-actions bot added web This relates to changes on the web. and removed 💪 enhancement New feature or request labels Apr 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-12 13:28:59.465823100 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-12 13:28:50.918788133 +0000
@@ -3731,7 +3731,7 @@
 ERROR Argument `None` is not assignable to parameter `description` with type `bytearray | bytes | str` in function `core.entities.knowledge_entities.PipelineDataset.__init__` [bad-argument-type]
   --> tests/unit_tests/core/entities/test_entities_knowledge_entities.py:13:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `db_provider` with type `MCPToolProvider` in function `core.entities.mcp_provider.MCPProviderEntity.from_db_model` [bad-argument-type]
-  --> tests/unit_tests/core/entities/test_entities_mcp_provider.py:59:46
+  --> tests/unit_tests/core/entities/test_entities_mcp_provider.py:60:46
 ERROR `None` is not subscriptable [unsupported-operation]
    --> tests/unit_tests/core/entities/test_entities_provider_configuration.py:639:12
 ERROR Argument `SimpleNamespace` is not assignable to parameter `credential_record` with type `ProviderCredential | ProviderModelCredential` in function `core.entities.provider_configuration.ProviderConfiguration._update_load_balancing_configs_with_credential` [bad-argument-type]

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-13 00:49:59.053259908 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-13 00:49:50.271293556 +0000
@@ -3731,7 +3731,7 @@
 ERROR Argument `None` is not assignable to parameter `description` with type `bytearray | bytes | str` in function `core.entities.knowledge_entities.PipelineDataset.__init__` [bad-argument-type]
   --> tests/unit_tests/core/entities/test_entities_knowledge_entities.py:13:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `db_provider` with type `MCPToolProvider` in function `core.entities.mcp_provider.MCPProviderEntity.from_db_model` [bad-argument-type]
-  --> tests/unit_tests/core/entities/test_entities_mcp_provider.py:59:46
+  --> tests/unit_tests/core/entities/test_entities_mcp_provider.py:60:46
 ERROR `None` is not subscriptable [unsupported-operation]
    --> tests/unit_tests/core/entities/test_entities_provider_configuration.py:639:12
 ERROR Argument `SimpleNamespace` is not assignable to parameter `credential_record` with type `ProviderCredential | ProviderModelCredential` in function `core.entities.provider_configuration.ProviderConfiguration._update_load_balancing_configs_with_credential` [bad-argument-type]

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-15 06:14:18.637291143 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-15 06:14:08.161278978 +0000
@@ -3908,7 +3908,7 @@
 ERROR Argument `None` is not assignable to parameter `description` with type `bytearray | bytes | str` in function `core.entities.knowledge_entities.PipelineDataset.__init__` [bad-argument-type]
   --> tests/unit_tests/core/entities/test_entities_knowledge_entities.py:13:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `db_provider` with type `MCPToolProvider` in function `core.entities.mcp_provider.MCPProviderEntity.from_db_model` [bad-argument-type]
-  --> tests/unit_tests/core/entities/test_entities_mcp_provider.py:59:46
+  --> tests/unit_tests/core/entities/test_entities_mcp_provider.py:60:46
 ERROR `None` is not subscriptable [unsupported-operation]
    --> tests/unit_tests/core/entities/test_entities_provider_configuration.py:639:12
 ERROR Argument `SimpleNamespace` is not assignable to parameter `credential_record` with type `ProviderCredential | ProviderModelCredential` in function `core.entities.provider_configuration.ProviderConfiguration._update_load_balancing_configs_with_credential` [bad-argument-type]

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-15 06:18:27.452371023 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-15 06:18:16.980408886 +0000
@@ -3908,7 +3908,7 @@
 ERROR Argument `None` is not assignable to parameter `description` with type `bytearray | bytes | str` in function `core.entities.knowledge_entities.PipelineDataset.__init__` [bad-argument-type]
   --> tests/unit_tests/core/entities/test_entities_knowledge_entities.py:13:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `db_provider` with type `MCPToolProvider` in function `core.entities.mcp_provider.MCPProviderEntity.from_db_model` [bad-argument-type]
-  --> tests/unit_tests/core/entities/test_entities_mcp_provider.py:59:46
+  --> tests/unit_tests/core/entities/test_entities_mcp_provider.py:60:46
 ERROR `None` is not subscriptable [unsupported-operation]
    --> tests/unit_tests/core/entities/test_entities_provider_configuration.py:639:12
 ERROR Argument `SimpleNamespace` is not assignable to parameter `credential_record` with type `ProviderCredential | ProviderModelCredential` in function `core.entities.provider_configuration.ProviderConfiguration._update_load_balancing_configs_with_credential` [bad-argument-type]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Support custom scope input for MCP OAuth (Client Credentials) / Deadlock with strict IdPs like AWS Cognito

1 participant