-
Notifications
You must be signed in to change notification settings - Fork 927
Add usage reference fields #1478
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
base: dev
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed everything up to 03fe889 in 44 seconds. Click for details.
- Reviewed
210
lines of code in5
files - Skipped
0
files when reviewing. - Skipped posting
6
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. agents-api/agents_api/common/utils/usage.py:21
- Draft comment:
New tracking parameters (execution_id, transition_id, session_id, entry_id, provider) are added and included in the function docstring and call to create_usage_record. Confirm that these match the DB schema. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
2. agents-api/agents_api/queries/usage/create_usage_record.py:96
- Draft comment:
SQL query and function signature are updated with new fields; ensure parameter order in the query matches the params list. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
3. memory-store/README.md:12
- Draft comment:
The README update clearly documents the new usage table columns, which improves clarity for future migrations. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
4. memory-store/migrations/000042_usage_reference_fields.up.sql:4
- Draft comment:
Migration script correctly adds new columns and creates indexes. Consider using CREATE INDEX CONCURRENTLY for production environments if downtime is a concern. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
5. memory-store/migrations/000042_usage_reference_fields.down.sql:3
- Draft comment:
Down migration properly removes the new columns and drops the corresponding indexes. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
6. agents-api/agents_api/common/utils/usage.py:29
- Draft comment:
Typo: It looks like there's an extra colon in the function signature. The closing line reads): -> None:
. It should likely be) -> None:
. - 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_YHqFwlycLjPqvwqo
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
PR Code Suggestions ✨Explore these optional code suggestions:
|
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
User description
Summary
Testing
poetry run poe format
poetry run poe lint
poetry run poe typecheck
(fails: KeyboardInterrupt)poetry run poe test
(fails: Aborted)poetry run poe check
(fails: Sequence aborted)https://chatgpt.com/codex/tasks/task_e_6846e15d915083219cbc49199bf5a298
PR Type
enhancement, documentation
Description
Add new reference fields to the
usage
table for better tracking.execution_id
,transition_id
,session_id
,entry_id
,provider
.Update usage tracking utilities to support new fields.
Document new columns in the project README.
Changes walkthrough 📝
000042_usage_reference_fields.up.sql
Add reference columns and indexes to usage table
memory-store/migrations/000042_usage_reference_fields.up.sql
usage
table:execution_id
,transition_id
,session_id
,entry_id
,provider
.provider
column.000042_usage_reference_fields.down.sql
Remove reference columns and indexes from usage table
memory-store/migrations/000042_usage_reference_fields.down.sql
usage
table.create_usage_record.py
Add reference fields to usage record creation
agents-api/agents_api/queries/usage/create_usage_record.py
usage.py
Support reference fields in usage tracking utilities
agents-api/agents_api/common/utils/usage.py
track_usage
andtrack_embedding_usage
to accept and forwardnew reference fields.
create_usage_record
.README.md
Document new usage table reference columns
memory-store/README.md
usage
table.