Skip to content

Stop using DuckDuckGoSearchTool - #795

Merged
nforro merged 1 commit into
packit:mainfrom
nforro:ddgs
Sep 3, 2026
Merged

nforro merged 1 commit into
packit:mainfrom
nforro:ddgs

Conversation

@nforro

@nforro nforro commented Sep 3, 2026

Copy link
Copy Markdown
Member

It doesn't work in production and all the unsuccessful attempts only waste tokens.

Signed-off-by: Nikola Forró <nforro@redhat.com>
Assisted-by: Claude Sonnet 5 via Claude Code
@qodo-for-packit

Copy link
Copy Markdown

PR Summary by Qodo

Remove broken DuckDuckGo search from agents

🐞 Bug fix 📝 Documentation ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Remove unreliable web search from six agents to prevent failed, token-wasting calls.
• Align skill documentation with the supported agent toolsets.
• Remove the obsolete Brave Search production egress allowance.
Diagram

graph TD
  SK["Skill Guides"] --> AF["Agent Factories"] --> LT["Local Tools"]
  AF -. "removes" .-> WS["Web Search"]
  TE["Tenant Egress"] -. "removes allowlist" .-> BS["Brave Search"]
Loading
High-Level Assessment

Direct removal is appropriate because the search tool is unreliable in production and unsuccessful calls consume tokens without helping workflows. Retrying calls or introducing another search provider would preserve unnecessary external dependencies without addressing the immediate operational issue.

Files changed (11) +0 / -20

Bug fix (6) +0 / -12
backport_agent.pyDisable DuckDuckGo search for backports +0/-2

Disable DuckDuckGo search for backports

• Removes the DuckDuckGoSearchTool import and excludes it from the backport agent's base tools, preventing failed search attempts.

ymir/agents/backport_agent.py

build_agent.pyDisable DuckDuckGo search for builds +0/-2

Disable DuckDuckGo search for builds

• Removes DuckDuckGoSearchTool from the build agent's imports and configured toolset.

ymir/agents/build_agent.py

cve_applicability_agent.pyDisable DuckDuckGo search for CVE analysis +0/-2

Disable DuckDuckGo search for CVE analysis

• Removes external web search from the CVE applicability agent while retaining local inspection and selected gateway tools.

ymir/agents/cve_applicability_agent.py

log_agent.pyDisable DuckDuckGo search for log analysis +0/-2

Disable DuckDuckGo search for log analysis

• Removes the unreliable search tool from the log agent's imports and runtime toolset.

ymir/agents/log_agent.py

merge_request_agent.pyDisable DuckDuckGo search for merge requests +0/-2

Disable DuckDuckGo search for merge requests

• Removes DuckDuckGoSearchTool from merge-request agent construction to avoid unsuccessful production calls.

ymir/agents/merge_request_agent.py

rebase_agent.pyDisable DuckDuckGo search for rebases +0/-2

Disable DuckDuckGo search for rebases

• Removes the web-search import and tool registration from the rebase agent.

ymir/agents/rebase_agent.py

Documentation (4) +0 / -4
SKILL.mdRemove web search from backport tool documentation +0/-1

Remove web search from backport tool documentation

• Removes DuckDuckGo or equivalent web search from the backport skill's documented toolset, matching the agent's supported capabilities.

agents_as_skills/backport/SKILL.md

SKILL.mdRemove web search from rebase tool documentation +0/-1

Remove web search from rebase tool documentation

• Removes the unsupported web-search capability from the rebase skill's tool list.

agents_as_skills/rebase/SKILL.md

SKILL.mdRemove web search from rebuild tool documentation +0/-1

Remove web search from rebuild tool documentation

• Updates the rebuild skill documentation so it no longer advertises DuckDuckGo or equivalent search.

agents_as_skills/rebuild/SKILL.md

SKILL.mdRemove web search from triage tool documentation +0/-1

Remove web search from triage tool documentation

• Stops directing the triage skill to use web search for upstream repositories, trackers, CVEs, and Fedora packages.

agents_as_skills/triage/SKILL.md

Other (1) +0 / -4
tenant-egress.ymlRemove Brave Search egress access +0/-4

Remove Brave Search egress access

• Deletes the production egress allowlist entry for search.brave.com because no agent uses DuckDuckGoSearchTool.

openshift/tenant-egress.yml

@qodo-for-packit

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Required CVE research unavailable 🐞 Bug ≡ Correctness
Description
ApplicabilityAgent still requires an online CVE lookup when Jira context is insufficient, but this
change removes its only dedicated web-search tool. In that path the agent must either attempt the
same unreliable shell networking this PR aims to eliminate or stop without the information needed
for applicability analysis.
Code

ymir/agents/cve_applicability_agent.py[38]

-            DuckDuckGoSearchTool(),
Relevance

●●● Strong

Accepted precedent supports fixing applicability-path gaps and keeping CVE research guidance aligned
with available tools.

PR-#555
PR-#652

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The updated factory's complete tool list contains local view/search/shell tools and only three
filtered gateway tool types, with no web-search capability. Nevertheless, the runtime prompt
explicitly requires online CVE research when Jira is insufficient; the mirrored triage skill retains
the same requirement, and the runtime prompt warns that shell network requests may be blocked and
must cause the task to stop.

ymir/agents/cve_applicability_agent.py[20-38]
ymir/agents/cve_applicability_agent.py[150-155]
ymir/agents/cve_applicability_agent.py[196-201]
agents_as_skills/triage/SKILL.md[693-699]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The applicability workflow still instructs the agent to search online when Jira lacks sufficient CVE context, although `DuckDuckGoSearchTool` has been removed. Align both the runtime prompt and skill documentation with the tools that remain, or provide a reliable replacement lookup tool.

## Issue Context
The runtime factory now exposes only local file/shell tools and selected Jira/rules gateway tools. The same stale online-search requirement also remains in the standalone triage skill.

## Fix Focus Areas
- ymir/agents/cve_applicability_agent.py[20-38]
- ymir/agents/cve_applicability_agent.py[150-155]
- agents_as_skills/triage/SKILL.md[693-699]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 8 rules

Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread ymir/agents/cve_applicability_agent.py
@nforro
nforro merged commit 6c99551 into packit:main Sep 3, 2026
13 checks passed
@nforro
nforro deleted the ddgs branch September 3, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants