Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@shuyangli
Copy link
Member

@shuyangli shuyangli commented Dec 22, 2025

  • Add list_functions_with_inference_count method to InferenceStatsQueries trait
  • Add FunctionInferenceCount and ListFunctionsWithInferenceCountResponse types
  • Implement ClickHouse query for counting inferences by function
  • Add route handler at /internal/functions/inference-counts
  • Add unit tests and e2e tests for new functionality
  • Port UI to use new API endpoint instead of direct ClickHouse query
  • Remove old countInferencesByFunction function from inference.server.ts
  • Rename 'count' field to 'inference_count' for clarity

Important

Ports countInferencesByFunction to backend API with a new endpoint, updating UI and tests accordingly.

  • Backend API:
    • Adds list_functions_with_inference_count method to InferenceStatsQueries trait in inference_stats.rs.
    • Implements ClickHouse query in inference_stats.rs to list functions with inference counts.
    • Adds route handler at /internal/functions/inference-counts in internal.rs.
  • Models:
    • Adds FunctionInferenceCount and ListFunctionsWithInferenceCountResponse types.
  • UI:
    • Updates UI components in index.tsx, FunctionsTable.tsx, and route.tsx to use new API endpoint.
  • Tests:
    • Adds unit tests in inference_stats.rs and mock_clickhouse_connection_info.rs.
    • Adds e2e tests in inference_stats_queries.rs and inference_stats.rs.
  • Misc:
    • Removes old countInferencesByFunction function from inference.server.ts.
    • Renames count field to inference_count for clarity.

This description was created by Ellipsis for f20c30c. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Member Author

/merge-queue

@github-actions
Copy link
Contributor

🚀 Merge queue workflow triggered!

View the run: https://github.com/tensorzero/tensorzero/actions/runs/20443706379

- Add list_functions_with_inference_count method to InferenceStatsQueries trait
- Add FunctionInferenceCount and ListFunctionsWithInferenceCountResponse types
- Implement ClickHouse query for counting inferences by function
- Add route handler at /internal/functions/inference-counts
- Add unit tests and e2e tests for new functionality
- Port UI to use new API endpoint instead of direct ClickHouse query
- Remove old countInferencesByFunction function from inference.server.ts
- Rename 'count' field to 'inference_count' for clarity
@shuyangli shuyangli force-pushed the sl/port-count-inferences-by-function branch from f62006b to f20c30c Compare December 22, 2025 21:00
@shuyangli shuyangli marked this pull request as ready for review December 22, 2025 21:00
@shuyangli shuyangli mentioned this pull request Dec 22, 2025
52 tasks
@shuyangli shuyangli requested a review from virajmehta December 22, 2025 21:30
@shuyangli shuyangli enabled auto-merge December 22, 2025 21:31
@shuyangli shuyangli added this pull request to the merge queue Dec 23, 2025
Merged via the queue into main with commit 7be1423 Dec 23, 2025
56 checks passed
@shuyangli shuyangli deleted the sl/port-count-inferences-by-function branch December 23, 2025 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants