This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 68de82e65032 CAMEL-24767: camel-ai - toolSearchStrategy enum values
should match the enum constants (#28528)
68de82e65032 is described below
commit 68de82e6503286d2a2adf15bc691f6964f199fa4
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Oct 26 20:21:59 2026 +0100
CAMEL-24767: camel-ai - toolSearchStrategy enum values should match the
enum constants (#28528)
The toolSearchStrategy option in camel-langchain4j-agent, camel-openai and
camel-spring-ai-chat documented the enum values as keyword,vector while the
AiToolSearchStrategy enum constants are KEYWORD,VECTOR. This is not tooling
friendly, for example camel-spring-boot generated
AiToolSearchStrategy.keyword
which does not compile.
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
---
.../catalog/components/langchain4j-agent.json | 8 ++---
.../org/apache/camel/catalog/components/llm.json | 4 +--
.../apache/camel/catalog/components/openai.json | 4 +--
.../camel/catalog/components/spring-ai-chat.json | 4 +--
.../catalog/docs/langchain4j-agent-component.adoc | 2 +-
.../org/apache/camel/catalog/docs/openai-mcp.adoc | 4 +--
.../catalog/docs/spring-ai-chat-component.adoc | 2 +-
.../langchain4j/agent/langchain4j-agent.json | 8 ++---
.../src/main/docs/langchain4j-agent-component.adoc | 2 +-
.../agent/LangChain4jAgentConfiguration.java | 8 ++---
.../agent/LangChain4jAgentProducer.java | 2 +-
.../agent/LangChain4jAgentToolSearchTest.java | 2 +-
.../org/apache/camel/component/openai/llm.json | 4 +--
.../org/apache/camel/component/openai/openai.json | 4 +--
.../camel-openai/src/main/docs/openai-mcp.adoc | 4 +--
.../component/openai/OpenAIConfiguration.java | 8 ++---
.../camel/component/openai/OpenAIToolSearch.java | 2 +-
.../component/openai/OpenAIToolSearchMockTest.java | 4 +--
.../component/springai/chat/spring-ai-chat.json | 4 +--
.../src/main/docs/spring-ai-chat-component.adoc | 2 +-
.../springai/chat/SpringAiChatConfiguration.java | 8 ++---
.../springai/chat/SpringAiToolSearch.java | 2 +-
.../springai/chat/SpringAiChatToolSearchTest.java | 2 +-
.../Langchain4jAgentComponentBuilderFactory.java | 8 ++---
.../LangChain4jAgentEndpointBuilderFactory.java | 16 ++++-----
.../endpoint/dsl/OpenAIEndpointBuilderFactory.java | 42 +++++++++++-----------
.../dsl/SpringAiChatEndpointBuilderFactory.java | 16 ++++-----
27 files changed, 88 insertions(+), 88 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/langchain4j-agent.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/langchain4j-agent.json
index 57a6dbc6cac5..725bac3f9159 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/langchain4j-agent.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/langchain4j-agent.json
@@ -36,9 +36,9 @@
"outputClass": { "index": 9, "kind": "property", "displayName": "Output
Class", "group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.Class<java.lang.Object>", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Java class to use for
structured output. Camel deriv [...]
"tags": { "index": 10, "kind": "property", "displayName": "Tags", "group":
"producer", "label": "", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Tags for discovering and
calling Camel route tools" },
"toolSearch": { "index": 11, "kind": "property", "displayName": "Tool
Search", "group": "producer", "label": "producer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "defaultValue": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "When true, route tools
marked searchable and re [...]
- "toolSearchEmbeddingModel": { "index": 12, "kind": "property",
"displayName": "Tool Search Embedding Model", "group": "producer", "label":
"producer", "required": false, "type": "object", "javaType":
"dev.langchain4j.model.embedding.EmbeddingModel", "deprecated": false,
"deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Lan [...]
+ "toolSearchEmbeddingModel": { "index": 12, "kind": "property",
"displayName": "Tool Search Embedding Model", "group": "producer", "label":
"producer", "required": false, "type": "object", "javaType":
"dev.langchain4j.model.embedding.EmbeddingModel", "deprecated": false,
"deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Lan [...]
"toolSearchMaxResults": { "index": 13, "kind": "property", "displayName":
"Tool Search Max Results", "group": "producer", "label": "producer",
"required": false, "type": "integer", "javaType": "int", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 5,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Maximum number of tools
returned [...]
- "toolSearchStrategy": { "index": 14, "kind": "property", "displayName":
"Tool Search Strategy", "group": "producer", "label": "producer", "required":
false, "type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "keyword",
"vector" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "keyword", "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"co [...]
+ "toolSearchStrategy": { "index": 14, "kind": "property", "displayName":
"Tool Search Strategy", "group": "producer", "label": "producer", "required":
false, "type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "KEYWORD",
"VECTOR" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "KEYWORD", "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"co [...]
"autowiredEnabled": { "index": 15, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching [...]
"mcpClients": { "index": 16, "kind": "property", "displayName": "Mcp
Clients", "group": "advanced", "label": "advanced", "required": false, "type":
"array", "javaType": "java.util.List<dev.langchain4j.mcp.client.McpClient>",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Pre-built MCP (Model
Context Protocol) client inst [...]
"mcpServer": { "index": 17, "kind": "property", "displayName": "Mcp
Server", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>",
"prefix": "mcpServer.", "multiValue": true, "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "MCP server [...]
@@ -84,9 +84,9 @@
"outputClass": { "index": 8, "kind": "parameter", "displayName": "Output
Class", "group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.Class<java.lang.Object>", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Java class to use for
structured output. Camel deri [...]
"tags": { "index": 9, "kind": "parameter", "displayName": "Tags", "group":
"producer", "label": "", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Tags for discovering and
calling Camel route tools" },
"toolSearch": { "index": 10, "kind": "parameter", "displayName": "Tool
Search", "group": "producer", "label": "producer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "defaultValue": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "When true, route tools
marked searchable and r [...]
- "toolSearchEmbeddingModel": { "index": 11, "kind": "parameter",
"displayName": "Tool Search Embedding Model", "group": "producer", "label":
"producer", "required": false, "type": "object", "javaType":
"dev.langchain4j.model.embedding.EmbeddingModel", "deprecated": false,
"deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "La [...]
+ "toolSearchEmbeddingModel": { "index": 11, "kind": "parameter",
"displayName": "Tool Search Embedding Model", "group": "producer", "label":
"producer", "required": false, "type": "object", "javaType":
"dev.langchain4j.model.embedding.EmbeddingModel", "deprecated": false,
"deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "La [...]
"toolSearchMaxResults": { "index": 12, "kind": "parameter", "displayName":
"Tool Search Max Results", "group": "producer", "label": "producer",
"required": false, "type": "integer", "javaType": "int", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 5,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Maximum number of tools
returned [...]
- "toolSearchStrategy": { "index": 13, "kind": "parameter", "displayName":
"Tool Search Strategy", "group": "producer", "label": "producer", "required":
false, "type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "keyword",
"vector" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "keyword", "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"c [...]
+ "toolSearchStrategy": { "index": 13, "kind": "parameter", "displayName":
"Tool Search Strategy", "group": "producer", "label": "producer", "required":
false, "type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "KEYWORD",
"VECTOR" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "KEYWORD", "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"c [...]
"lazyStartProducer": { "index": 14, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
"mcpClients": { "index": 15, "kind": "parameter", "displayName": "Mcp
Clients", "group": "advanced", "label": "advanced", "required": false, "type":
"array", "javaType": "java.util.List<dev.langchain4j.mcp.client.McpClient>",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Pre-built MCP (Model
Context Protocol) client ins [...]
"mcpServer": { "index": 16, "kind": "parameter", "displayName": "Mcp
Server", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>",
"prefix": "mcpServer.", "multiValue": true, "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "MCP serve [...]
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/llm.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/llm.json
index 51fb669ee15e..a9e3dd8a82bb 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/llm.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/llm.json
@@ -234,9 +234,9 @@
"temperature": { "index": 77, "kind": "parameter", "displayName":
"Temperature", "group": "common", "label": "", "required": false, "type":
"number", "javaType": "java.lang.Double", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false,
"configurationClass": "org.apache.camel.component.openai.OpenAIConfiguration",
"configurationField": "configuration", "description": "Temperature for response
generation (0.0 to 2.0)" },
"toolExecutionErrorStrategy": { "index": 78, "kind": "parameter",
"displayName": "Tool Execution Error Strategy", "group": "common", "label": "",
"required": false, "type": "enum", "javaType":
"org.apache.camel.component.openai.ToolExecutionErrorStrategy", "enum": [
"failExchange", "repromptModel" ], "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "defaultValue": "failExchange",
"configurationClass": "org.apache.camel.component.openai.OpenAIConfigurat [...]
"toolSearch": { "index": 79, "kind": "parameter", "displayName": "Tool
Search", "group": "common", "label": "", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "When true, route tools marked searchable and
remote MCP tools are omitted fro [...]
- "toolSearchEmbeddingModel": { "index": 80, "kind": "parameter",
"displayName": "Tool Search Embedding Model", "group": "common", "label": "",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Embedding model used when
toolSearchStrategy=vector, for examp [...]
+ "toolSearchEmbeddingModel": { "index": 80, "kind": "parameter",
"displayName": "Tool Search Embedding Model", "group": "common", "label": "",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Embedding model used when
toolSearchStrategy=VECTOR, for examp [...]
"toolSearchMaxResults": { "index": 81, "kind": "parameter", "displayName":
"Tool Search Max Results", "group": "common", "label": "", "required": false,
"type": "integer", "javaType": "int", "deprecated": false, "deprecationNote":
"", "autowired": false, "secret": false, "defaultValue": 5,
"configurationClass": "org.apache.camel.component.openai.OpenAIConfiguration",
"configurationField": "configuration", "description": "Maximum number of tools
returned by one tool search. Route and [...]
- "toolSearchStrategy": { "index": 82, "kind": "parameter", "displayName":
"Tool Search Strategy", "group": "common", "label": "", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "keyword",
"vector" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "keyword", "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configurat [...]
+ "toolSearchStrategy": { "index": 82, "kind": "parameter", "displayName":
"Tool Search Strategy", "group": "common", "label": "", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "KEYWORD",
"VECTOR" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "KEYWORD", "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configurat [...]
"topP": { "index": 83, "kind": "parameter", "displayName": "Top P",
"group": "common", "label": "", "required": false, "type": "number",
"javaType": "java.lang.Double", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Top P for response generation (0.0 to 1.0)" },
"userMessage": { "index": 84, "kind": "parameter", "displayName": "User
Message", "group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Default user message text to use when no
prompt is provided" },
"writeTimeout": { "index": 85, "kind": "parameter", "displayName": "Write
Timeout", "group": "common", "label": "", "required": false, "type": "integer",
"javaType": "long", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Timeout in milliseconds for writing the
request body, which matters for large pa [...]
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/openai.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/openai.json
index 2b7d671bf66d..23f7ebdf0b30 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/openai.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/openai.json
@@ -234,9 +234,9 @@
"temperature": { "index": 77, "kind": "parameter", "displayName":
"Temperature", "group": "common", "label": "", "required": false, "type":
"number", "javaType": "java.lang.Double", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false,
"configurationClass": "org.apache.camel.component.openai.OpenAIConfiguration",
"configurationField": "configuration", "description": "Temperature for response
generation (0.0 to 2.0)" },
"toolExecutionErrorStrategy": { "index": 78, "kind": "parameter",
"displayName": "Tool Execution Error Strategy", "group": "common", "label": "",
"required": false, "type": "enum", "javaType":
"org.apache.camel.component.openai.ToolExecutionErrorStrategy", "enum": [
"failExchange", "repromptModel" ], "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "defaultValue": "failExchange",
"configurationClass": "org.apache.camel.component.openai.OpenAIConfigurat [...]
"toolSearch": { "index": 79, "kind": "parameter", "displayName": "Tool
Search", "group": "common", "label": "", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "When true, route tools marked searchable and
remote MCP tools are omitted fro [...]
- "toolSearchEmbeddingModel": { "index": 80, "kind": "parameter",
"displayName": "Tool Search Embedding Model", "group": "common", "label": "",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Embedding model used when
toolSearchStrategy=vector, for examp [...]
+ "toolSearchEmbeddingModel": { "index": 80, "kind": "parameter",
"displayName": "Tool Search Embedding Model", "group": "common", "label": "",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Embedding model used when
toolSearchStrategy=VECTOR, for examp [...]
"toolSearchMaxResults": { "index": 81, "kind": "parameter", "displayName":
"Tool Search Max Results", "group": "common", "label": "", "required": false,
"type": "integer", "javaType": "int", "deprecated": false, "deprecationNote":
"", "autowired": false, "secret": false, "defaultValue": 5,
"configurationClass": "org.apache.camel.component.openai.OpenAIConfiguration",
"configurationField": "configuration", "description": "Maximum number of tools
returned by one tool search. Route and [...]
- "toolSearchStrategy": { "index": 82, "kind": "parameter", "displayName":
"Tool Search Strategy", "group": "common", "label": "", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "keyword",
"vector" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "keyword", "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configurat [...]
+ "toolSearchStrategy": { "index": 82, "kind": "parameter", "displayName":
"Tool Search Strategy", "group": "common", "label": "", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "KEYWORD",
"VECTOR" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "KEYWORD", "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configurat [...]
"topP": { "index": 83, "kind": "parameter", "displayName": "Top P",
"group": "common", "label": "", "required": false, "type": "number",
"javaType": "java.lang.Double", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Top P for response generation (0.0 to 1.0)" },
"userMessage": { "index": 84, "kind": "parameter", "displayName": "User
Message", "group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Default user message text to use when no
prompt is provided" },
"writeTimeout": { "index": 85, "kind": "parameter", "displayName": "Write
Timeout", "group": "common", "label": "", "required": false, "type": "integer",
"javaType": "long", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Timeout in milliseconds for writing the
request body, which matters for large pa [...]
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/spring-ai-chat.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/spring-ai-chat.json
index 7e80f5d0d06c..604b4df4b1c9 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/spring-ai-chat.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/spring-ai-chat.json
@@ -75,9 +75,9 @@
"tags": { "index": 5, "kind": "parameter", "displayName": "Tags", "group":
"producer", "label": "", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configurationField": "configuration", "description": "Tags for discovering and
calling Camel route tools" },
"toolNames": { "index": 6, "kind": "parameter", "displayName": "Tool
Names", "group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configurationField": "configuration", "description": "Comma-separated tool
names for selecting tools by name. Names are resolved against a
ToolCallbackResolv [...]
"toolSearch": { "index": 7, "kind": "parameter", "displayName": "Tool
Search", "group": "producer", "label": "producer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "defaultValue": false,
"configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configurationField": "configuration", "description": "When true, route tools
marked searchable and remote MCP [...]
- "toolSearchEmbeddingModel": { "index": 8, "kind": "parameter",
"displayName": "Tool Search Embedding Model", "group": "producer", "label":
"producer", "required": false, "type": "object", "javaType":
"org.springframework.ai.embedding.EmbeddingModel", "deprecated": false,
"deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configurationField": "configuration", "description": "Spring AI [...]
+ "toolSearchEmbeddingModel": { "index": 8, "kind": "parameter",
"displayName": "Tool Search Embedding Model", "group": "producer", "label":
"producer", "required": false, "type": "object", "javaType":
"org.springframework.ai.embedding.EmbeddingModel", "deprecated": false,
"deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configurationField": "configuration", "description": "Spring AI [...]
"toolSearchMaxResults": { "index": 9, "kind": "parameter", "displayName":
"Tool Search Max Results", "group": "producer", "label": "producer",
"required": false, "type": "integer", "javaType": "int", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 5,
"configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configurationField": "configuration", "description": "Maximum number of tools
returned by one t [...]
- "toolSearchStrategy": { "index": 10, "kind": "parameter", "displayName":
"Tool Search Strategy", "group": "producer", "label": "producer", "required":
false, "type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "keyword",
"vector" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "keyword", "configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configura [...]
+ "toolSearchStrategy": { "index": 10, "kind": "parameter", "displayName":
"Tool Search Strategy", "group": "producer", "label": "producer", "required":
false, "type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "KEYWORD",
"VECTOR" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "KEYWORD", "configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configura [...]
"userMessage": { "index": 11, "kind": "parameter", "displayName": "User
Message", "group": "producer", "label": "", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configurationField": "configuration", "description": "Default user message
text for multimodal requests. Can be combined with media data in the message
[...]
"lazyStartProducer": { "index": 12, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
"advisors": { "index": 13, "kind": "parameter", "displayName": "Advisors",
"group": "advanced", "label": "advanced", "required": false, "type": "array",
"javaType":
"java.util.List<org.springframework.ai.chat.client.advisor.api.Advisor>",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configurationField": "configuration", "description": "List of custom adviso
[...]
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/langchain4j-agent-component.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/langchain4j-agent-component.adoc
index 53cad52144d4..16fd8cd9dac6 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/langchain4j-agent-component.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/langchain4j-agent-component.adoc
@@ -318,7 +318,7 @@ from("direct:start")
Enabling tool search does not skip MCP `tools/list`. It only reduces the
definitions sent to the model. `toolSearch=false` (the default) sends the
current combined set, and the `searchable` flag has no effect.
-`toolSearchStrategy=vector` requires an autowired `toolSearchEmbeddingModel`
and does not fall back to keyword search. A dynamic tool provider registered
outside Camel's composite is refreshed by LangChain4j after search and is not
part of this catalogue. Tool search is only applied in inline agent creation
mode.
+`toolSearchStrategy=VECTOR` requires an autowired `toolSearchEmbeddingModel`
and does not fall back to keyword search. A dynamic tool provider registered
outside Camel's composite is refreshed by LangChain4j after search and is not
part of this catalogue. Tool search is only applied in inline agent creation
mode.
[source,yaml]
----
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-mcp.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-mcp.adoc
index 58676f384848..cef6118bb38a 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-mcp.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-mcp.adoc
@@ -479,7 +479,7 @@ Route-based tools registered via the
xref:components::ai-tool-component.adoc[ai-
Enabling tool search does not skip MCP `tools/list`. It only reduces the
definitions sent to the model. `toolSearch=false` (the default) sends the
current combined set, and the `searchable` flag has no effect.
-`toolSearchStrategy=keyword` (the default) matches the tool name and
description. `toolSearchStrategy=vector` requires `toolSearchEmbeddingModel`
and does not fall back to keyword search. `toolSearchMaxResults` defaults to 5.
With `conversationMemory=true`, discovered names remain available across manual
tool-loop steps on the same exchange, even when no session ID is supplied. To
retain discoveries across separate exchanges, enable `conversationMemory=true`
on `openai:chat-completion` a [...]
+`toolSearchStrategy=KEYWORD` (the default) matches the tool name and
description. `toolSearchStrategy=VECTOR` requires `toolSearchEmbeddingModel`
and does not fall back to keyword search. `toolSearchMaxResults` defaults to 5.
With `conversationMemory=true`, discovered names remain available across manual
tool-loop steps on the same exchange, even when no session ID is supplied. To
retain discoveries across separate exchanges, enable `conversationMemory=true`
on `openai:chat-completion` a [...]
[source,yaml]
----
@@ -494,7 +494,7 @@ Enabling tool search does not skip MCP `tools/list`. It
only reduces the definit
tags: erp
toolSearch: true
toolSearchMaxResults: 5
- toolSearchStrategy: keyword
+ toolSearchStrategy: KEYWORD
----
=== MCP Tool Call Headers
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/spring-ai-chat-component.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/spring-ai-chat-component.adoc
index 000b9689d5b8..7f2309bcb07f 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/spring-ai-chat-component.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/spring-ai-chat-component.adoc
@@ -1013,7 +1013,7 @@ available tools. You can combine `toolNames` with `tags`
— both tool sources a
Enabling tool search does not skip MCP `tools/list`. It only reduces the
definitions sent to the model. `toolSearch=false` (the default) sends the
current combined set, and the `searchable` flag has no effect.
-Camel has to build the `ChatClient` from `chatModel`. A prebuilt `chatClient`
cannot install the search advisor and fails at startup when `toolSearch=true`.
`toolSearchStrategy=vector` requires an autowired `toolSearchEmbeddingModel`
and does not fall back to keyword search. Retained discoveries are keyed by
`CamelSpringAiChatConversationId`. Sessions expire after 30 minutes of
inactivity and each `SpringAiToolSearch` instance retains at most 10,000
sessions, evicting the least-recently- [...]
+Camel has to build the `ChatClient` from `chatModel`. A prebuilt `chatClient`
cannot install the search advisor and fails at startup when `toolSearch=true`.
`toolSearchStrategy=VECTOR` requires an autowired `toolSearchEmbeddingModel`
and does not fall back to keyword search. Retained discoveries are keyed by
`CamelSpringAiChatConversationId`. Sessions expire after 30 minutes of
inactivity and each `SpringAiToolSearch` instance retains at most 10,000
sessions, evicting the least-recently- [...]
[source,yaml]
----
diff --git
a/components/camel-ai/camel-langchain4j-agent/src/generated/resources/META-INF/org/apache/camel/component/langchain4j/agent/langchain4j-agent.json
b/components/camel-ai/camel-langchain4j-agent/src/generated/resources/META-INF/org/apache/camel/component/langchain4j/agent/langchain4j-agent.json
index 57a6dbc6cac5..725bac3f9159 100644
---
a/components/camel-ai/camel-langchain4j-agent/src/generated/resources/META-INF/org/apache/camel/component/langchain4j/agent/langchain4j-agent.json
+++
b/components/camel-ai/camel-langchain4j-agent/src/generated/resources/META-INF/org/apache/camel/component/langchain4j/agent/langchain4j-agent.json
@@ -36,9 +36,9 @@
"outputClass": { "index": 9, "kind": "property", "displayName": "Output
Class", "group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.Class<java.lang.Object>", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Java class to use for
structured output. Camel deriv [...]
"tags": { "index": 10, "kind": "property", "displayName": "Tags", "group":
"producer", "label": "", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Tags for discovering and
calling Camel route tools" },
"toolSearch": { "index": 11, "kind": "property", "displayName": "Tool
Search", "group": "producer", "label": "producer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "defaultValue": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "When true, route tools
marked searchable and re [...]
- "toolSearchEmbeddingModel": { "index": 12, "kind": "property",
"displayName": "Tool Search Embedding Model", "group": "producer", "label":
"producer", "required": false, "type": "object", "javaType":
"dev.langchain4j.model.embedding.EmbeddingModel", "deprecated": false,
"deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Lan [...]
+ "toolSearchEmbeddingModel": { "index": 12, "kind": "property",
"displayName": "Tool Search Embedding Model", "group": "producer", "label":
"producer", "required": false, "type": "object", "javaType":
"dev.langchain4j.model.embedding.EmbeddingModel", "deprecated": false,
"deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Lan [...]
"toolSearchMaxResults": { "index": 13, "kind": "property", "displayName":
"Tool Search Max Results", "group": "producer", "label": "producer",
"required": false, "type": "integer", "javaType": "int", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 5,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Maximum number of tools
returned [...]
- "toolSearchStrategy": { "index": 14, "kind": "property", "displayName":
"Tool Search Strategy", "group": "producer", "label": "producer", "required":
false, "type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "keyword",
"vector" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "keyword", "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"co [...]
+ "toolSearchStrategy": { "index": 14, "kind": "property", "displayName":
"Tool Search Strategy", "group": "producer", "label": "producer", "required":
false, "type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "KEYWORD",
"VECTOR" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "KEYWORD", "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"co [...]
"autowiredEnabled": { "index": 15, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching [...]
"mcpClients": { "index": 16, "kind": "property", "displayName": "Mcp
Clients", "group": "advanced", "label": "advanced", "required": false, "type":
"array", "javaType": "java.util.List<dev.langchain4j.mcp.client.McpClient>",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Pre-built MCP (Model
Context Protocol) client inst [...]
"mcpServer": { "index": 17, "kind": "property", "displayName": "Mcp
Server", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>",
"prefix": "mcpServer.", "multiValue": true, "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "MCP server [...]
@@ -84,9 +84,9 @@
"outputClass": { "index": 8, "kind": "parameter", "displayName": "Output
Class", "group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.Class<java.lang.Object>", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Java class to use for
structured output. Camel deri [...]
"tags": { "index": 9, "kind": "parameter", "displayName": "Tags", "group":
"producer", "label": "", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Tags for discovering and
calling Camel route tools" },
"toolSearch": { "index": 10, "kind": "parameter", "displayName": "Tool
Search", "group": "producer", "label": "producer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "defaultValue": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "When true, route tools
marked searchable and r [...]
- "toolSearchEmbeddingModel": { "index": 11, "kind": "parameter",
"displayName": "Tool Search Embedding Model", "group": "producer", "label":
"producer", "required": false, "type": "object", "javaType":
"dev.langchain4j.model.embedding.EmbeddingModel", "deprecated": false,
"deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "La [...]
+ "toolSearchEmbeddingModel": { "index": 11, "kind": "parameter",
"displayName": "Tool Search Embedding Model", "group": "producer", "label":
"producer", "required": false, "type": "object", "javaType":
"dev.langchain4j.model.embedding.EmbeddingModel", "deprecated": false,
"deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "La [...]
"toolSearchMaxResults": { "index": 12, "kind": "parameter", "displayName":
"Tool Search Max Results", "group": "producer", "label": "producer",
"required": false, "type": "integer", "javaType": "int", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 5,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Maximum number of tools
returned [...]
- "toolSearchStrategy": { "index": 13, "kind": "parameter", "displayName":
"Tool Search Strategy", "group": "producer", "label": "producer", "required":
false, "type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "keyword",
"vector" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "keyword", "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"c [...]
+ "toolSearchStrategy": { "index": 13, "kind": "parameter", "displayName":
"Tool Search Strategy", "group": "producer", "label": "producer", "required":
false, "type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "KEYWORD",
"VECTOR" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "KEYWORD", "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"c [...]
"lazyStartProducer": { "index": 14, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
"mcpClients": { "index": 15, "kind": "parameter", "displayName": "Mcp
Clients", "group": "advanced", "label": "advanced", "required": false, "type":
"array", "javaType": "java.util.List<dev.langchain4j.mcp.client.McpClient>",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Pre-built MCP (Model
Context Protocol) client ins [...]
"mcpServer": { "index": 16, "kind": "parameter", "displayName": "Mcp
Server", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>",
"prefix": "mcpServer.", "multiValue": true, "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "MCP serve [...]
diff --git
a/components/camel-ai/camel-langchain4j-agent/src/main/docs/langchain4j-agent-component.adoc
b/components/camel-ai/camel-langchain4j-agent/src/main/docs/langchain4j-agent-component.adoc
index 53cad52144d4..16fd8cd9dac6 100644
---
a/components/camel-ai/camel-langchain4j-agent/src/main/docs/langchain4j-agent-component.adoc
+++
b/components/camel-ai/camel-langchain4j-agent/src/main/docs/langchain4j-agent-component.adoc
@@ -318,7 +318,7 @@ from("direct:start")
Enabling tool search does not skip MCP `tools/list`. It only reduces the
definitions sent to the model. `toolSearch=false` (the default) sends the
current combined set, and the `searchable` flag has no effect.
-`toolSearchStrategy=vector` requires an autowired `toolSearchEmbeddingModel`
and does not fall back to keyword search. A dynamic tool provider registered
outside Camel's composite is refreshed by LangChain4j after search and is not
part of this catalogue. Tool search is only applied in inline agent creation
mode.
+`toolSearchStrategy=VECTOR` requires an autowired `toolSearchEmbeddingModel`
and does not fall back to keyword search. A dynamic tool provider registered
outside Camel's composite is refreshed by LangChain4j after search and is not
part of this catalogue. Tool search is only applied in inline agent creation
mode.
[source,yaml]
----
diff --git
a/components/camel-ai/camel-langchain4j-agent/src/main/java/org/apache/camel/component/langchain4j/agent/LangChain4jAgentConfiguration.java
b/components/camel-ai/camel-langchain4j-agent/src/main/java/org/apache/camel/component/langchain4j/agent/LangChain4jAgentConfiguration.java
index a9ccc307c48c..9c26d5906a9d 100644
---
a/components/camel-ai/camel-langchain4j-agent/src/main/java/org/apache/camel/component/langchain4j/agent/LangChain4jAgentConfiguration.java
+++
b/components/camel-ai/camel-langchain4j-agent/src/main/java/org/apache/camel/component/langchain4j/agent/LangChain4jAgentConfiguration.java
@@ -140,16 +140,16 @@ public class LangChain4jAgentConfiguration implements
Cloneable {
description = "Maximum number of tools returned by one tool
search. Route and MCP tools are ranked together.")
private int toolSearchMaxResults = AiToolSearch.DEFAULT_MAX_RESULTS;
- @UriParam(enums = "keyword,vector", defaultValue = "keyword")
+ @UriParam(enums = "KEYWORD,VECTOR", defaultValue = "KEYWORD")
@Metadata(label = "producer",
- description = "How tool search ranks route and MCP tools.
'keyword' matches the tool name and description. "
- + "'vector' uses cosine similarity and requires
toolSearchEmbeddingModel. Vector search "
+ description = "How tool search ranks route and MCP tools.
'KEYWORD' matches the tool name and description. "
+ + "'VECTOR' uses cosine similarity and requires
toolSearchEmbeddingModel. Vector search "
+ "does not fall back to keyword search.")
private AiToolSearchStrategy toolSearchStrategy =
AiToolSearchStrategy.KEYWORD;
@UriParam
@Metadata(label = "producer", autowired = true,
- description = "LangChain4j embedding model used when
toolSearchStrategy=vector. Required for vector search.")
+ description = "LangChain4j embedding model used when
toolSearchStrategy=VECTOR. Required for vector search.")
private EmbeddingModel toolSearchEmbeddingModel;
public LangChain4jAgentConfiguration() {
diff --git
a/components/camel-ai/camel-langchain4j-agent/src/main/java/org/apache/camel/component/langchain4j/agent/LangChain4jAgentProducer.java
b/components/camel-ai/camel-langchain4j-agent/src/main/java/org/apache/camel/component/langchain4j/agent/LangChain4jAgentProducer.java
index aa36486fbbb9..b67c8af36e86 100644
---
a/components/camel-ai/camel-langchain4j-agent/src/main/java/org/apache/camel/component/langchain4j/agent/LangChain4jAgentProducer.java
+++
b/components/camel-ai/camel-langchain4j-agent/src/main/java/org/apache/camel/component/langchain4j/agent/LangChain4jAgentProducer.java
@@ -308,7 +308,7 @@ public class LangChain4jAgentProducer extends
DefaultProducer {
if (endpointConfiguration.getToolSearchStrategy() ==
AiToolSearchStrategy.VECTOR
&& endpointConfiguration.getToolSearchEmbeddingModel() ==
null) {
throw new IllegalArgumentException(
- "toolSearchStrategy=vector requires
toolSearchEmbeddingModel and does not fall back to keyword search");
+ "toolSearchStrategy=VECTOR requires
toolSearchEmbeddingModel and does not fall back to keyword search");
}
CamelToolSearchStrategy strategy = new CamelToolSearchStrategy(
endpointConfiguration.getToolSearchStrategy(),
diff --git
a/components/camel-ai/camel-langchain4j-agent/src/test/java/org/apache/camel/component/langchain4j/agent/LangChain4jAgentToolSearchTest.java
b/components/camel-ai/camel-langchain4j-agent/src/test/java/org/apache/camel/component/langchain4j/agent/LangChain4jAgentToolSearchTest.java
index d9ac8b6ff01a..0c76bdec0038 100644
---
a/components/camel-ai/camel-langchain4j-agent/src/test/java/org/apache/camel/component/langchain4j/agent/LangChain4jAgentToolSearchTest.java
+++
b/components/camel-ai/camel-langchain4j-agent/src/test/java/org/apache/camel/component/langchain4j/agent/LangChain4jAgentToolSearchTest.java
@@ -196,7 +196,7 @@ class LangChain4jAgentToolSearchTest extends
CamelTestSupport {
@Override
public void configure() {
from("direct:vector")
-
.to("langchain4j-agent:vector?agentConfiguration=#cfg&toolSearch=true&toolSearchStrategy=vector");
+
.to("langchain4j-agent:vector?agentConfiguration=#cfg&toolSearch=true&toolSearchStrategy=VECTOR");
}
});
diff --git
a/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/llm.json
b/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/llm.json
index 51fb669ee15e..a9e3dd8a82bb 100644
---
a/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/llm.json
+++
b/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/llm.json
@@ -234,9 +234,9 @@
"temperature": { "index": 77, "kind": "parameter", "displayName":
"Temperature", "group": "common", "label": "", "required": false, "type":
"number", "javaType": "java.lang.Double", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false,
"configurationClass": "org.apache.camel.component.openai.OpenAIConfiguration",
"configurationField": "configuration", "description": "Temperature for response
generation (0.0 to 2.0)" },
"toolExecutionErrorStrategy": { "index": 78, "kind": "parameter",
"displayName": "Tool Execution Error Strategy", "group": "common", "label": "",
"required": false, "type": "enum", "javaType":
"org.apache.camel.component.openai.ToolExecutionErrorStrategy", "enum": [
"failExchange", "repromptModel" ], "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "defaultValue": "failExchange",
"configurationClass": "org.apache.camel.component.openai.OpenAIConfigurat [...]
"toolSearch": { "index": 79, "kind": "parameter", "displayName": "Tool
Search", "group": "common", "label": "", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "When true, route tools marked searchable and
remote MCP tools are omitted fro [...]
- "toolSearchEmbeddingModel": { "index": 80, "kind": "parameter",
"displayName": "Tool Search Embedding Model", "group": "common", "label": "",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Embedding model used when
toolSearchStrategy=vector, for examp [...]
+ "toolSearchEmbeddingModel": { "index": 80, "kind": "parameter",
"displayName": "Tool Search Embedding Model", "group": "common", "label": "",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Embedding model used when
toolSearchStrategy=VECTOR, for examp [...]
"toolSearchMaxResults": { "index": 81, "kind": "parameter", "displayName":
"Tool Search Max Results", "group": "common", "label": "", "required": false,
"type": "integer", "javaType": "int", "deprecated": false, "deprecationNote":
"", "autowired": false, "secret": false, "defaultValue": 5,
"configurationClass": "org.apache.camel.component.openai.OpenAIConfiguration",
"configurationField": "configuration", "description": "Maximum number of tools
returned by one tool search. Route and [...]
- "toolSearchStrategy": { "index": 82, "kind": "parameter", "displayName":
"Tool Search Strategy", "group": "common", "label": "", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "keyword",
"vector" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "keyword", "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configurat [...]
+ "toolSearchStrategy": { "index": 82, "kind": "parameter", "displayName":
"Tool Search Strategy", "group": "common", "label": "", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "KEYWORD",
"VECTOR" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "KEYWORD", "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configurat [...]
"topP": { "index": 83, "kind": "parameter", "displayName": "Top P",
"group": "common", "label": "", "required": false, "type": "number",
"javaType": "java.lang.Double", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Top P for response generation (0.0 to 1.0)" },
"userMessage": { "index": 84, "kind": "parameter", "displayName": "User
Message", "group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Default user message text to use when no
prompt is provided" },
"writeTimeout": { "index": 85, "kind": "parameter", "displayName": "Write
Timeout", "group": "common", "label": "", "required": false, "type": "integer",
"javaType": "long", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Timeout in milliseconds for writing the
request body, which matters for large pa [...]
diff --git
a/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/openai.json
b/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/openai.json
index 2b7d671bf66d..23f7ebdf0b30 100644
---
a/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/openai.json
+++
b/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/openai.json
@@ -234,9 +234,9 @@
"temperature": { "index": 77, "kind": "parameter", "displayName":
"Temperature", "group": "common", "label": "", "required": false, "type":
"number", "javaType": "java.lang.Double", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false,
"configurationClass": "org.apache.camel.component.openai.OpenAIConfiguration",
"configurationField": "configuration", "description": "Temperature for response
generation (0.0 to 2.0)" },
"toolExecutionErrorStrategy": { "index": 78, "kind": "parameter",
"displayName": "Tool Execution Error Strategy", "group": "common", "label": "",
"required": false, "type": "enum", "javaType":
"org.apache.camel.component.openai.ToolExecutionErrorStrategy", "enum": [
"failExchange", "repromptModel" ], "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "defaultValue": "failExchange",
"configurationClass": "org.apache.camel.component.openai.OpenAIConfigurat [...]
"toolSearch": { "index": 79, "kind": "parameter", "displayName": "Tool
Search", "group": "common", "label": "", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "When true, route tools marked searchable and
remote MCP tools are omitted fro [...]
- "toolSearchEmbeddingModel": { "index": 80, "kind": "parameter",
"displayName": "Tool Search Embedding Model", "group": "common", "label": "",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Embedding model used when
toolSearchStrategy=vector, for examp [...]
+ "toolSearchEmbeddingModel": { "index": 80, "kind": "parameter",
"displayName": "Tool Search Embedding Model", "group": "common", "label": "",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Embedding model used when
toolSearchStrategy=VECTOR, for examp [...]
"toolSearchMaxResults": { "index": 81, "kind": "parameter", "displayName":
"Tool Search Max Results", "group": "common", "label": "", "required": false,
"type": "integer", "javaType": "int", "deprecated": false, "deprecationNote":
"", "autowired": false, "secret": false, "defaultValue": 5,
"configurationClass": "org.apache.camel.component.openai.OpenAIConfiguration",
"configurationField": "configuration", "description": "Maximum number of tools
returned by one tool search. Route and [...]
- "toolSearchStrategy": { "index": 82, "kind": "parameter", "displayName":
"Tool Search Strategy", "group": "common", "label": "", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "keyword",
"vector" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "keyword", "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configurat [...]
+ "toolSearchStrategy": { "index": 82, "kind": "parameter", "displayName":
"Tool Search Strategy", "group": "common", "label": "", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "KEYWORD",
"VECTOR" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "KEYWORD", "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configurat [...]
"topP": { "index": 83, "kind": "parameter", "displayName": "Top P",
"group": "common", "label": "", "required": false, "type": "number",
"javaType": "java.lang.Double", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Top P for response generation (0.0 to 1.0)" },
"userMessage": { "index": 84, "kind": "parameter", "displayName": "User
Message", "group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Default user message text to use when no
prompt is provided" },
"writeTimeout": { "index": 85, "kind": "parameter", "displayName": "Write
Timeout", "group": "common", "label": "", "required": false, "type": "integer",
"javaType": "long", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.openai.OpenAIConfiguration", "configurationField":
"configuration", "description": "Timeout in milliseconds for writing the
request body, which matters for large pa [...]
diff --git a/components/camel-ai/camel-openai/src/main/docs/openai-mcp.adoc
b/components/camel-ai/camel-openai/src/main/docs/openai-mcp.adoc
index 58676f384848..cef6118bb38a 100644
--- a/components/camel-ai/camel-openai/src/main/docs/openai-mcp.adoc
+++ b/components/camel-ai/camel-openai/src/main/docs/openai-mcp.adoc
@@ -479,7 +479,7 @@ Route-based tools registered via the
xref:components::ai-tool-component.adoc[ai-
Enabling tool search does not skip MCP `tools/list`. It only reduces the
definitions sent to the model. `toolSearch=false` (the default) sends the
current combined set, and the `searchable` flag has no effect.
-`toolSearchStrategy=keyword` (the default) matches the tool name and
description. `toolSearchStrategy=vector` requires `toolSearchEmbeddingModel`
and does not fall back to keyword search. `toolSearchMaxResults` defaults to 5.
With `conversationMemory=true`, discovered names remain available across manual
tool-loop steps on the same exchange, even when no session ID is supplied. To
retain discoveries across separate exchanges, enable `conversationMemory=true`
on `openai:chat-completion` a [...]
+`toolSearchStrategy=KEYWORD` (the default) matches the tool name and
description. `toolSearchStrategy=VECTOR` requires `toolSearchEmbeddingModel`
and does not fall back to keyword search. `toolSearchMaxResults` defaults to 5.
With `conversationMemory=true`, discovered names remain available across manual
tool-loop steps on the same exchange, even when no session ID is supplied. To
retain discoveries across separate exchanges, enable `conversationMemory=true`
on `openai:chat-completion` a [...]
[source,yaml]
----
@@ -494,7 +494,7 @@ Enabling tool search does not skip MCP `tools/list`. It
only reduces the definit
tags: erp
toolSearch: true
toolSearchMaxResults: 5
- toolSearchStrategy: keyword
+ toolSearchStrategy: KEYWORD
----
=== MCP Tool Call Headers
diff --git
a/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIConfiguration.java
b/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIConfiguration.java
index 53ea9d934dcb..4d2c2736fc96 100644
---
a/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIConfiguration.java
+++
b/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIConfiguration.java
@@ -346,14 +346,14 @@ public class OpenAIConfiguration implements Cloneable {
+ "together against this limit.")
private int toolSearchMaxResults = AiToolSearch.DEFAULT_MAX_RESULTS;
- @UriParam(enums = "keyword,vector", defaultValue = "keyword")
- @Metadata(description = "How tool search ranks route and MCP tools.
'keyword' matches the tool name and description. "
- + "'vector' uses cosine similarity and requires
toolSearchEmbeddingModel. Vector search "
+ @UriParam(enums = "KEYWORD,VECTOR", defaultValue = "KEYWORD")
+ @Metadata(description = "How tool search ranks route and MCP tools.
'KEYWORD' matches the tool name and description. "
+ + "'VECTOR' uses cosine similarity and requires
toolSearchEmbeddingModel. Vector search "
+ "does not fall back to keyword search.")
private AiToolSearchStrategy toolSearchStrategy =
AiToolSearchStrategy.KEYWORD;
@UriParam
- @Metadata(description = "Embedding model used when
toolSearchStrategy=vector, for example text-embedding-3-small. "
+ @Metadata(description = "Embedding model used when
toolSearchStrategy=VECTOR, for example text-embedding-3-small. "
+ "Required for vector search. It is not read from
the embeddings operation model option.")
private String toolSearchEmbeddingModel;
diff --git
a/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIToolSearch.java
b/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIToolSearch.java
index 699ab41c6372..4d412a04d43d 100644
---
a/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIToolSearch.java
+++
b/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIToolSearch.java
@@ -93,7 +93,7 @@ final class OpenAIToolSearch {
if (configuration.getToolSearchStrategy() ==
AiToolSearchStrategy.VECTOR
&&
ObjectHelper.isEmpty(configuration.getToolSearchEmbeddingModel())) {
throw new IllegalArgumentException(
- "toolSearchStrategy=vector requires
toolSearchEmbeddingModel and does not fall back to keyword search");
+ "toolSearchStrategy=VECTOR requires
toolSearchEmbeddingModel and does not fall back to keyword search");
}
}
diff --git
a/components/camel-ai/camel-openai/src/test/java/org/apache/camel/component/openai/OpenAIToolSearchMockTest.java
b/components/camel-ai/camel-openai/src/test/java/org/apache/camel/component/openai/OpenAIToolSearchMockTest.java
index dd4ebe85e992..41451e79ab71 100644
---
a/components/camel-ai/camel-openai/src/test/java/org/apache/camel/component/openai/OpenAIToolSearchMockTest.java
+++
b/components/camel-ai/camel-openai/src/test/java/org/apache/camel/component/openai/OpenAIToolSearchMockTest.java
@@ -197,7 +197,7 @@ class OpenAIToolSearchMockTest extends CamelTestSupport {
void vectorSearchFindsAndExecutesTheSemanticallyMatchingMcpTool() {
String endpointUri =
"openai:chat-completion?model=gpt-4o-mini&apiKey=dummy"
+ "&autoToolExecution=true&toolSearch=true"
- +
"&toolSearchStrategy=vector&toolSearchEmbeddingModel=text-embedding-ada-002"
+ +
"&toolSearchStrategy=VECTOR&toolSearchEmbeddingModel=text-embedding-ada-002"
+ "&toolSearchMaxResults=1&tags=search&baseUrl="
+ openAIMock.getBaseUrl() + "/v1";
injectWeather(endpointUri);
@@ -411,7 +411,7 @@ class OpenAIToolSearchMockTest extends CamelTestSupport {
+ base);
from("direct:vector")
.to("openai:chat-completion?model=gpt-4o-mini&apiKey=dummy&autoToolExecution=true"
- + "&toolSearch=true&toolSearchStrategy=vector"
+ + "&toolSearch=true&toolSearchStrategy=VECTOR"
+
"&toolSearchEmbeddingModel=text-embedding-ada-002&toolSearchMaxResults=1"
+ "&tags=search&baseUrl=" + base);
from("direct:manual")
diff --git
a/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/generated/resources/META-INF/org/apache/camel/component/springai/chat/spring-ai-chat.json
b/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/generated/resources/META-INF/org/apache/camel/component/springai/chat/spring-ai-chat.json
index 7e80f5d0d06c..604b4df4b1c9 100644
---
a/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/generated/resources/META-INF/org/apache/camel/component/springai/chat/spring-ai-chat.json
+++
b/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/generated/resources/META-INF/org/apache/camel/component/springai/chat/spring-ai-chat.json
@@ -75,9 +75,9 @@
"tags": { "index": 5, "kind": "parameter", "displayName": "Tags", "group":
"producer", "label": "", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configurationField": "configuration", "description": "Tags for discovering and
calling Camel route tools" },
"toolNames": { "index": 6, "kind": "parameter", "displayName": "Tool
Names", "group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configurationField": "configuration", "description": "Comma-separated tool
names for selecting tools by name. Names are resolved against a
ToolCallbackResolv [...]
"toolSearch": { "index": 7, "kind": "parameter", "displayName": "Tool
Search", "group": "producer", "label": "producer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "defaultValue": false,
"configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configurationField": "configuration", "description": "When true, route tools
marked searchable and remote MCP [...]
- "toolSearchEmbeddingModel": { "index": 8, "kind": "parameter",
"displayName": "Tool Search Embedding Model", "group": "producer", "label":
"producer", "required": false, "type": "object", "javaType":
"org.springframework.ai.embedding.EmbeddingModel", "deprecated": false,
"deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configurationField": "configuration", "description": "Spring AI [...]
+ "toolSearchEmbeddingModel": { "index": 8, "kind": "parameter",
"displayName": "Tool Search Embedding Model", "group": "producer", "label":
"producer", "required": false, "type": "object", "javaType":
"org.springframework.ai.embedding.EmbeddingModel", "deprecated": false,
"deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configurationField": "configuration", "description": "Spring AI [...]
"toolSearchMaxResults": { "index": 9, "kind": "parameter", "displayName":
"Tool Search Max Results", "group": "producer", "label": "producer",
"required": false, "type": "integer", "javaType": "int", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 5,
"configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configurationField": "configuration", "description": "Maximum number of tools
returned by one t [...]
- "toolSearchStrategy": { "index": 10, "kind": "parameter", "displayName":
"Tool Search Strategy", "group": "producer", "label": "producer", "required":
false, "type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "keyword",
"vector" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "keyword", "configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configura [...]
+ "toolSearchStrategy": { "index": 10, "kind": "parameter", "displayName":
"Tool Search Strategy", "group": "producer", "label": "producer", "required":
false, "type": "enum", "javaType":
"org.apache.camel.component.ai.tool.AiToolSearchStrategy", "enum": [ "KEYWORD",
"VECTOR" ], "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "defaultValue": "KEYWORD", "configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configura [...]
"userMessage": { "index": 11, "kind": "parameter", "displayName": "User
Message", "group": "producer", "label": "", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configurationField": "configuration", "description": "Default user message
text for multimodal requests. Can be combined with media data in the message
[...]
"lazyStartProducer": { "index": 12, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
"advisors": { "index": 13, "kind": "parameter", "displayName": "Advisors",
"group": "advanced", "label": "advanced", "required": false, "type": "array",
"javaType":
"java.util.List<org.springframework.ai.chat.client.advisor.api.Advisor>",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "configurationClass":
"org.apache.camel.component.springai.chat.SpringAiChatConfiguration",
"configurationField": "configuration", "description": "List of custom adviso
[...]
diff --git
a/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/main/docs/spring-ai-chat-component.adoc
b/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/main/docs/spring-ai-chat-component.adoc
index 000b9689d5b8..7f2309bcb07f 100644
---
a/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/main/docs/spring-ai-chat-component.adoc
+++
b/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/main/docs/spring-ai-chat-component.adoc
@@ -1013,7 +1013,7 @@ available tools. You can combine `toolNames` with `tags`
— both tool sources a
Enabling tool search does not skip MCP `tools/list`. It only reduces the
definitions sent to the model. `toolSearch=false` (the default) sends the
current combined set, and the `searchable` flag has no effect.
-Camel has to build the `ChatClient` from `chatModel`. A prebuilt `chatClient`
cannot install the search advisor and fails at startup when `toolSearch=true`.
`toolSearchStrategy=vector` requires an autowired `toolSearchEmbeddingModel`
and does not fall back to keyword search. Retained discoveries are keyed by
`CamelSpringAiChatConversationId`. Sessions expire after 30 minutes of
inactivity and each `SpringAiToolSearch` instance retains at most 10,000
sessions, evicting the least-recently- [...]
+Camel has to build the `ChatClient` from `chatModel`. A prebuilt `chatClient`
cannot install the search advisor and fails at startup when `toolSearch=true`.
`toolSearchStrategy=VECTOR` requires an autowired `toolSearchEmbeddingModel`
and does not fall back to keyword search. Retained discoveries are keyed by
`CamelSpringAiChatConversationId`. Sessions expire after 30 minutes of
inactivity and each `SpringAiToolSearch` instance retains at most 10,000
sessions, evicting the least-recently- [...]
[source,yaml]
----
diff --git
a/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/main/java/org/apache/camel/component/springai/chat/SpringAiChatConfiguration.java
b/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/main/java/org/apache/camel/component/springai/chat/SpringAiChatConfiguration.java
index f60d797d211b..efc52d243400 100644
---
a/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/main/java/org/apache/camel/component/springai/chat/SpringAiChatConfiguration.java
+++
b/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/main/java/org/apache/camel/component/springai/chat/SpringAiChatConfiguration.java
@@ -177,16 +177,16 @@ public class SpringAiChatConfiguration implements
Cloneable {
description = "Maximum number of tools returned by one tool
search. Route and MCP tools are ranked together.")
private int toolSearchMaxResults = AiToolSearch.DEFAULT_MAX_RESULTS;
- @UriParam(enums = "keyword,vector", defaultValue = "keyword")
+ @UriParam(enums = "KEYWORD,VECTOR", defaultValue = "KEYWORD")
@Metadata(label = "producer",
- description = "How tool search ranks route and MCP tools.
'keyword' matches the tool name and description. "
- + "'vector' uses cosine similarity and requires
toolSearchEmbeddingModel. Vector search "
+ description = "How tool search ranks route and MCP tools.
'KEYWORD' matches the tool name and description. "
+ + "'VECTOR' uses cosine similarity and requires
toolSearchEmbeddingModel. Vector search "
+ "does not fall back to keyword search.")
private AiToolSearchStrategy toolSearchStrategy =
AiToolSearchStrategy.KEYWORD;
@UriParam
@Metadata(label = "producer", autowired = true,
- description = "Spring AI embedding model used when
toolSearchStrategy=vector. Required for vector search.")
+ description = "Spring AI embedding model used when
toolSearchStrategy=VECTOR. Required for vector search.")
private EmbeddingModel toolSearchEmbeddingModel;
public ChatClient getChatClient() {
diff --git
a/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/main/java/org/apache/camel/component/springai/chat/SpringAiToolSearch.java
b/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/main/java/org/apache/camel/component/springai/chat/SpringAiToolSearch.java
index 4fb7fbb6a00b..9ec7d2fb1ae6 100644
---
a/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/main/java/org/apache/camel/component/springai/chat/SpringAiToolSearch.java
+++
b/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/main/java/org/apache/camel/component/springai/chat/SpringAiToolSearch.java
@@ -98,7 +98,7 @@ final class SpringAiToolSearch {
if (configuration.getToolSearchStrategy() ==
AiToolSearchStrategy.VECTOR
&& configuration.getToolSearchEmbeddingModel() == null) {
throw new IllegalArgumentException(
- "toolSearchStrategy=vector requires
toolSearchEmbeddingModel and does not fall back to keyword search");
+ "toolSearchStrategy=VECTOR requires
toolSearchEmbeddingModel and does not fall back to keyword search");
}
}
diff --git
a/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/test/java/org/apache/camel/component/springai/chat/SpringAiChatToolSearchTest.java
b/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/test/java/org/apache/camel/component/springai/chat/SpringAiChatToolSearchTest.java
index 987447e99d44..f1173eb70f9f 100644
---
a/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/test/java/org/apache/camel/component/springai/chat/SpringAiChatToolSearchTest.java
+++
b/components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat/src/test/java/org/apache/camel/component/springai/chat/SpringAiChatToolSearchTest.java
@@ -216,7 +216,7 @@ class SpringAiChatToolSearchTest extends CamelTestSupport {
.to("spring-ai-chat:chat?chatModel=#chatModel&tags=erp&toolSearch=true&toolSearchMaxResults=5");
from("direct:vector")
.to("spring-ai-chat:chat?chatModel=#chatModel&tags=erp&toolSearch=true"
- +
"&toolSearchMaxResults=1&toolSearchStrategy=vector"
+ +
"&toolSearchMaxResults=1&toolSearchStrategy=VECTOR"
+ "&toolSearchEmbeddingModel=#embeddingModel");
}
};
diff --git
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Langchain4jAgentComponentBuilderFactory.java
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Langchain4jAgentComponentBuilderFactory.java
index e772bfa033e5..f9e0dedf7b16 100644
---
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Langchain4jAgentComponentBuilderFactory.java
+++
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Langchain4jAgentComponentBuilderFactory.java
@@ -285,7 +285,7 @@ public interface Langchain4jAgentComponentBuilderFactory {
}
/**
- * LangChain4j embedding model used when toolSearchStrategy=vector.
+ * LangChain4j embedding model used when toolSearchStrategy=VECTOR.
* Required for vector search.
*
* The option is a:
@@ -321,15 +321,15 @@ public interface Langchain4jAgentComponentBuilderFactory {
/**
- * How tool search ranks route and MCP tools. 'keyword' matches the
tool
- * name and description. 'vector' uses cosine similarity and requires
+ * How tool search ranks route and MCP tools. 'KEYWORD' matches the
tool
+ * name and description. 'VECTOR' uses cosine similarity and requires
* toolSearchEmbeddingModel. Vector search does not fall back to
keyword
* search.
*
* The option is a:
*
<code>org.apache.camel.component.ai.tool.AiToolSearchStrategy</code>
type.
*
- * Default: keyword
+ * Default: KEYWORD
* Group: producer
*
* @param toolSearchStrategy the value to set
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LangChain4jAgentEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LangChain4jAgentEndpointBuilderFactory.java
index e17920b4a5f0..7afc9b6e414c 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LangChain4jAgentEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LangChain4jAgentEndpointBuilderFactory.java
@@ -377,7 +377,7 @@ public interface LangChain4jAgentEndpointBuilderFactory {
return this;
}
/**
- * LangChain4j embedding model used when toolSearchStrategy=vector.
+ * LangChain4j embedding model used when toolSearchStrategy=VECTOR.
* Required for vector search.
*
* The option is a:
@@ -393,7 +393,7 @@ public interface LangChain4jAgentEndpointBuilderFactory {
return this;
}
/**
- * LangChain4j embedding model used when toolSearchStrategy=vector.
+ * LangChain4j embedding model used when toolSearchStrategy=VECTOR.
* Required for vector search.
*
* The option will be converted to a
@@ -441,8 +441,8 @@ public interface LangChain4jAgentEndpointBuilderFactory {
return this;
}
/**
- * How tool search ranks route and MCP tools. 'keyword' matches the
tool
- * name and description. 'vector' uses cosine similarity and requires
+ * How tool search ranks route and MCP tools. 'KEYWORD' matches the
tool
+ * name and description. 'VECTOR' uses cosine similarity and requires
* toolSearchEmbeddingModel. Vector search does not fall back to
keyword
* search.
*
@@ -450,7 +450,7 @@ public interface LangChain4jAgentEndpointBuilderFactory {
* <code>org.apache.camel.component.ai.tool.AiToolSearchStrategy</code>
* type.
*
- * Default: keyword
+ * Default: KEYWORD
* Group: producer
*
* @param toolSearchStrategy the value to set
@@ -461,8 +461,8 @@ public interface LangChain4jAgentEndpointBuilderFactory {
return this;
}
/**
- * How tool search ranks route and MCP tools. 'keyword' matches the
tool
- * name and description. 'vector' uses cosine similarity and requires
+ * How tool search ranks route and MCP tools. 'KEYWORD' matches the
tool
+ * name and description. 'VECTOR' uses cosine similarity and requires
* toolSearchEmbeddingModel. Vector search does not fall back to
keyword
* search.
*
@@ -470,7 +470,7 @@ public interface LangChain4jAgentEndpointBuilderFactory {
* <code>org.apache.camel.component.ai.tool.AiToolSearchStrategy</code>
* type.
*
- * Default: keyword
+ * Default: KEYWORD
* Group: producer
*
* @param toolSearchStrategy the value to set
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OpenAIEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OpenAIEndpointBuilderFactory.java
index 2f3d36333699..562d302c30df 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OpenAIEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OpenAIEndpointBuilderFactory.java
@@ -2005,7 +2005,7 @@ public interface OpenAIEndpointBuilderFactory {
return this;
}
/**
- * Embedding model used when toolSearchStrategy=vector, for example
+ * Embedding model used when toolSearchStrategy=VECTOR, for example
* text-embedding-3-small. Required for vector search. It is not read
* from the embeddings operation model option.
*
@@ -2053,8 +2053,8 @@ public interface OpenAIEndpointBuilderFactory {
return this;
}
/**
- * How tool search ranks route and MCP tools. 'keyword' matches the
tool
- * name and description. 'vector' uses cosine similarity and requires
+ * How tool search ranks route and MCP tools. 'KEYWORD' matches the
tool
+ * name and description. 'VECTOR' uses cosine similarity and requires
* toolSearchEmbeddingModel. Vector search does not fall back to
keyword
* search.
*
@@ -2062,7 +2062,7 @@ public interface OpenAIEndpointBuilderFactory {
* <code>org.apache.camel.component.ai.tool.AiToolSearchStrategy</code>
* type.
*
- * Default: keyword
+ * Default: KEYWORD
* Group: common
*
* @param toolSearchStrategy the value to set
@@ -2073,8 +2073,8 @@ public interface OpenAIEndpointBuilderFactory {
return this;
}
/**
- * How tool search ranks route and MCP tools. 'keyword' matches the
tool
- * name and description. 'vector' uses cosine similarity and requires
+ * How tool search ranks route and MCP tools. 'KEYWORD' matches the
tool
+ * name and description. 'VECTOR' uses cosine similarity and requires
* toolSearchEmbeddingModel. Vector search does not fall back to
keyword
* search.
*
@@ -2082,7 +2082,7 @@ public interface OpenAIEndpointBuilderFactory {
* <code>org.apache.camel.component.ai.tool.AiToolSearchStrategy</code>
* type.
*
- * Default: keyword
+ * Default: KEYWORD
* Group: common
*
* @param toolSearchStrategy the value to set
@@ -4567,7 +4567,7 @@ public interface OpenAIEndpointBuilderFactory {
return this;
}
/**
- * Embedding model used when toolSearchStrategy=vector, for example
+ * Embedding model used when toolSearchStrategy=VECTOR, for example
* text-embedding-3-small. Required for vector search. It is not read
* from the embeddings operation model option.
*
@@ -4615,8 +4615,8 @@ public interface OpenAIEndpointBuilderFactory {
return this;
}
/**
- * How tool search ranks route and MCP tools. 'keyword' matches the
tool
- * name and description. 'vector' uses cosine similarity and requires
+ * How tool search ranks route and MCP tools. 'KEYWORD' matches the
tool
+ * name and description. 'VECTOR' uses cosine similarity and requires
* toolSearchEmbeddingModel. Vector search does not fall back to
keyword
* search.
*
@@ -4624,7 +4624,7 @@ public interface OpenAIEndpointBuilderFactory {
* <code>org.apache.camel.component.ai.tool.AiToolSearchStrategy</code>
* type.
*
- * Default: keyword
+ * Default: KEYWORD
* Group: common
*
* @param toolSearchStrategy the value to set
@@ -4635,8 +4635,8 @@ public interface OpenAIEndpointBuilderFactory {
return this;
}
/**
- * How tool search ranks route and MCP tools. 'keyword' matches the
tool
- * name and description. 'vector' uses cosine similarity and requires
+ * How tool search ranks route and MCP tools. 'KEYWORD' matches the
tool
+ * name and description. 'VECTOR' uses cosine similarity and requires
* toolSearchEmbeddingModel. Vector search does not fall back to
keyword
* search.
*
@@ -4644,7 +4644,7 @@ public interface OpenAIEndpointBuilderFactory {
* <code>org.apache.camel.component.ai.tool.AiToolSearchStrategy</code>
* type.
*
- * Default: keyword
+ * Default: KEYWORD
* Group: common
*
* @param toolSearchStrategy the value to set
@@ -6978,7 +6978,7 @@ public interface OpenAIEndpointBuilderFactory {
return this;
}
/**
- * Embedding model used when toolSearchStrategy=vector, for example
+ * Embedding model used when toolSearchStrategy=VECTOR, for example
* text-embedding-3-small. Required for vector search. It is not read
* from the embeddings operation model option.
*
@@ -7026,8 +7026,8 @@ public interface OpenAIEndpointBuilderFactory {
return this;
}
/**
- * How tool search ranks route and MCP tools. 'keyword' matches the
tool
- * name and description. 'vector' uses cosine similarity and requires
+ * How tool search ranks route and MCP tools. 'KEYWORD' matches the
tool
+ * name and description. 'VECTOR' uses cosine similarity and requires
* toolSearchEmbeddingModel. Vector search does not fall back to
keyword
* search.
*
@@ -7035,7 +7035,7 @@ public interface OpenAIEndpointBuilderFactory {
* <code>org.apache.camel.component.ai.tool.AiToolSearchStrategy</code>
* type.
*
- * Default: keyword
+ * Default: KEYWORD
* Group: common
*
* @param toolSearchStrategy the value to set
@@ -7046,8 +7046,8 @@ public interface OpenAIEndpointBuilderFactory {
return this;
}
/**
- * How tool search ranks route and MCP tools. 'keyword' matches the
tool
- * name and description. 'vector' uses cosine similarity and requires
+ * How tool search ranks route and MCP tools. 'KEYWORD' matches the
tool
+ * name and description. 'VECTOR' uses cosine similarity and requires
* toolSearchEmbeddingModel. Vector search does not fall back to
keyword
* search.
*
@@ -7055,7 +7055,7 @@ public interface OpenAIEndpointBuilderFactory {
* <code>org.apache.camel.component.ai.tool.AiToolSearchStrategy</code>
* type.
*
- * Default: keyword
+ * Default: KEYWORD
* Group: common
*
* @param toolSearchStrategy the value to set
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SpringAiChatEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SpringAiChatEndpointBuilderFactory.java
index 2d13c9911b35..37d044314f6f 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SpringAiChatEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SpringAiChatEndpointBuilderFactory.java
@@ -233,7 +233,7 @@ public interface SpringAiChatEndpointBuilderFactory {
return this;
}
/**
- * Spring AI embedding model used when toolSearchStrategy=vector.
+ * Spring AI embedding model used when toolSearchStrategy=VECTOR.
* Required for vector search.
*
* The option is a:
@@ -249,7 +249,7 @@ public interface SpringAiChatEndpointBuilderFactory {
return this;
}
/**
- * Spring AI embedding model used when toolSearchStrategy=vector.
+ * Spring AI embedding model used when toolSearchStrategy=VECTOR.
* Required for vector search.
*
* The option will be converted to a
@@ -297,8 +297,8 @@ public interface SpringAiChatEndpointBuilderFactory {
return this;
}
/**
- * How tool search ranks route and MCP tools. 'keyword' matches the
tool
- * name and description. 'vector' uses cosine similarity and requires
+ * How tool search ranks route and MCP tools. 'KEYWORD' matches the
tool
+ * name and description. 'VECTOR' uses cosine similarity and requires
* toolSearchEmbeddingModel. Vector search does not fall back to
keyword
* search.
*
@@ -306,7 +306,7 @@ public interface SpringAiChatEndpointBuilderFactory {
* <code>org.apache.camel.component.ai.tool.AiToolSearchStrategy</code>
* type.
*
- * Default: keyword
+ * Default: KEYWORD
* Group: producer
*
* @param toolSearchStrategy the value to set
@@ -317,8 +317,8 @@ public interface SpringAiChatEndpointBuilderFactory {
return this;
}
/**
- * How tool search ranks route and MCP tools. 'keyword' matches the
tool
- * name and description. 'vector' uses cosine similarity and requires
+ * How tool search ranks route and MCP tools. 'KEYWORD' matches the
tool
+ * name and description. 'VECTOR' uses cosine similarity and requires
* toolSearchEmbeddingModel. Vector search does not fall back to
keyword
* search.
*
@@ -326,7 +326,7 @@ public interface SpringAiChatEndpointBuilderFactory {
* <code>org.apache.camel.component.ai.tool.AiToolSearchStrategy</code>
* type.
*
- * Default: keyword
+ * Default: KEYWORD
* Group: producer
*
* @param toolSearchStrategy the value to set