diff --git a/.github/workflows/opencode-review.yml b/.github/workflows/opencode-review.yml new file mode 100644 index 0000000000..1ea5661e32 --- /dev/null +++ b/.github/workflows/opencode-review.yml @@ -0,0 +1,31 @@ +name: OpenCode Review + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +jobs: + review: + if: github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + issues: read + steps: + - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 + with: + persist-credentials: false + + - uses: anomalyco/opencode/github@5d0f86606ac30690f79f0a6a9f41a1f49fe95d0b + env: + SIEMENS_API_KEY: ${{ secrets.SIEMENS_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + model: siemens/qwen-3.6-27b + use_github_token: true + prompt: | + Review this pull request. + Provide feedback as line-specific comments on the relevant code lines (using the review comment API). + Do not repeat line line-specific comments in the overall review outcome. + Do NOT make any commits or changes. Only review and comment on specific lines. diff --git a/opencode.json b/opencode.json new file mode 100644 index 0000000000..df5e838e26 --- /dev/null +++ b/opencode.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://opencode.ai/config.json", + "provider": { + "siemens": { + "npm": "@ai-sdk/openai-compatible", + "name": "code.siemens.com", + "options": { + "baseURL": "https://api.siemens.com/llm/v1", + "apiKey": "{env:SIEMENS_API_KEY}" + }, + "models": { + "qwen-3.6-27b": { + "limit": { + "context": 262144, + "output": 262144 + }, + "modalities": { + "input": ["text", "image"], + "output": ["text"] + } + } + } + } + } +}