[ 
https://issues.apache.org/jira/browse/CAMEL-25000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-25000.
---------------------------------
    Fix Version/s: 4.23.0
                   4.22.2
       Resolution: Fixed

The fix is merged on main, so it is in Camel 4.23.0 and 4.22.2:
* 6cb34f9a760b CAMEL-25000: camel-ai-tool / camel-ai-resource - register during 
route warm-up so early requests see every tool (#26856)
Backported to camel-4.22.x (after 4.22.1), so also in 4.22.2.

Resolving, as the ticket was not updated when the PR was merged.

_Claude Code on behalf of Claus Ibsen_

> camel-ai-tool / camel-ai-resource - tools and resources are missing when a 
> route sends a request as soon as it starts
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-25000
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25000
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-ai, camel-mcp-server
>    Affects Versions: 4.22.1
>            Reporter: Federico Mariani
>            Assignee: Federico Mariani
>            Priority: Major
>             Fix For: 4.23.0, 4.22.2
>
>
> {{ai-tool}} and {{ai-resource}} routes register in {{AiToolRegistry}} / 
> {{AiResourceRegistry}} when their consumer starts. Camel starts consumers one 
> route at a time, so a route declared earlier whose consumer produces 
> immediately (e.g. {{stream:in}}) calls the LLM before later tool routes are 
> registered. The request silently carries only some tools, or none; there is 
> no error or warning.
> Reproducer (Camel JBang 4.22.1): {{echo "are all services healthy?" | camel 
> run reproducer.camel.yaml}} with a {{stream:in -> 
> openai:chat-completion?tags=devops}} route declared first and two {{ai-tool}} 
> routes tagged {{devops}}. Only the first tool is sent; with the tool routes 
> swapped, none are. Declaring the console route last, or {{startupOrder: 
> 9999}}, sends both. Parameters/schemas are not the cause, only route order.
> Affected readers: camel-openai, camel-langchain4j-agent, 
> camel-spring-ai-chat, and camel-mcp-server (an early {{tools/list}} / 
> {{resources/list}} is partial).
> Proposed fix: register during route warm-up (the endpoint is started for all 
> routes before any route consumer starts), only for routes that auto-start; 
> keep the existing consumer start/stop/suspend/resume behaviour.
> _Claude Code on behalf of Croway_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to