jlon opened a new pull request, #861:
URL: https://github.com/apache/flink-agents/pull/861

   ## What
   - Capture the current action metric group when a chat request is initiated.
   - Record delayed chat token metrics against that captured group instead of 
the mutable metric group on cached chat model resources.
   - Add Java and Python regression coverage for resource metric-group 
rebinding.
   
   ## Why
   Cached resources can be rebound when another action retrieves the same 
resource before the original request records token usage. The delayed token 
metrics should stay under the action that initiated the request.
   
   Closes #859.
   
   ## Tests
   - mvn -pl api -DskipITs -Dspotless.check.skip=true -Dcheckstyle.skip=true 
-Dtest=BaseChatModelSetupTokenMetricsTest test
   - mvn -pl plan -am -DskipITs -Dspotless.check.skip=true 
-Dcheckstyle.skip=true -Dsurefire.failIfNoSpecifiedTests=false 
-Dtest=ChatModelActionTest,ChatModelActionRetryTest test
   - bash -lc 'export PATH="$HOME/.local/bin:$PATH"; cd python && uv run 
--no-sync pytest flink_agents/api/chat_models/tests/test_token_metrics.py -q'
   - bash -lc 'export PATH="$HOME/.local/bin:$PATH"; cd python && uv run 
--no-sync ruff format --check flink_agents/api/chat_models/chat_model.py 
flink_agents/api/chat_models/tests/test_token_metrics.py 
flink_agents/plan/actions/chat_model_action.py && uv run --no-sync ruff check 
flink_agents/api/chat_models/chat_model.py 
flink_agents/api/chat_models/tests/test_token_metrics.py 
flink_agents/plan/actions/chat_model_action.py'
   - bash -lc 'export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64; export 
PATH="$JAVA_HOME/bin:$PATH"; mvn -pl api,plan -am spotless:check 
-Dspotless.skip=false -DskipTests -DskipITs -Dcheckstyle.skip=true'


-- 
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