diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml index 69af873b..d4e95995 100644 --- a/.github/workflows/issue-triage.yml +++ b/.github/workflows/issue-triage.yml @@ -26,13 +26,15 @@ jobs: - name: Triage Analysis id: triage uses: actions/github-script@v7 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | // --- Helper function for GitHub Models --- async function callGitHubModels(prompt) { const token = process.env.GITHUB_TOKEN; - const url = 'https://models.inference.ai.azure.com/chat/completions'; + const url = 'https://models.github.ai/inference/chat/completions'; const response = await fetch(url, { method: "POST", @@ -41,7 +43,7 @@ jobs: "Content-Type": "application/json" }, body: JSON.stringify({ - model: "gpt-4.1", + model: "openai/gpt-4.1", messages: [{ role: "user", content: prompt }], temperature: 0.1, response_format: { type: "json_object" } @@ -292,4 +294,4 @@ jobs: issue_url: ${{ needs.triage.outputs.issue_url }} issue_author: ${{ needs.triage.outputs.issue_author }} secrets: - TEAMS_WEBHOOK_URL: ${{ secrets.TEAMS_WEBHOOK_URL }} \ No newline at end of file + TEAMS_WEBHOOK_URL: ${{ secrets.TEAMS_WEBHOOK_URL }} diff --git a/test-triage-local.js b/test-triage-local.js index d5d999d8..f67eb142 100644 --- a/test-triage-local.js +++ b/test-triage-local.js @@ -31,7 +31,7 @@ if (!issueNumber) { // --- Helper: GitHub Models --- async function callGitHubModels(prompt) { const token = process.env.GH_TOKEN; - const url = "https://models.inference.ai.azure.com/chat/completions"; + const url = "https://models.github.ai/inference/chat/completions"; const response = await fetch(url, { method: "POST", @@ -40,7 +40,7 @@ async function callGitHubModels(prompt) { "Content-Type": "application/json", }, body: JSON.stringify({ - model: "gpt-4.1", + model: "openai/gpt-4.1", messages: [ { role: "system", content: "You are an expert assistant. Always respond in valid json format." }, { role: "user", content: prompt },