jlon commented on PR #861: URL: https://github.com/apache/flink-agents/pull/861#issuecomment-4911868955
Pushed ecd96c5 to address the review comments: - Removed the 3-arg Java `recordTokenMetrics(...)` overload so token metrics are recorded only with an explicit request/action metric group. - Made the Java metric group parameter non-null and added an action-layer skip when no metric group is available. - Removed the Python fallback from `metric_group=None` to `self.metric_group`; Python now skips instead of recording under a possibly rebound resource group. I kept the broader `Resource.metricGroup` removal out of this PR because that crosses resource binding and cross-language bridge behavior. This patch keeps the issue #859 fix focused on chat token metrics while avoiding the fallback contract that could recreate the bug. Local verification: - `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` - `cd python && uv run --no-sync pytest flink_agents/api/chat_models/tests/test_token_metrics.py -q` - `cd python && uv run --no-sync ruff format --check ... && uv run --no-sync ruff check ...` - `mvn -pl api,plan -am spotless:check -Dspotless.skip=false -DskipTests -DskipITs -Dcheckstyle.skip=true` - `git diff --check` -- 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]
