[ 
https://issues.apache.org/jira/browse/CAMEL-27752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18152699#comment-18152699
 ] 

Guillaume Nodet commented on CAMEL-27752:
-----------------------------------------

This issue is being investigated by a coding agent (on behalf of gnodet).

Triage analysis: Bug confirmed in both DoclingProducer (line 186: doStart calls 
resolveOAuthToken which sets the token once at startup) and HuggingFaceProducer 
(line 40: same pattern). The fix follows CAMEL-27125: switch from one-time 
token resolution at startup to a per-request supplier lambda. CAMEL-27570 and 
CAMEL-27575 applied the same fix to camel-ibm-watsonx-ai and 
camel-ibm-watsonx-data.

_Note: This comment was generated by an AI coding agent and requires manual 
verification._

> camel-docling, camel-huggingface: oauthProfile token resolved once at 
> startup, should be per-request
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27752
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27752
>             Project: Camel
>          Issue Type: Bug
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>            Priority: Major
>             Fix For: 4.25.0
>
>
> The {{oauthProfile}} option in {{camel-docling}} and {{camel-huggingface}} 
> still resolves the OAuth token once
> at startup (in {{doStart()}}), and stores the string in the configuration. 
> After the token expires, all requests fail with HTTP 401
> until the route is restarted.
> CAMEL-27125 fixed the same problem in {{camel-openai}}, 
> {{camel-langchain4j-agent}}, and {{camel-spring-ai-chat}} by switching to
> per-request supplier lambdas. The same approach should be applied to these 
> two components:
> * {{DoclingProducer.resolveOAuthToken()}} (called from {{doStart()}}) — move 
> to a per-request supplier
> * {{HuggingFaceProducer.resolveOAuthToken()}} (called from {{doStart()}}) — 
> move to a per-request supplier
> Noted in CAMEL-27125 review as a deferred follow-up: camel-ibm-watsonx-ai and 
> camel-ibm-watsonx-data were handled by
> CAMEL-27570 and CAMEL-27575 respectively.
> See: https://github.com/apache/camel/pull/30707



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to