fix: enable scope checking for block credentials (consistency with graphs)

Previously run_block didn't check OAuth2 scopes while run_agent did.
Now both use the same scope-checking logic for credential matching.
This commit is contained in:
Otto
2026-02-03 13:19:15 +00:00
parent ff8ca11845
commit d8909af967

View File

@@ -138,11 +138,7 @@ class RunBlockTool(BaseTool):
if not requirements:
return {}, []
# Note: check_scopes=False preserves original run_block behavior which
# didn't verify OAuth2 scopes. Graph matching (run_agent) does check scopes.
return await match_credentials_to_requirements(
user_id, requirements, check_scopes=False
)
return await match_credentials_to_requirements(user_id, requirements)
async def _execute(
self,