Skip to content

feat(agents-api): add usage tracking + usage table #1316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 12, 2025
Merged

Conversation

Ahmad-mtos
Copy link
Contributor

@Ahmad-mtos Ahmad-mtos commented Apr 11, 2025

User description

Closes #846


PR Type

Enhancement, Tests


Description

  • Added usage tracking for LLM API calls, including token usage and costs.

    • Introduced track_usage and track_embedding_usage utilities for tracking.
    • Integrated usage tracking into acompletion and aembedding functions.
  • Created a new usage table in the database to store usage data.

    • Tracks developer ID, model, token counts, costs, and metadata.
    • Includes support for both standard and custom API usage.
  • Added tests for usage tracking and database interactions.

    • Verified correct record creation, cost calculations, and fallback pricing.
  • Added database migrations for creating and dropping the usage table.


Changes walkthrough 📝

Relevant files
Enhancement
5 files
litellm.py
Integrated usage tracking into LLM API client functions   
+43/-1   
usage.py
Added utilities for tracking token usage and costs             
+121/-0 
__init__.py
Added `usage` module to queries package                                   
+1/-0     
__init__.py
Introduced `usage` module for database operations               
+20/-0   
create_usage_record.py
Added function to create usage records in the database     
+115/-0 
Tests
1 files
test_usage_tracking.py
Added tests for usage tracking and database interactions 
+250/-0 
Configuration changes
2 files
000036_usage.down.sql
Added migration script to drop `usage` table                         
+16/-0   
000036_usage.up.sql
Added migration script to create `usage` table                     
+41/-0   

Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.

  • Important

    Add usage tracking for LLM API calls with a new usage table and integrate tracking into existing functions, including tests.

    • Behavior:
      • Added track_usage and track_embedding_usage utilities in usage.py for tracking LLM API calls.
      • Integrated usage tracking into acompletion and aembedding in litellm.py.
    • Database:
      • Created usage table to store usage data, including developer ID, model, token counts, costs, and metadata.
      • Added migrations 000036_usage.up.sql and 000036_usage.down.sql for creating and dropping the usage table.
    • Tests:
      • Added test_usage_tracking.py to verify usage tracking and database interactions, including cost calculations and fallback pricing.

    This description was created by Ellipsis for 5de4fb2. It will automatically update as commits are pushed.

    Copy link
    Contributor

    qodo-merge-pro-for-open-source bot commented Apr 11, 2025

    CI Feedback 🧐

    (Feedback updated until commit 1494adb)

    A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

    Action: Lint-And-Format

    Failed stage: Run stefanzweifel/git-auto-commit-action@v4 [❌]

    Failure summary:

    The action failed because the git push operation was rejected with a non-fast-forward error. This
    happens when the remote branch has commits that the local branch doesn't have.

    Specifically:

  • The action attempted to push changes to the f/usage-tracking branch
  • The push was rejected because the local branch is behind the remote branch (lines 1424-1428)
  • Git suggests using 'git pull' to integrate remote changes before pushing again
  • This resulted in status code 1, which the action treats as an error (lines 1430-1438)

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    1382:  INPUT_BRANCH value: 
    1383:  From https://github.com/julep-ai/julep
    1384:  + 9eb2e3b...1494adb f/usage-tracking       -> origin/f/usage-tracking  (forced update)
    1385:  * [new branch]      c/bump-typespec        -> origin/c/bump-typespec
    1386:  * [new branch]      dev                    -> origin/dev
    1387:  * [new branch]      f/api-call-integration-tools -> origin/f/api-call-integration-tools
    1388:  * [new branch]      f/chat-system-tool-calls -> origin/f/chat-system-tool-calls
    1389:  * [new branch]      f/claude-code-stuff    -> origin/f/claude-code-stuff
    1390:  * [new branch]      f/dependency-injection -> origin/f/dependency-injection
    1391:  * [new branch]      f/grafana-traefik      -> origin/f/grafana-traefik
    1392:  * [new branch]      f/increase-test-coverage -> origin/f/increase-test-coverage
    1393:  * [new branch]      f/optimize-transition-queries -> origin/f/optimize-transition-queries
    1394:  * [new branch]      f/refactor-tests       -> origin/f/refactor-tests
    1395:  * [new branch]      f/repsonses-filesearch-tool -> origin/f/repsonses-filesearch-tool
    1396:  * [new branch]      f/secrets-store        -> origin/f/secrets-store
    1397:  * [new branch]      f/tasks-validation-errors-enhancement -> origin/f/tasks-validation-errors-enhancement
    1398:  * [new branch]      feature/issue-1162-add-secrets-store -> origin/feature/issue-1162-add-secrets-store
    ...
    
    1410:  INPUT_ADD_OPTIONS: 
    1411:  INPUT_FILE_PATTERN: .
    1412:  INPUT_COMMIT_OPTIONS: 
    1413:  INPUT_COMMIT_USER_NAME: github-actions[bot]
    1414:  INPUT_COMMIT_USER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
    1415:  INPUT_COMMIT_MESSAGE: refactor: Lint agents-api (CI)
    1416:  INPUT_COMMIT_AUTHOR: Ahmad-mtos <Ahmad-mtos@users.noreply.github.com>
    1417:  [f/usage-tracking 01988c5] refactor: Lint agents-api (CI)
    1418:  Author: Ahmad-mtos <Ahmad-mtos@users.noreply.github.com>
    1419:  1 file changed, 1 insertion(+)
    1420:  INPUT_TAGGING_MESSAGE: 
    1421:  No tagging message supplied. No tag will be added.
    1422:  INPUT_PUSH_OPTIONS: 
    1423:  To https://github.com/julep-ai/julep
    1424:  ! [rejected]        f/usage-tracking -> f/usage-tracking (non-fast-forward)
    1425:  error: failed to push some refs to 'https://github.com/julep-ai/julep'
    1426:  hint: Updates were rejected because the tip of your current branch is behind
    1427:  hint: its remote counterpart. If you want to integrate the remote changes,
    1428:  hint: use 'git pull' before pushing again.
    1429:  hint: See the 'Note about fast-forwards' in 'git push --help' for details.
    1430:  Error: Invalid status code: 1
    1431:  at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/index.js:17:19)
    1432:  at ChildProcess.emit (node:events:524:28)
    1433:  at maybeClose (node:internal/child_process:1104:16)
    1434:  at ChildProcess._handle.onexit (node:internal/child_process:304:5) {
    1435:  code: 1
    1436:  }
    1437:  Error: Invalid status code: 1
    1438:  at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/index.js:17:19)
    

    @Ahmad-mtos Ahmad-mtos marked this pull request as ready for review April 12, 2025 09:25
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    🎫 Ticket compliance analysis ✅

    846 - Fully compliant

    Compliant requirements:

    • Store completion costs per entry
    • Store whether a custom API (e.g. OpenAI_API) was used for each entry
    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Error Handling

    The error handling in track_usage and track_embedding_usage only prints errors without proper logging. Consider using a structured logging system for better error tracking and visibility.

    custom_api_used (bool): Whether a custom API key was used.
    metadata (dict): Additional metadata about the usage.
    Fallback Pricing

    The fallback pricing mechanism uses hardcoded values that might become outdated. Consider moving these values to a configuration file or database table for easier maintenance.

    fallback_pricing = {
    # Meta Llama models
    'meta-llama/llama-4-scout': {'api_request': 0.08/1000, 'api_response': 0.45/1000},
    'meta-llama/llama-4-maverick': {'api_request': 0.19/1000, 'api_response': 0.85/1000},
    'meta-llama/llama-4-maverick:free': {'api_request': 0.0/1000, 'api_response': 0.0/1000},
    
    # Qwen model
    'qwen/qwen-2.5-72b-instruct': {'api_request': 0.7/1000, 'api_response': 0.7/1000},
    
    # Sao10k model
    'sao10k/l3.3-euryale-70b': {'api_request': 0.7/1000, 'api_response': 0.8/1000},
    'sao10k/l3.1-euryale-70b': {'api_request': 0.7/1000, 'api_response': 0.8/1000}
    }

    Copy link
    Contributor

    qodo-merge-pro-for-open-source bot commented Apr 12, 2025

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Fix message structure format

    The current implementation for calculating completion tokens is incorrect. When
    using token_counter with messages parameter, each message should have a proper
    structure with a "role" field. The current approach only includes "content"
    which may lead to incorrect token counting.

    agents-api/agents_api/common/utils/usage.py [48-58]

     # Calculate completion tokens from the response
     completion_content = []
     for choice in response.choices:
         if hasattr(choice, "message") and choice.message:
             if hasattr(choice.message, "content") and choice.message.content:
    -            completion_content.append({"content": choice.message.content})
    +            completion_content.append({"role": "assistant", "content": choice.message.content})
     
     completion_tokens = token_counter(
         model=model, 
         messages=completion_content
     ) if completion_content else 0
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    __

    Why: The suggestion correctly identifies a critical issue in token counting. Without the "role" field in the message structure, the token counter may produce incorrect results, which would affect billing and usage tracking accuracy.

    Medium
    General
    Add error logging

    The exception handler doesn't log the actual error that occurred during cost
    calculation, which makes debugging difficult. Add error logging to capture what
    went wrong with the cost_per_token function.

    agents-api/agents_api/queries/usage/create_usage_record.py [76-94]

     # Calculate cost using litellm's cost_per_token function
     try:
         prompt_cost, completion_cost = cost_per_token(model, prompt_tokens=prompt_tokens, completion_tokens=completion_tokens)
         total_cost = prompt_cost + completion_cost
     except Exception as e:
    +    print(f"Error calculating cost with cost_per_token for model {model}: {str(e)}")
         estimated = True
         fallback_pricing = {
         # Meta Llama models
         'meta-llama/llama-4-scout': {'api_request': 0.08/1000, 'api_response': 0.45/1000},
         'meta-llama/llama-4-maverick': {'api_request': 0.19/1000, 'api_response': 0.85/1000},
         'meta-llama/llama-4-maverick:free': {'api_request': 0.0/1000, 'api_response': 0.0/1000},
         
         # Qwen model
         'qwen/qwen-2.5-72b-instruct': {'api_request': 0.7/1000, 'api_response': 0.7/1000},
         
         # Sao10k model
         'sao10k/l3.3-euryale-70b': {'api_request': 0.7/1000, 'api_response': 0.8/1000},
         'sao10k/l3.1-euryale-70b': {'api_request': 0.7/1000, 'api_response': 0.8/1000}
         }
    • Apply this suggestion
    Suggestion importance[1-10]: 5

    __

    Why: The suggestion improves error handling by adding specific logging for cost calculation failures. This would help with debugging and troubleshooting pricing issues, though it's not fixing a critical bug but rather enhancing observability.

    Low
    • Update

    Copy link
    Contributor

    @ellipsis-dev ellipsis-dev bot left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    ❌ Changes requested. Reviewed everything up to e559974 in 2 minutes and 20 seconds

    More details
    • Looked at 689 lines of code in 8 files
    • Skipped 0 files when reviewing.
    • Skipped posting 9 drafted comments based on config settings.
    1. agents-api/agents_api/clients/litellm.py:156
    • Draft comment:
      Use a logging library instead of print for error tracking in embedding usage.
    • Reason this comment was not posted:
      Marked as duplicate.
    2. agents-api/agents_api/queries/usage/create_usage_record.py:54
    • Draft comment:
      Avoid using mutable default arguments for metadata in function parameters.
    • Reason this comment was not posted:
      Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50%
      Looking at the code, while using mutable default arguments is generally considered bad practice, in this specific case: 1) The metadata parameter is only used once at line 109 with "metadata or {}" which creates a new dict if metadata is falsy 2) The metadata is immediately passed to the SQL query and not stored or modified 3) There's no risk of shared state between calls since the dict is not modified.
      While the comment identifies a real Python anti-pattern, am I being too dismissive of a legitimate code quality issue that could cause problems if the code is modified in the future?
      The current code usage is safe and the "metadata or {}" pattern effectively prevents any issues. The comment, while technically correct, doesn't represent a real problem in this specific implementation.
      While the comment identifies a real Python anti-pattern, in this specific case the code is implemented safely and the issue is theoretical rather than practical. The comment should be removed as it doesn't represent a real problem that needs fixing.
    3. agents-api/agents_api/queries/usage/create_usage_record.py:98
    • Draft comment:
      Consider using a logging library instead of print for fallback pricing notifications.
    • Reason this comment was not posted:
      Marked as duplicate.
    4. agents-api/agents_api/clients/litellm.py:118
    • Draft comment:
      Avoid shadowing the built-in name 'input'. Consider renaming this variable (e.g., to 'input_texts' or 'raw_inputs').
    • Reason this comment was not posted:
      Comment was not on a location in the diff, so it can't be submitted as a review comment.
    5. agents-api/agents_api/clients/litellm.py:96
    • Draft comment:
      Use a proper logging mechanism instead of print for error reporting in usage tracking.
    • Reason this comment was not posted:
      Marked as duplicate.
    6. agents-api/agents_api/clients/litellm.py:156
    • Draft comment:
      Use a proper logging mechanism instead of print for error reporting in embedding usage tracking.
    • Reason this comment was not posted:
      Marked as duplicate.
    7. agents-api/agents_api/common/utils/usage.py:23
    • Draft comment:
      Avoid using a mutable default argument for 'metadata'. Use None as the default and assign an empty dict inside the function.
    • Reason this comment was not posted:
      Marked as duplicate.
    8. agents-api/agents_api/common/utils/usage.py:86
    • Draft comment:
      Avoid using a mutable default argument for 'metadata'. Use None as the default and assign an empty dict inside the function.
    • Reason this comment was not posted:
      Marked as duplicate.
    9. agents-api/agents_api/queries/usage/create_usage_record.py:54
    • Draft comment:
      Avoid using a mutable default argument for 'metadata'. Use None as the default and assign {} inside the function to prevent unexpected behavior.
    • Reason this comment was not posted:
      Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50%
      Using mutable default arguments in Python can lead to unexpected behavior when the same default object is shared between function calls. However, in this case, the code already handles this safely by using 'metadata or {}' when building params. The actual risk of bugs is very low here since the metadata dict isn't modified within the function.
      While using mutable defaults is generally considered a Python anti-pattern, the current code already has a safe guard. The comment might be technically correct but not practically important.
      Given that the code already safely handles the metadata with 'or {}' and doesn't modify the dict, this is more of a style preference than a real issue.
      While technically correct, this comment addresses a theoretical issue that's already properly handled in the implementation. The suggested change wouldn't meaningfully improve the code.

    Workflow ID: wflow_0EgharEWFmi2lsWz


    Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

    Copy link
    Contributor

    @ellipsis-dev ellipsis-dev bot left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    ❌ Changes requested. Incremental review on f6226ed in 56 seconds

    More details
    • Looked at 13 lines of code in 1 files
    • Skipped 0 files when reviewing.
    • Skipped posting 1 drafted comments based on config settings.
    1. agents-api/agents_api/queries/usage/create_usage_record.py:54
    • Draft comment:
      Good catch on using None as the default for metadata to avoid mutable defaults. Consider updating the docstring (line 66) to clarify that metadata is Optional[dict[str, Any]].
    • Reason this comment was not posted:
      Confidence changes required: 0% <= threshold 50%
      None

    Workflow ID: wflow_mfgg60upNroHLAMC


    Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

    Copy link
    Contributor

    @ellipsis-dev ellipsis-dev bot left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    👍 Looks good to me! Incremental review on 7b0fad7 in 31 seconds

    More details
    • Looked at 13 lines of code in 1 files
    • Skipped 0 files when reviewing.
    • Skipped posting 3 drafted comments based on config settings.
    1. agents-api/agents_api/queries/usage/create_usage_record.py:54
    • Draft comment:
      Good update: the metadata parameter in the docstring now correctly reflects that it can be None. Ensure this optional behavior is consistently handled in all callers.
    • Reason this comment was not posted:
      Comment was not on a location in the diff, so it can't be submitted as a review comment.
    2. agents-api/agents_api/queries/usage/create_usage_record.py:66
    • Draft comment:
      Good update clarifying that metadata can be None. This ensures the docstring aligns with the function signature. Consider using Optional[dict] if a more explicit type hint is preferred.
    • Reason this comment was not posted:
      Confidence changes required: 0% <= threshold 50%
      None
    3. agents-api/agents_api/queries/usage/create_usage_record.py:27
    • Draft comment:
      Typographical issue: In the SQL query definition, the closing part of the column list (after 'metadata') uses a colon (':') on line 27 instead of a closing parenthesis (')'). This might lead to SQL syntax issues. Please update ':' to ')' to fix the format.
    • Reason this comment was not posted:
      Comment was not on a location in the diff, so it can't be submitted as a review comment.

    Workflow ID: wflow_HqgpzXka6vtgYs3S


    You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

    Copy link
    Contributor

    @ellipsis-dev ellipsis-dev bot left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    👍 Looks good to me! Incremental review on fb478b3 in 52 seconds

    More details
    • Looked at 415 lines of code in 6 files
    • Skipped 0 files when reviewing.
    • Skipped posting 8 drafted comments based on config settings.
    1. agents-api/agents_api/common/utils/usage.py:21
    • Draft comment:
      Consider replacing the mutable default for 'metadata' (dict) with None to avoid potential side-effects. E.g., use 'metadata: dict[str, Any] | None = None' and then inside the function assign 'metadata = metadata or {}'.
    • Reason this comment was not posted:
      Comment was not on a location in the diff, so it can't be submitted as a review comment.
    2. agents-api/agents_api/clients/litellm.py:12
    • Draft comment:
      Minor formatting: The import order change looks cosmetic but ensures consistency; no action needed if that's intended.
    • Reason this comment was not posted:
      Confidence changes required: 0% <= threshold 50%
      None
    3. agents-api/agents_api/queries/usage/create_usage_record.py:78
    • Draft comment:
      Fallback pricing is computed correctly when cost_per_token fails. Logging a message via print is acceptable, but consider using a structured logging framework for production reliability.
    • Reason this comment was not posted:
      Confidence changes required: 33% <= threshold 50%
      None
    4. agents-api/tests/test_usage_tracking.py:192
    • Draft comment:
      Tests are comprehensive and cover both scenarios with and without response.usage. No changes required.
    • Reason this comment was not posted:
      Confidence changes required: 0% <= threshold 50%
      None
    5. agents-api/agents_api/clients/litellm.py:118
    • Draft comment:
      Avoid using the variable name 'input' as it shadows the built-in. Consider renaming it (e.g., to 'payload' or 'inputs_list').
    • Reason this comment was not posted:
      Comment was not on a location in the diff, so it can't be submitted as a review comment.
    6. agents-api/agents_api/common/utils/usage.py:22
    • Draft comment:
      Avoid using mutable default arguments for 'metadata'. Use None as the default and then assign {} inside the function to prevent unintended side effects.
    • Reason this comment was not posted:
      Comment was not on a location in the diff, so it can't be submitted as a review comment.
    7. agents-api/agents_api/common/utils/usage.py:86
    • Draft comment:
      Avoid using mutable default arguments for 'metadata' in track_embedding_usage. Use None as the default and assign {} within the function.
    • Reason this comment was not posted:
      Comment was not on a location in the diff, so it can't be submitted as a review comment.
    8. agents-api/agents_api/queries/usage/create_usage_record.py:120
    • Draft comment:
      Consider using a logger instead of print for reporting missing fallback pricing. This change would improve maintainability and consistency with the rest of the codebase.
    • Reason this comment was not posted:
      Comment was on unchanged code.

    Workflow ID: wflow_2JaMdrgR9TPh3U2G


    You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

    Copy link
    Contributor

    @ellipsis-dev ellipsis-dev bot left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    ❌ Changes requested. Incremental review on 9eb2e3b in 1 minute and 10 seconds

    More details
    • Looked at 85 lines of code in 1 files
    • Skipped 0 files when reviewing.
    • Skipped posting 4 drafted comments based on config settings.
    1. agents-api/agents_api/queries/usage/create_usage_record.py:120
    • Draft comment:
      Avoid using print statements for error logging. Consider using a logging framework to record missing fallback pricing info.
    • Reason this comment was not posted:
      Comment was not on a location in the diff, so it can't be submitted as a review comment.
    2. agents-api/agents_api/queries/usage/create_usage_record.py:111
    • Draft comment:
      Consider logging the exception details in the cost calculation try/except block to aid in debugging.
    • Reason this comment was not posted:
      Comment was on unchanged code.
    3. agents-api/agents_api/queries/usage/create_usage_record.py:120
    • Draft comment:
      Avoid using print statements in production code; consider using a proper logging mechanism.
    • Reason this comment was not posted:
      Comment was not on a location in the diff, so it can't be submitted as a review comment.
    4. agents-api/agents_api/queries/usage/create_usage_record.py:106
    • Draft comment:
      Catching a broad exception here may mask specific errors. Consider catching specific exceptions raised by cost_per_token.
    • Reason this comment was not posted:
      Comment was not on a location in the diff, so it can't be submitted as a review comment.

    Workflow ID: wflow_pcJ6nmGSxOluG7o5


    Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

    Copy link
    Contributor

    @ellipsis-dev ellipsis-dev bot left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    👍 Looks good to me! Incremental review on 5de4fb2 in 45 seconds

    More details
    • Looked at 27 lines of code in 1 files
    • Skipped 0 files when reviewing.
    • Skipped posting 4 drafted comments based on config settings.
    1. agents-api/agents_api/queries/usage/create_usage_record.py:115
    • Draft comment:
      Use proper logging for missing fallback pricing instead of print(). This is best practice for production code.
    • Reason this comment was not posted:
      Comment was on unchanged code.
    2. agents-api/agents_api/queries/usage/create_usage_record.py:112
    • Draft comment:
      Ensure exception handling in cost calculation logs the error or provides context for debugging.
    • Reason this comment was not posted:
      Comment was on unchanged code.
    3. agents-api/agents_api/queries/usage/create_usage_record.py:16
    • Draft comment:
      Good job renaming fallback_pricing to FALLBACK_PRICING to follow constant naming conventions. Ensure this naming is consistently used across the module.
    • Reason this comment was not posted:
      Confidence changes required: 0% <= threshold 50%
      None
    4. agents-api/agents_api/queries/usage/create_usage_record.py:121
    • Draft comment:
      Avoid using print() for fallback logging. Consider using a proper logging mechanism (e.g., using the logging module) for better control in production.
    • Reason this comment was not posted:
      Comment was on unchanged code.

    Workflow ID: wflow_wwgEeO3Cj1npKxYE


    You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

    @Ahmad-mtos Ahmad-mtos merged commit 377717e into dev Apr 12, 2025
    14 checks passed
    @Ahmad-mtos Ahmad-mtos deleted the f/usage-tracking branch April 12, 2025 13:29
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    [Feature]: Store more info in entries
    2 participants