Skip to content

Commit 9c7003a

Browse files
mballanceCopilot
andcommitted
Fix model: use gpt-4o via models.inference.ai.azure.com with curl
gh api only routes to api.github.com; GitHub Models lives at models.inference.ai.azure.com. Switch to curl with GH_TOKEN. Update model to gpt-4o (gpt-5-mini-high not available on this endpoint). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1e07dd1 commit 9c7003a

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/fvutils-weekly-report.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ permissions:
1111
discussions: write
1212

1313
env:
14-
MODEL: gpt-5-mini-high
14+
MODEL: gpt-4o
15+
MODELS_ENDPOINT: https://models.inference.ai.azure.com/chat/completions
1516

1617
jobs:
1718
generate-news:
@@ -123,9 +124,12 @@ jobs:
123124
print("Request JSON written.")
124125
PYEOF
125126
126-
gh api -X POST "/models/$MODEL/chat/completions" \
127-
--input /tmp/request.json \
128-
--jq '.choices[0].message.content' \
127+
curl -s -f \
128+
-H "Authorization: Bearer $GH_TOKEN" \
129+
-H "Content-Type: application/json" \
130+
--data @/tmp/request.json \
131+
"$MODELS_ENDPOINT" \
132+
| python3 -c "import sys,json; print(json.load(sys.stdin)['choices'][0]['message']['content'])" \
129133
> /tmp/news_item.md 2>/tmp/api_error.txt \
130134
|| {
131135
echo "WARNING: GitHub Models API call failed:"

0 commit comments

Comments
 (0)