Files
litellm/.github/workflows/check_duplicate_issues.yml
T
Ryan Crabbe 6f0011ee2a perf: upgrade duplicate issue detection to AI-powered search via opencode
Replace the text-similarity based wow-actions/potential-duplicates with
opencode CLI + Claude Sonnet for semantic duplicate detection. The LLM
reads the full issue body and searches existing issues by keywords,
error messages, providers, and components — not just title similarity.

Requires ANTHROPIC_API_KEY repo secret.
2026-02-19 13:49:09 -08:00

53 lines
1.7 KiB
YAML

name: Check Duplicate Issues
on:
issues:
types: [opened]
jobs:
check-duplicates:
if: github.event.action == 'opened'
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- name: Install opencode
run: curl -fsSL https://opencode.ai/install | bash
- name: Check duplicates
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENCODE_PERMISSION: |
{
"bash": {
"*": "deny",
"gh issue*": "allow"
},
"webfetch": "deny"
}
run: |
opencode run -m anthropic/claude-sonnet-4-6 "A new issue has been created:
Issue number: ${{ github.event.issue.number }}
Lookup this issue with gh issue view ${{ github.event.issue.number }}.
Search through existing issues (excluding #${{ github.event.issue.number }}) to find potential duplicates.
Use gh issue list with relevant search terms from the new issue's title and description. Try multiple keyword combinations to search broadly. Check both open and recently closed issues.
Consider:
1. Similar titles or descriptions
2. Same error messages or symptoms
3. Related functionality or components
4. Similar feature requests
If you find potential duplicates, post a SINGLE comment on issue #${{ github.event.issue.number }} using this format:
This issue might be a duplicate of existing issues. Please check:
- #[issue_number]: [brief description of similarity]
If you find NO duplicates, do NOT post any comment. Stay silent."