You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/07/21 07:36:00 UTC
[jira] [Resolved] (CAMEL-23946) camel-langchain4j-web-search: safeSearch option is ignored - safe search cannot be disabled
[ https://issues.apache.org/jira/browse/CAMEL-23946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-23946.
---------------------------------
Resolution: Fixed
Fixed via https://github.com/apache/camel/pull/24962
> camel-langchain4j-web-search: safeSearch option is ignored - safe search cannot be disabled
> -------------------------------------------------------------------------------------------
>
> Key: CAMEL-23946
> URL: https://issues.apache.org/jira/browse/CAMEL-23946
> Project: Camel
> Issue Type: Bug
> Components: camel-langchain4j-web-search
> Affects Versions: 4.21.0
> Reporter: Federico Mariani
> Assignee: Omar Atie
> Priority: Major
> Fix For: 4.22.0
>
> Attachments: LangChain4jWebSearchSafeSearchTest.java
>
>
> {{LangChain4jWebSearchConfiguration}} exposes and documents the {{safeSearch}} option, but {{LangChain4jWebSearchProducer}} never passes it to the {{WebSearchRequest}} builder ({{LangChain4jWebSearchProducer.java:51-59}} sets searchTerms/maxResults/language/geoLocation/startPage/startIndex/additionalParams — {{.safeSearch(...)}} is missing).
> Since {{WebSearchRequest}} defaults {{safeSearch}} to {{true}}, the observable effect is that *safe search cannot be disabled*: an endpoint configured with {{safeSearch=false}} still sends {{safeSearch=true}} to the search engine.
> Attached reproducer {{LangChain4jWebSearchSafeSearchTest}} uses a capturing stub {{WebSearchEngine}} with {{safeSearch=false}} on the endpoint and asserts the request carries {{false}} — it fails because the engine receives {{true}}.
> *Fix*: add {{.safeSearch(getEndpoint().getConfiguration().getSafeSearch())}} to the builder chain.
> _This issue was drafted by Claude Code on behalf of Federico Mariani._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)