-
Notifications
You must be signed in to change notification settings - Fork 930
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
feat(agents-api): Limit free users to 50 executions and sessions #865
Conversation
Signed-off-by: Diwank Singh Tomer <[email protected]>
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.
👍 Looks good to me! Reviewed everything up to 06c5041 in 1 minute and 33 seconds
More details
- Looked at
305
lines of code in11
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. .env.example:25
- Draft comment:
The environment variablesMAX_FREE_SESSIONS
andMAX_FREE_EXECUTIONS
are added, but there is no validation or enforcement logic in the codebase to ensure these limits are respected. Ensure that these limits are enforced in the application logic. - Reason this comment was not posted:
Confidence changes required:50%
The PR introduces new environment variables for limiting free sessions and executions. These variables are added to the .env.example file and are used in the env.py file. However, there is no validation or enforcement logic in the codebase to ensure these limits are respected. This could lead to potential issues if the limits are not enforced elsewhere in the application.
Workflow ID: wflow_WMwkd1ogkGIQMGdR
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on e6e6068 in 31 seconds
More details
- Looked at
104
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. agents-api/agents_api/routers/sessions/chat.py:58
- Draft comment:
Ifcount_sessions_query
is an asynchronous function, it should be awaited to ensure proper execution. Please verify if it needs to be awaited. - Reason this comment was not posted:
Comment did not seem useful.
2. agents-api/agents_api/routers/tasks/create_task_execution.py:126
- Draft comment:
Ifcount_executions_query
is an asynchronous function, it should be awaited to ensure proper execution. Please verify if it needs to be awaited. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_uTuf3wj7sX6euQOn
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
… + removed Google cloud models in config
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.
👍 Looks good to me! Incremental review on 71043d0 in 26 seconds
More details
- Looked at
55
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. agents-api/agents_api/routers/tasks/create_task_execution.py:120
- Draft comment:
The importAnnotated
is not used in this file and should be removed to clean up the code. - Reason this comment was not posted:
Marked as duplicate.
2. agents-api/agents_api/routers/tasks/create_task_execution.py:18
- Draft comment:
The importAnnotated
is not used in this file and should be removed to clean up the code. - Reason this comment was not posted:
Comment was not on a valid diff hunk.
Workflow ID: wflow_pw3aSs5mnrgLrslV
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Before merging kindly make sure that the paid users have |
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.
Skipped PR review on b3a94a6 because no changed files had a supported extension. If you think this was in error, please contact us and we'll fix it right away.
Signed-off-by: Diwank Singh Tomer [email protected]
Important
Limit free users to 50 sessions and executions, adding counting functions and tests for these limits.
MAX_FREE_SESSIONS
andMAX_FREE_EXECUTIONS
to.env.example
andenv.py
.count_executions()
incount_executions.py
to count executions for a givendeveloper_id
andtask_id
.count_sessions()
incount_sessions.py
to count sessions for a givendeveloper_id
.chat()
inchat.py
to enforce session limits for free users.create_task_execution()
increate_task_execution.py
to enforce execution limits for free users.count_executions()
intest_execution_queries.py
.count_sessions()
intest_session_queries.py
.JinjaTemplate
fromTasks.py
,RootModel
fromTools.py
, andRemoteList
fromtemporal.py
.This description was created by
for 71043d0. It will automatically update as commits are pushed.