-
Notifications
You must be signed in to change notification settings - Fork 973
refactor(agents-api): Switch to psycopg from asyncpg #1505
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: r/switch-to-pytest
Are you sure you want to change the base?
Conversation
Signed-off-by: Diwank Singh Tomer <diwank.singh@gmail.com>
Claude finished @creatorrr's task —— View job PR Review: Switch to psycopg from asyncpgReviewing this major database driver migration across 100 files. This is a significant infrastructure change that requires careful analysis. Review Checklist:
🚨 Critical Finding: Migration is IncompleteDespite the PR title indicating "Switch to psycopg from asyncpg", the actual migration has not been completed. The codebase still predominantly uses asyncpg: Evidence of Incomplete Migration:
📋 Code Quality Assessment✅ Positive Aspects:
|
CI Feedback 🧐(Feedback updated until commit d3888cf)A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
Caution
Changes requested ❌
Reviewed everything up to d3888cf in 3 minutes and 35 seconds. Click for details.
- Reviewed
6325
lines of code in127
files - Skipped
0
files when reviewing. - Skipped posting
9
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/expressions.py:15
- Draft comment:
Constants were relocated in the file. Ensure the new position (after some imports) is intentional and that evaluation functions using these values are not affected by initialization order. - Reason this comment was not posted:
Comment was on unchanged code.
2. agents-api/agents_api/queries/agents/list_agents.py:45
- Draft comment:
The ORDER BY clause and parameter placeholders have been re-indexed. Verify that the merged metadata filter (via build_metadata_filter_conditions) preserves the expected parameter order, so that $2–$5 still map correctly to sort_by, direction, limit, and offset. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the PR author to verify the behavior of the code, which violates the rule against asking the author to confirm or verify intentions. It does not provide a specific suggestion or point out a specific issue with the code.
3. agents-api/agents_api/queries/executions/list_execution_transitions.py:126
- Draft comment:
Scope filter condition uses placeholder $7 when scope_id is provided. Confirm that appending scope_id maintains consistent parameter indexing compared to the base params list. - Reason this comment was not posted:
Comment looked like it was already resolved.
4. agents-api/agents_api/queries/sql_builder.py:39
- Draft comment:
The safe_identifier function uses a basic alphanumeric check for SQL identifiers. Consider a more robust escaping mechanism to safely handle identifiers that may include reserved words or special characters. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% The comment raises a valid security concern, but the code's docstring already explicitly acknowledges this limitation with "Note: This is a simple implementation. In production, consider using a more robust identifier escaping mechanism." The comment is essentially repeating what's already documented in the code itself. The comment could be valuable if it provided specific suggestions for better escaping mechanisms or pointed out concrete vulnerabilities in the current approach. Since the code already acknowledges this limitation and the comment doesn't provide additional actionable information beyond what's in the docstring, it's not adding value. Delete the comment since it's redundant with the existing docstring and doesn't provide additional actionable guidance.
5. agents-api/agents_api/queries/sql_builder.py:315
- Draft comment:
build_patch_query falls back to a SELECT query when there are no fields to update. Ensure this behavior is well documented and that downstream code properly handles the SELECT as an alternative to an UPDATE. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment suggests ensuring that a specific behavior is documented and handled properly in downstream code. This falls under asking the PR author to ensure something is done, which is against the rules. The comment does not provide a specific code suggestion or ask for a specific test to be written.
6. agents-api/agents_api/queries/users/patch_user.py:146
- Draft comment:
Similar to patch_agent, metadata is merged via a string replace in the update query. This approach is brittle; consider integrating the merge operator directly when building the query to avoid unintended replacements. - Reason this comment was not posted:
Marked as duplicate.
7. agents-api/agents_api/queries/users/patch_user.py:156
- Draft comment:
The final parameters combine developer_id and the project name (defaulting to 'default' if not provided). Verify that this defaulting behavior is consistent with other parts of the codebase, ensuring a uniform handling of missing project information. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the PR author to verify the consistency of defaulting behavior across the codebase, which is against the rules. It doesn't provide a specific suggestion or point out a specific issue with the code.
8. agents-api/agents_api/common/utils/expressions.py:98
- Draft comment:
The comment reads "frozen_box doesn't work coz we need some mutability in the values." Consider using a more formal alternative such as "because" instead of "coz" to improve clarity and readability. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is focused on suggesting a change in language for clarity and readability, which is not directly related to the functionality or correctness of the code. It doesn't provide a specific code suggestion or highlight a potential issue with the code itself. Therefore, it doesn't align with the rules for useful comments.
9. agents-api/tests/test_prepare_for_step.py:176
- Draft comment:
It looks like there's an unintended use of backticks in the string literal for the workflow on this line: "subworkflow
[0].if_else.then". Should this be "subworkflow[0].if_else.then" instead? - 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_fazGq7TclCMtpS8F
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
# Special handling for metadata - use JSONB merge | ||
if data.metadata is not None: | ||
# Find metadata in update query and modify it to use merge operator | ||
update_query = update_query.replace( |
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.
The update query is now built using build_patch_query with a param_offset of 2, and the metadata field is modified by a string replace. This string substitution for the JSONB merge operator is fragile; consider a more robust mechanism to ensure only the intended clause is altered.
""" | ||
clause_parts = [] | ||
params = [] | ||
param_idx = len(self.params) + 1 |
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.
In build_limit_offset, parameters are managed manually. For consistency and to avoid potential parameter index conflicts, consider using the builder's add_param method instead of manual index tracking.
User description
Signed-off-by: Diwank Singh Tomer diwank.singh@gmail.com
PR Type
Enhancement, Other
Description
• Major refactoring: Added new
SQLBuilder
class for safe dynamic SQL query construction with parameter placeholders and SQL injection prevention• Database query improvements: Refactored agent and user patching queries to use new SQL builder utilities, replacing complex CASE/WHEN patterns
• Query optimization: Enhanced agent listing and execution transitions queries with dynamic filtering capabilities
• Code formatting: Applied comprehensive formatting improvements across the entire codebase including:
• Performance improvements: Test runtime measurements show significant performance gains across the test suite
• Maintainability: Improved separation of concerns and type safety in database operations
Changes walkthrough 📝
5 files
sql_builder.py
Add SQL builder utilities for dynamic query construction
agents-api/agents_api/queries/sql_builder.py
• Added a new SQLBuilder class for safe dynamic SQL query construction
• Implemented methods for building UPDATE, WHERE, ORDER BY, and LIMIT
clauses
• Added utility functions for building patch queries and JSONB
updates
• Includes parameter placeholders and SQL injection prevention
patch_agent.py
Refactor agent patching to use SQL builder utilities
agents-api/agents_api/queries/agents/patch_agent.py
• Refactored to use the new
build_patch_query
utility from sql_builder• Replaced complex CASE/WHEN SQL patterns with dynamic query building
• Simplified parameter handling and improved type safety
• Added
special handling for metadata JSONB merge operations
patch_user.py
Refactor user patching to use SQL builder utilities
agents-api/agents_api/queries/users/patch_user.py
• Refactored to use the new
build_patch_query
utility from sql_builder• Replaced complex CASE/WHEN SQL patterns with dynamic query building
• Simplified parameter handling and improved maintainability
• Added
special handling for metadata JSONB merge operations
list_agents.py
Refactor agent listing to use metadata filter utilities
agents-api/agents_api/queries/agents/list_agents.py
• Refactored to use
build_metadata_filter_conditions
utility function• Simplified SQL query construction and parameter handling
• Improved
separation of concerns between base query and dynamic filters
list_execution_transitions.py
Refactor execution transitions query with dynamic filtering
agents-api/agents_api/queries/executions/list_execution_transitions.py
• Refactored SQL query construction to use dynamic string formatting
•
Improved separation of base query and conditional filters
• Applied
consistent formatting to decorator and function definitions
77 files
task_validation.py
Code formatting improvements for task validation utilities
agents-api/agents_api/common/utils/task_validation.py
• Reformatted import statements to use multi-line format
• Applied
consistent code formatting to list comprehensions and dictionary
structures
• Improved readability of nested conditional statements and
function calls
test_docs_routes.py
Code formatting improvements for document route tests
agents-api/tests/test_docs_routes.py
• Applied consistent formatting to function calls and method
invocations
• Reformatted long parameter lists to use multi-line
format
• Improved readability of test assertions and data structures
test_task_execution_workflow.py
Code formatting improvements for task execution workflow tests
agents-api/tests/test_task_execution_workflow.py
• Reformatted long function calls and parameter lists for better
readability
• Applied consistent multi-line formatting to patch
decorators and assertions
• Improved code structure in test method
definitions
test_mmr.py
Code formatting improvements for MMR algorithm tests
agents-api/tests/test_mmr.py
• Reformatted test data creation and function calls for better
readability
• Applied consistent multi-line formatting to list
comprehensions and assertions
• Improved structure of test method
parameters and return values
test_chat_streaming.py
Code formatting improvements for chat streaming tests
agents-api/tests/test_chat_streaming.py
• Applied consistent formatting to patch decorators and function calls
• Reformatted long parameter lists and assertions for better
readability
• Improved code structure in streaming chat test methods
env.py
Code formatting improvements for environment configuration
agents-api/agents_api/env.py
• Applied consistent multi-line formatting to environment variable
definitions
• Reformatted long parameter lists and function calls for
better readability
db_exceptions.py
Code formatting improvements for database exception handling
agents-api/agents_api/common/utils/db_exceptions.py
• Applied consistent multi-line formatting to exception mapping
dictionaries
• Reformatted long parameter lists and function calls for
better readability
• Improved code structure in error handling
utilities
__init__.py
Code formatting improvements for task execution workflows
agents-api/agents_api/workflows/task_execution/init.py
• Applied consistent formatting to conditional statements and function
calls
• Reformatted long parameter lists and timeout configurations
•
Improved readability of workflow step handling methods
test_task_validation.py
Code formatting improvements for task validation tests
agents-api/tests/test_task_validation.py
• Applied consistent multi-line formatting to import statements and
test data
• Reformatted test method definitions and assertions for
better readability
• Improved structure of test case parameters and
expected results
test_task_routes.py
Code formatting improvements for task route tests
agents-api/tests/test_task_routes.py
• Applied consistent formatting to function calls and method
invocations
• Reformatted long parameter lists and test assertions
•
Improved readability of route testing methods
test_secrets_usage.py
Code formatting improvements for secrets usage tests
agents-api/tests/test_secrets_usage.py
• Applied consistent multi-line formatting to patch decorators and
function calls
• Reformatted long parameter lists and test data
structures
• Improved readability of secrets usage test methods
test_usage_cost.py
Code formatting improvements for usage cost tests
agents-api/tests/test_usage_cost.py
• Applied consistent formatting to function calls and method
invocations
• Reformatted long parameter lists and test assertions
•
Improved readability of usage cost testing methods
test_middleware.py
Code formatting improvements for middleware tests
agents-api/tests/test_middleware.py
• Applied consistent multi-line formatting to patch decorators and
function calls
• Reformatted long parameter lists and test assertions
• Improved readability of middleware testing methods
test_usage_tracking.py
Code formatting improvements for usage tracking tests
agents-api/tests/test_usage_tracking.py
• Applied consistent formatting to function calls and method
invocations
• Reformatted long parameter lists and test data
structures
• Improved readability of usage tracking test methods
evaluator.py
Code formatting improvements for expression evaluator utilities
agents-api/agents_api/common/utils/evaluator.py
• Applied consistent multi-line formatting to import statements and
function calls
• Reformatted long parameter lists and conditional
statements
• Improved readability of evaluator utility functions
openapi_model.py
Code formatting improvements for OpenAPI model definitions
agents-api/agents_api/autogen/openapi_model.py
• Applied consistent multi-line formatting to model configuration
dictionaries
• Reformatted long parameter lists and validation methods
• Improved readability of OpenAPI model definitions
utils.py
Code formatting improvements for database query utilities
agents-api/agents_api/queries/utils.py
• Applied consistent multi-line formatting to function calls and data
structures
• Reformatted long parameter lists and conditional
statements
• Improved readability of database query utility functions
tasks.py
Code formatting improvements for task protocol utilities
agents-api/agents_api/common/protocol/tasks.py
• Applied consistent formatting to conditional statements and function
calls
• Reformatted long parameter lists and method invocations
•
Improved readability of task protocol implementation
helpers.py
Code formatting improvements for task execution helpers
agents-api/agents_api/workflows/task_execution/helpers.py
• Applied consistent multi-line formatting to import statements and
function calls
• Reformatted long parameter lists and workflow
configurations
• Improved readability of task execution helper
functions
web.py
Code formatting improvements for web application utilities
agents-api/agents_api/web.py
• Applied consistent formatting to conditional statements and string
operations
• Reformatted long parameter lists and error handling logic
• Improved readability of web application utilities
gather_messages.py
Code formatting improvements for chat message gathering
agents-api/agents_api/queries/chat/gather_messages.py
• Applied consistent multi-line formatting to decorator and function
definitions
• Reformatted long parameter lists and list comprehensions
• Improved readability of message gathering utilities
test_docs_queries.py
Code formatting improvements for document query tests
agents-api/tests/test_docs_queries.py
• Applied consistent formatting to function calls and method
invocations
• Reformatted long parameter lists and test assertions
•
Improved readability of document query testing methods
create_response.py
Code formatting improvements for response creation router
agents-api/agents_api/routers/responses/create_response.py
• Applied consistent formatting to conditional statements and function
calls
• Reformatted long parameter lists and list comprehensions
•
Improved readability of response creation logic
expressions.py
Code formatting improvements for expression evaluation utilities
agents-api/agents_api/common/utils/expressions.py
• Reorganized import statements and moved constants after imports
•
Applied consistent formatting to conditional statements and function
calls
• Improved readability of expression evaluation utilities
execute_api_call.py
Code formatting improvements for API call execution
agents-api/agents_api/activities/execute_api_call.py
• Split long lines for
follow_redirects
andinclude_response_content
parameter extraction
• Split long line for error body truncation in
HTTP error handling
• Split long line for response content base64
encoding
test_agent_queries.py
Function signature formatting improvements in agent tests
agents-api/tests/test_agent_queries.py
• Split long function parameter lists across multiple lines for better
readability
• Applied consistent line breaking to function signatures
with multiple parameters
test_chat_routes.py
Line length formatting improvements in chat route tests
agents-api/tests/test_chat_routes.py
• Split long lines in test assertions and variable assignments
•
Improved readability of template strings and assertion statements
test_secrets_queries.py
Function signature and assertion formatting in secrets tests
agents-api/tests/test_secrets_queries.py
• Split long function signatures across multiple lines
• Improved
formatting of assertion statements and metadata comparisons
test_prepare_for_step.py
Transition target constructor formatting improvements
agents-api/tests/test_prepare_for_step.py
• Split long
TransitionTarget
constructor calls across multiple lines• Improved readability of workflow transition test setup
tool_executor.py
Tool executor constructor and expression formatting
agents-api/agents_api/activities/tool_executor.py
• Split long
WebPreviewToolCall
constructor calls across multiplelines
• Improved formatting of conditional expressions for tool output
handling
app.py
Application initialization formatting improvements
agents-api/agents_api/app.py
• Split long function calls for database pool creation and state
checks
• Improved formatting of
Instrumentator
method chainingmodel_converters.py
Model converter formatting and exception handling improvements
agents-api/agents_api/routers/utils/model_converters.py
• Split long lines in HTTP exception handling and message construction
• Improved formatting of dictionary and list comprehensions
agents.py
Agent exception constructor formatting improvements
agents-api/agents_api/common/exceptions/agents.py
• Split long exception initialization calls across multiple lines
•
Improved readability of error message formatting
interceptors.py
Interceptor import and method signature formatting
agents-api/agents_api/common/interceptors.py
• Split long import statements and function signatures
• Improved
formatting of workflow and activity interceptor methods
test_user_queries.py
User query test formatting improvements
agents-api/tests/test_user_queries.py
• Split long function signatures and assertion statements
• Improved
formatting consistency across user query tests
conftest.py
Test configuration and fixture formatting improvements
agents-api/tests/conftest.py
• Split long function calls and container initialization
• Improved
formatting of test fixture setup and teardown
test_execution_workflow.py
Execution workflow test formatting improvements
agents-api/tests/test_execution_workflow.py
• Split long list comprehensions and event filtering logic
• Improved
formatting of workflow execution test assertions
test_tool_call_step.py
Tool call step test parameter formatting
agents-api/tests/test_tool_call_step.py
• Split long dictionary definitions for tool parameters
• Improved
formatting of UUID and tool call assertions
litellm.py
LiteLLM client formatting improvements
agents-api/agents_api/clients/litellm.py
• Split long list comprehensions and dictionary construction
•
Improved formatting of HTTP headers and API client setup
stream_execution_status.py
Execution status streaming formatting improvements
agents-api/agents_api/routers/tasks/stream_execution_status.py
• Split long function calls and error message formatting
• Improved
readability of execution status streaming logic
prompt_step.py
Prompt step conditional expression formatting
agents-api/agents_api/activities/task_steps/prompt_step.py
• Split long conditional expressions and prompt handling logic
•
Improved formatting of agent model selection and prompt wrapping
test_transitions_queries.py
Transition query test parameter formatting
agents-api/tests/test_transitions_queries.py
• Split long dictionary definitions and function calls
• Improved
formatting of transition query test parameters
stream_transitions_events.py
Transition event streaming formatting improvements
agents-api/agents_api/routers/tasks/stream_transitions_events.py
• Split long attribute access chains and dictionary construction
•
Improved formatting of event streaming and payload handling
humanization_utils.py
Translation utility formatting improvements
agents-api/agents_api/common/utils/humanization_utils.py
• Split long
GoogleTranslator
constructor and method calls• Improved
formatting of translation utility functions
test_entry_queries.py
Entry query test function signature formatting
agents-api/tests/test_entry_queries.py
• Split long function signatures across multiple lines
• Improved
formatting consistency in entry query tests
test_session_routes.py
Session route test formatting improvements
agents-api/tests/test_session_routes.py
• Split long function calls and HTTP request formatting
• Improved
readability of session route test methods
test_session_queries.py
Session query test function signature formatting
agents-api/tests/test_session_queries.py
• Split long function signatures across multiple lines
• Improved
formatting consistency in session query tests
mmr.py
MMR algorithm expression and signature formatting
agents-api/agents_api/common/utils/mmr.py
• Split long mathematical expressions and function signatures
•
Improved formatting of maximal marginal relevance calculations
test_model_validation.py
Model validation test patch formatting
agents-api/tests/test_model_validation.py
• Split long patch decorator paths across multiple lines
• Improved
formatting of model validation test setup
create_doc.py
Document creation query parameter formatting
agents-api/agents_api/queries/docs/create_doc.py
• Split long tuple definitions for query parameters
• Improved
formatting of document creation query construction
render.py
Session render function signature and return formatting
agents-api/agents_api/routers/sessions/render.py
• Split long function signatures and return type annotations
•
Improved formatting of chat input rendering logic
test_nlp_utilities.py
NLP utility test parameter formatting improvements
agents-api/tests/test_nlp_utilities.py
• Split long test parameter tuples and expected result sets
• Improved
formatting of NLP utility test cases
workflows.py
Workflow utility assertion formatting improvements
agents-api/agents_api/common/utils/workflows.py
• Split long assertion statements with complex conditions
• Improved
readability of workflow name extraction logic
list_execution_inputs_data.py
Execution input data query exception decorator formatting
agents-api/agents_api/queries/executions/list_execution_inputs_data.py
• Split long
@rewrap_exceptions
decorator dictionary across multiplelines
• Improved formatting of exception handling configuration
list_execution_state_data.py
Execution state data query exception decorator formatting
agents-api/agents_api/queries/executions/list_execution_state_data.py
• Split long
@rewrap_exceptions
decorator dictionary across multiplelines
• Improved formatting of exception handling configuration
search_docs.py
Document search parameter type annotation formatting
agents-api/agents_api/routers/docs/search_docs.py
• Split long union type annotations across multiple lines
• Improved
formatting of document search parameter types
nlp.py
NLP keyword extraction formatting improvements
agents-api/agents_api/common/nlp.py
• Split long list comprehensions and normalization logic
• Improved
formatting of keyword extraction and processing
tool_call_step.py
Tool call step function signature formatting
agents-api/agents_api/activities/task_steps/tool_call_step.py
• Split long function signature across multiple lines
• Improved
formatting of tool call construction function
list_executions.py
Execution list query exception decorator formatting
agents-api/agents_api/queries/executions/list_executions.py
• Split long
@rewrap_exceptions
decorator dictionary across multiplelines
• Improved formatting of execution list query exception handling
test_files_queries.py
File query test function signature formatting
agents-api/tests/test_files_queries.py
• Split long function signatures across multiple lines
• Improved
formatting consistency in file query tests
secrets.py
Secret utility function signature formatting
agents-api/agents_api/common/utils/secrets.py
• Split long function signature across multiple lines
• Improved
formatting of secret retrieval function
create_task.py
Task creation workflow parameter formatting
agents-api/agents_api/queries/tasks/create_task.py
• Split long list append operations across multiple lines
• Improved
formatting of workflow parameter construction
codec.py
Worker codec formatting improvements
agents-api/agents_api/worker/codec.py
• Split long string formatting and version checking logic
• Improved
formatting of payload encoding/decoding operations
test_expression_validation.py
Expression validation test assertion formatting
agents-api/tests/test_expression_validation.py
• Split long assertion statements with complex conditions
• Improved
formatting of expression validation test assertions
create_usage_record.py
Usage record creation formatting improvements
agents-api/agents_api/queries/usage/create_usage_record.py
• Split long conditional expressions and print statements
• Improved
formatting of usage cost calculation logic
update_execution.py
Execution update formatting improvements
agents-api/agents_api/routers/tasks/update_execution.py
• Split long function calls and exception handling
• Improved
formatting of execution update logic
developer_id.py
Developer ID dependency formatting improvements
agents-api/agents_api/dependencies/developer_id.py
• Split long assertion statements and function calls
• Improved
formatting of developer ID dependency logic
base_evaluate.py
Base evaluate function call formatting
agents-api/agents_api/activities/task_steps/base_evaluate.py
• Split long function call across multiple lines
• Improved formatting
of expression evaluation function call
create_or_update_task.py
Task create/update workflow parameter formatting
agents-api/agents_api/queries/tasks/create_or_update_task.py
• Split long list append operations across multiple lines
• Improved
formatting of workflow parameter construction
patch_task.py
Task patch workflow parameter formatting
agents-api/agents_api/queries/tasks/patch_task.py
• Split long list append operations across multiple lines
• Improved
formatting of workflow parameter construction
update_task.py
Task update workflow parameter formatting
agents-api/agents_api/queries/tasks/update_task.py
• Split long list append operations across multiple lines
• Improved
formatting of workflow parameter construction
delete_doc.py
Document deletion route decorator formatting
agents-api/agents_api/routers/docs/delete_doc.py
• Split long decorator lines across multiple lines
• Improved
formatting of route decorator definitions
create_or_update_task.py
Task create/update route formatting improvements
agents-api/agents_api/routers/tasks/create_or_update_task.py
• Split long decorator and exception handling lines
• Improved
formatting of task creation route logic
sync_s3.py
S3 client configuration formatting improvements
agents-api/agents_api/clients/sync_s3.py
• Split long configuration dictionary across multiple lines
• Improved
formatting of S3 client configuration
users.py
User exception constructor formatting
agents-api/agents_api/common/exceptions/users.py
• Split long exception initialization call across multiple lines
•
Improved formatting of user exception constructor
chat.py
Chat session response formatting improvements
agents-api/agents_api/routers/sessions/chat.py
• Split long dictionary access and conditional expressions
• Improved
formatting of chat response streaming logic
get_response.py
Response retrieval formatting improvements
agents-api/agents_api/routers/responses/get_response.py
• Split long exception and object construction calls
• Improved
formatting of response retrieval logic
1 files
.pytest-runtimes
Updated test runtime measurements showing performance improvements
agents-api/.pytest-runtimes
• Updated test runtime measurements for all test cases
• Most test
execution times have been reduced significantly
• Some tests show
dramatic improvements (e.g.,
test_chat_check_that_render_route_works_and_does_not_call_completion_mock
from 80.86s to 0.29s)
• Overall pattern suggests performance
improvements across the test suite
43 files