From 4860a22215f94a37efd5eebdebaa3cf8f78f618d Mon Sep 17 00:00:00 2001 From: teahubxyz Date: Sat, 10 Oct 2026 19:28:17 -0700 Subject: [PATCH] probe: what Time can reach from a hosted runner --- .github/workflows/probe.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/probe.yml diff --git a/.github/workflows/probe.yml b/.github/workflows/probe.yml new file mode 100644 index 0000000..ce3f1e0 --- /dev/null +++ b/.github/workflows/probe.yml @@ -0,0 +1,31 @@ +name: probe +# One-off: what can Time reach from a GitHub-hosted runner with no secrets? +on: workflow_dispatch +permissions: + contents: read + models: read +jobs: + probe: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: GitHub Models catalog + one call + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + python3 - <<'PY' + import json, os, urllib.request + tok = os.environ["GH_TOKEN"] + h = {"Authorization": f"Bearer {tok}", "Accept": "application/json"} + req = urllib.request.Request("https://models.github.ai/catalog/models", headers=h) + cat = json.loads(urllib.request.urlopen(req, timeout=30).read()) + print(f"{len(cat)} models") + for m in cat: + print(m["id"], "|", m.get("rate_limit_tier"), "|", m.get("publisher")) + body = {"model": "openai/gpt-4.1-mini", "messages": [{"role": "user", "content": "Reply with exactly: ok"}]} + req = urllib.request.Request("https://models.github.ai/inference/chat/completions", + data=json.dumps(body).encode(), method="POST", + headers={**h, "Content-Type": "application/json"}) + out = json.loads(urllib.request.urlopen(req, timeout=60).read()) + print("inference:", out["choices"][0]["message"]["content"]) + PY