File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -21,23 +21,24 @@ jobs:
2121 ref : main
2222 fetch-depth : 0
2323
24- 25-
2624 - name : Update models.json
2725 env :
2826 OPENAI_API_KEY : ${{ secrets.CODEX_OPENAI_API_KEY }}
2927 run : |
3028 set -euo pipefail
3129
3230 client_version="99.99.99"
31+ terminal_info="github-actions"
32+ user_agent="codex_cli_rs/99.99.99 (Linux $(uname -r); $(uname -m)) ${terminal_info}"
3333 base_url="${OPENAI_BASE_URL:-https://chatgpt.com/backend-api/codex}"
3434
3535 headers=(
3636 -H "Authorization: Bearer ${OPENAI_API_KEY}"
37+ -H "User-Agent: ${user_agent}"
3738 )
3839
3940 url="${base_url%/}/models?client_version=${client_version}"
40- curl --fail --show-error --location "${headers[@]}" "${url}" | jq '.' > codex-rs/core/models.json
41+ curl --http1.1 -- fail --show-error --location "${headers[@]}" "${url}" | jq '.' > codex-rs/core/models.json
4142
4243 - name : Open pull request (if changed)
4344 uses : peter-evans/create-pull-request@v7
You can’t perform that action at this time.
0 commit comments