You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "hulincup (via GitHub)" <gi...@apache.org> on 2026/08/24 11:24:05 UTC
Re: [I] [Feature] Track token usage metrics for embedding models [flink-agents]
hulincup commented on issue #858:
URL: https://github.com/apache/flink-agents/issues/858#issuecomment-5394515519
Hi @joeyutong, I'd like to take this one. The embedding providers already populate `EmbeddingResult.tokenUsage` (Bedrock on the Java side, OpenAI/Tongyi on the Python cross-lang side), but nothing reads it to record metrics. I plan to mirror the chat path — add `recordTokenMetrics` to `BaseEmbeddingModelSetup` and record `promptTokens`/`totalTokens` at the `embedWithUsage` chokepoint, so direct calls and vector-store/RAG paths are both covered. Pure-Python embedding integrations stay unchanged, consistent with the chat side having no Python metric layer. Happy to adjust the scope if you had something broader in mind.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org