-
Notifications
You must be signed in to change notification settings - Fork 931
dev -> main (Jul 18th) #1532
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
dev -> main (Jul 18th) #1532
Conversation
Fixed cartesian product bug in get_task query that caused duplicate tools. Co-authored-by: Ahmad Haidar <[email protected]>
fix(agents-api): refactor get_task query to fix cartesian product bug
- Added custom API key support feature for LLM client - Added model name conversion utility for LiteLLM integration - Re-enabled model validation in session chat rendering Co-authored-by: Ahmad Haidar <[email protected]>
fix(agents-api): properly handle custom-api-key and secrets api key
…pt for updating model data from configuration
docs: better transparent supported models page
…ld for non openai models
fix(agents-api): remove ``continue_`` field + filter out ``name`` field for non openai models
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install pyyaml | ||
|
||
- name: Run sync script | ||
run: | | ||
python src/scripts/sync_model_docs.py | ||
|
||
- name: Check for changes | ||
id: check_changes | ||
run: | | ||
if git diff --quiet documentation/integrations/supported-models.mdx; then | ||
echo "changed=false" >> $GITHUB_OUTPUT | ||
else | ||
echo "changed=true" >> $GITHUB_OUTPUT | ||
fi | ||
|
||
- name: Commit and push changes | ||
if: steps.check_changes.outputs.changed == 'true' | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
git add documentation/integrations/supported-models.mdx | ||
git commit -m "chore: sync model documentation from litellm-config.yaml [skip ci]" | ||
git push |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 8 days ago
To fix the problem, you should add an explicit permissions
block to the workflow file to restrict the GITHUB_TOKEN
scope to the minimum needed. Since this workflow checks out code and pushes changes (committing to the repository), it requires contents: write
permission. The contents: write
scope is the least privilege needed for pushing to the repository, while other permissions (such as pull-requests: write
) are not required here. The best place to add this is at the top level of the workflow file, so it applies to all jobs (unless overridden).
You should add the following block right after the name:
field (before on:
):
permissions:
contents: write
No other code or imports are needed.
-
Copy modified lines R1-R2
@@ -1,3 +1,5 @@ | ||
permissions: | ||
contents: write | ||
name: Sync Model Documentation | ||
|
||
on: |
Claude finished @Ahmad-mtos's task —— View job PR Review Analysis
I'm reviewing this dev -> main PR with 22 commits and 25 changed files. Here's my review plan: Review Checklist:
Security Analysis🔴 Critical Security Issues
🟡 Medium Security Issues
Code Quality & Best Practices✅ Positive Aspects
🔴 Issues Found
Performance Considerations🟡 Potential Performance Issues
Test Coverage Assessment✅ Good Test Coverage
🔴 Missing Test Coverage
RecommendationsHigh Priority
Medium Priority
Low Priority
Overall AssessmentThis PR introduces significant functionality improvements including:
However, it also introduces security vulnerabilities that should be addressed before merging to main. The code quality is generally good with proper type safety and error handling patterns, but needs security hardening. Recommendation: Address security issues before merging. Consider implementing security fixes as a follow-up PR if time is critical. |
Claude finished @Ahmad-mtos's task —— View job Changelog Bot Analysis ✅Analyzed the dev → main PR and successfully updated changelog with user-visible changes. Todo List:
Changes Made:
User-Visible Features Added:
Bug Fixes:
Commit Details:
|
Claude finished @Ahmad-mtos's task —— View job Analysis CompleteTodo List:
Analysis SummaryBased on my analysis of the diff.patch file, I identified several key changes that qualify as user-visible functionality additions and behavior changes:
Since the changes include both new user-visible functionality and changes to existing behavior, the response is: UPDATE |
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.
Important
Looks good to me! 👍
Reviewed everything up to 29c18f3 in 2 minutes and 35 seconds. Click for details.
- Reviewed
1839
lines of code in25
files - Skipped
0
files when reviewing. - Skipped posting
12
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. .github/workflows/sync-model-docs.yml:50
- Draft comment:
Minor: The file lacks a trailing newline. Consider adding one for POSIX compliance. - Reason this comment was not posted:
Confidence changes required:30%
<= threshold50%
None
2. documentation/advanced/chat.mdx:55
- Draft comment:
Ensure removal of the 'continue_' field is intentional and propagated throughout the API docs. - Reason this comment was not posted:
Comment looked like it was already resolved.
3. src/agents-api/agents_api/activities/task_steps/prompt_step.py:49
- Draft comment:
Stripping the 'name' key for non-OpenAI models seems deliberate. Confirm that removing 'name' does not break required identification for other providers. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% This comment appears to be asking the author to verify/confirm something, which violates our rules. It's asking "confirm that removing name doesn't break..." which is exactly the kind of speculative "are you sure?" comment we want to avoid. The code change appears deliberate and targeted at non-OpenAI models specifically. Maybe this is actually pointing out a real compatibility issue with other LLM providers that could cause bugs? If there was a real compatibility issue, the comment should state it directly with evidence. Asking for verification without specific evidence of a problem is not helpful. Delete this comment as it's asking for unnecessary verification without providing evidence of an actual problem.
4. src/agents-api/agents_api/clients/litellm.py:59
- Draft comment:
The usage of contextlib.suppress requires an import. Ensure 'import contextlib' is added if not already present. - Reason this comment was not posted:
Comment was on unchanged code.
5. src/agents-api/agents_api/common/utils/llm_providers.py:34
- Draft comment:
get_litellm_model_name calls get_config() but there is no import for get_config. Ensure it's imported or defined. - Reason this comment was not posted:
Comment looked like it was already resolved.
6. src/agents-api/agents_api/queries/tasks/get_task.py:28
- Draft comment:
The SQL subquery filters tools with 'tl.updated_at >= t.updated_at'. Double-check that this condition correctly filters outdated tool entries. - 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. src/agents-api/agents_api/routers/sessions/auto_tools/render.py:73
- Draft comment:
Re-enabling validate_model() may affect legacy sessions. Confirm that model validation errors are handled gracefully. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the PR author to confirm that model validation errors are handled gracefully, which falls under asking the author to ensure behavior is intended or tested. This violates the rules.
8. src/agents-api/tests/test_task_queries.py:400
- Draft comment:
Using asyncio.sleep(0.1) to separate timestamps can be flaky. Consider mocking time to control updated_at values in tests. - 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.
9. src/scripts/sync_model_docs.py:230
- Draft comment:
update_documentation() relies on simple string searches for '## Available Models'. This approach is fragile if the doc structure changes; consider more robust parsing. - 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% While the comment raises a valid point about potential fragility, the actual implementation shows careful consideration of edge cases with multiple fallback mechanisms. The code is not as fragile as the comment suggests. More robust parsing (like using a markdown parser) would add complexity without clear benefits given the simple document structure being handled. The comment identifies a real architectural concern about maintainability. A change in document structure could break the parsing. The current implementation already handles various edge cases and has fallbacks. The added complexity of a full markdown parser may not be worth it for this specific use case. The comment should be deleted as it raises concerns about fragility that are already adequately addressed in the implementation through multiple fallback mechanisms.
10. src/scripts/sync_model_docs.py:300
- Draft comment:
Project root detection logic in main() may be fragile in non-standard setups. Verify it works in all expected environments. - 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 that the project root detection logic works in all expected environments. This falls under the category of asking the author to ensure the behavior is intended or to double-check things, which is against the rules.
11. documentation/advanced/chat.mdx:258
- Draft comment:
The code fence for the Python example includes an extra label ('Python'). Consider using just 'python' unless the extra label is intentional. - 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% This is a very minor stylistic suggestion. The casing doesn't affect functionality. The document uses 'Python' consistently throughout, suggesting it's an intentional style choice. This kind of nitpicky comment about documentation formatting doesn't add value. Maybe there's a style guide that mandates lowercase language names in code fences that I'm not aware of? Even if there was such a style guide, this kind of minor formatting detail in documentation isn't worth a PR comment. The current casing is consistent and readable. Delete this comment as it's an unimportant stylistic nitpick about documentation formatting that doesn't affect functionality.
12. documentation/advanced/chat.mdx:275
- Draft comment:
The code fence for the JavaScript example includes an extra label ('Node.js'). Consider using just 'javascript' unless the extra label is intentional. - 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 Node.js label appears to be intentional as part of a pattern in the documentation. The Python examples also have additional labels. The labels help distinguish between different runtime environments. Removing it would actually make the documentation less clear. This is also a UI/documentation style choice rather than a code logic issue. The comment might have a point if there was inconsistent labeling across the codebase, but we can only see this file. The labeling appears consistent within this file and serves a clear purpose in distinguishing runtime environments. The comment should be deleted as it suggests removing an intentional and useful documentation label, and it's also about documentation style rather than code logic.
Workflow ID: wflow_zTDrbzD57l35ugxz
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
PR Type
Bug fix, Enhancement, Documentation
Description
Fix cartesian product bug in get_task query
Enhance LLM client with custom API key support
Remove deprecated
continue_
field from message modelsAdd automated model documentation sync workflow
Diagram Walkthrough
File Walkthrough