joeyutong commented on PR #870:
URL: https://github.com/apache/flink-agents/pull/870#issuecomment-4903400678

   Thanks @weiqingy for the detailed review.
   
   One additional concern: this PR records embedding token metrics inside 
`BaseEmbeddingModelSetup.embed(...)`. Similar to chat model setup, the setup 
API itself is not inherently single-threaded, while the metric group assumes 
single-threaded access when resolving subgroups/counters.
   
   If the same setup resource is invoked concurrently, setup-level metric 
recording can race during metric lookup/creation. Should embedding token 
recording stay at a caller/action-thread boundary where the single-threaded 
access guarantee is explicit?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to