Skip to content

fix: agent tool selector marketplace checks for local and builtin tools#37037

Merged
crazywoola merged 4 commits into
langgenius:mainfrom
leslie2046:codex/fix-agent-plugin-refresh-checks
Jun 4, 2026
Merged

fix: agent tool selector marketplace checks for local and builtin tools#37037
crazywoola merged 4 commits into
langgenius:mainfrom
leslie2046:codex/fix-agent-plugin-refresh-checks

Conversation

@leslie2046
Copy link
Copy Markdown
Contributor

@leslie2046 leslie2046 commented Jun 4, 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>.
    fixes The frontend page reports an error due to adding a local plugin in the agent node #37023

Summary

This PR fixes the agent tool selector refresh flow so builtin tools and locally installed plugins no longer trigger incorrect marketplace requests.

Key changes:

  • Stop inferring plugin IDs directly from provider_name for unresolved tools.
  • Only run marketplace checks when the provider is confirmed to be plugin-backed and the current provider or tool cannot be resolved locally.
  • Preserve marketplace fallback for real marketplace plugins and legacy built-in values where the plugin identity can still be determined safely.
  • Persist plugin_id in ToolValue so refresh/recovery logic can rely on explicit plugin metadata instead of guessing.

This prevents false marketplace lookups such as builtin tools like time and unresolved local plugins after page refresh, while keeping the install/upgrade UX for actual marketplace plugins intact.

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 && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jun 4, 2026
@github-actions github-actions Bot added the web This relates to changes on the web. label Jun 4, 2026
@leslie2046 leslie2046 changed the title fix: fix #37023 fix: agent tool selector marketplace checks for local and builtin tools Jun 4, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 4, 2026
@crazywoola crazywoola added this pull request to the merge queue Jun 4, 2026
Merged via the queue into langgenius:main with commit b77f5f1 Jun 4, 2026
32 checks passed
@leslie2046 leslie2046 deleted the codex/fix-agent-plugin-refresh-checks branch June 4, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer 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.

The frontend page reports an error due to adding a local plugin in the agent node

2 participants