#issues with cloudflared model

1 messages ¡ Page 1 of 1 (latest)

drowsy dome
#

Just having some gateway error 500 issues btw @marble raptor whyd u close that post? it had all the info now i need to resend my ui and proxy

#

WHERES KRILL GONE

#

@uncut breach

fathom trout
#

Time to mourn

marble raptor
#

There should have been a message from Hermit or a summary from Krill. We close posts when they become too long, start to broad into multiple unrelated subjects to the original post, or the context was filled up.

#

Krill will be back shortly

drowsy dome
drowsy dome
marble raptor
#

We get over 300-500 threads a day, and have to manage everything - if you provide me with the title of the closed thread, I can take another look for you

marble raptor
#

Hey - I’ve taken a look at the conversation, and it’s what Hermit said. The post has gotten very long, and the context got bloated with a lot of information that wasn’t helpful. Krill gave you a summary of what message to send in a new thread, to pass the most important information.

By opening a new thread with this key info, your likelihood of succeeding is much higher.

#

Please start a new #1459642797895319552 thread and include:

Goal: expose OpenClaw through Cloudflared on Raspberry Pi

Confirmed:
- local http://127.0.0.1:18789/healthz returns {"ok":true,"status":"live"}
- Cloudflared/config path is unclear / validate said no config file found

Still broken:
- domain /healthz does not return the same JSON

Paste:
- openclaw --version
drowsy dome
#

k

drowsy dome
#

@uncut breach

uncut breachBOT
#

I’m here 🦞

I can help with the gateway 500s, but please don’t resend tokens/proxy secrets or full UI screenshots with private URLs visible.

First thing: what does openclaw --version show? After that, the most useful sanitized bits are:

  • the exact 500 error text
  • whether it happens in Dashboard/Control UI, model calls, or cloudflared only
  • gateway logs around the failure, with tokens/URLs redacted

I can’t override whatever happened with the closed post, but we can reconstruct the important parts without leaking anything.

drowsy dome
#

when i do nano proxy.js in the folder it says everything running but then it lets me type more cmds which probably means its not running

uncut breachBOT
#

Yep — that’s the right instinct.

nano proxy.js only opens the file editor. It does not run the proxy. If you save/exit nano and get your shell prompt back, nothing is running yet.

From that same folder, try:

node proxy.js

If it’s actually running, your terminal will usually stay “occupied” and show logs. Open a second terminal/SSH session to run other commands.

For quick checks:

openclaw --version
#
openclaw status
openclaw gateway status

If node proxy.js immediately returns to the prompt, paste the error/output it printed. If it stays running but the tunnel/model still fails, paste the sanitized 500/log bit next.

drowsy dome
#

wait not nano i meant node

uncut breachBOT
#

Ah gotcha — if you ran:

node proxy.js

and it printed “running” but then gave you the prompt back, that usually means the script exited right after printing. A normal long-running proxy/server should keep the terminal busy until you press Ctrl+C.

Check whether it’s actually listening:

curl -v http://127.0.0.1:PORT/

Replace PORT with whatever proxy.js says it uses.

Also run it with the exit code shown:

#
node proxy.js; echo EXIT:$?

If it says EXIT:0, the script ended “successfully” instead of staying alive. If it says non-zero or prints an error, paste that.

One common bug in tiny proxy scripts: they log “running” but don’t keep a server open with something like server.listen(...) / app.listen(...).

drowsy dome
#

it says "*0 to host 127.0.0.1 left intact"

uncut breachBOT
#

That line by itself usually means curl successfully connected and closed cleanly — it’s not the actual response.

Please run this so we can see the HTTP status/body:

curl -i http://127.0.0.1:PORT/

Replace PORT with the proxy port.

If you’re testing an OpenAI-compatible model proxy, also try the endpoint OpenClaw/model clients usually hit:

curl -i http://127.0.0.1:PORT/v1/models

Also: in the terminal where you ran node proxy.js, is it still sitting there running, or did it return to the prompt? If it returned to the prompt, the proxy still isn’t staying alive.

drowsy dome
#

it gives me my ui but my proxy does connect to my ui

uncut breachBOT
#

That helps: if curl http://127.0.0.1:PORT/ gives you the UI, then the proxy/port is serving a web UI, not necessarily the model API OpenClaw needs.

For OpenAI-compatible config, OpenClaw usually needs a base URL whose API endpoints work, e.g.:

curl -i http://127.0.0.1:PORT/v1/models

If that returns HTML/UI instead of JSON, you’re pointing OpenClaw at the wrong port/path.

Typical split is something like:

  • UI port → browser page / dashboard HTML
  • API port → /v1/models, /v1/chat/completions, etc.

So next check: what model server are you using behind Cloudflare? Ollama, LM Studio, llama.cpp, Open WebUI, something else? And please still paste openclaw --version — version mismatches cause weird config/proxy behavior a lot.

drowsy dome
#

but it worked before

uncut breachBOT
#

Totally believable — “worked before” usually means one of the moving parts changed, not that you imagined it.

The fastest way to narrow it down is to compare local API vs Cloudflare URL:

curl -i http://127.0.0.1:PORT/v1/models
curl -i https://YOUR-CLOUDFLARE-URL/v1/models

Expected: JSON, not the UI HTML.

If local works but Cloudflare doesn’t, the issue is Cloudflare/proxy routing.
If both return the UI, OpenClaw is pointed at the UI endpoint instead of the model API endpoint.
If local fails too, the model server/API changed or isn’t running.

Also check whether the model server updated/restarted and changed ports. A common “worked yesterday” cause is: UI comes back on the same port, but the OpenAI-compatible API moved/disabled/needs a different path.

#

Paste these three things, sanitized:

  • openclaw --version
  • the status line from both curl -i .../v1/models commands
  • what app/server this is: LM Studio, Ollama, Open WebUI, llama.cpp, etc.
drowsy dome
#

s
curl -i https://https://acts-billy-mounts-kelkoo.trycloudflared.com/v1/models
HTTP/1.1 404 Not Found
X-Powered-By: Express
Content-Security-Policy: default-src 'none'
X-Content-Type-Options: nosniff
Content-Type: text/html; charset=utf-8
Content-Length: 148
Date: Sun, 10 May 2026 07:00:58 GMT
Connection: keep-alive
Keep-Alive: timeout=5

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /v1/models</pre>
</body>
</html>
curl: (6) Could not resolve host: https
p-gamer123@raspberrypi:~/raspberry-chat $

uncut breachBOT
#

Two things in that output:

  1. Your command has https://https:// — that’s why you also got:
curl: (6) Could not resolve host: https

Run it as:

curl -i https://acts-billy-mounts-kelkoo.trycloudflared.com/v1/models
  1. The 404 Cannot GET /v1/models is coming from Express, so Cloudflare is reaching your proxy.js, but your proxy does not have/forward a /v1/models route.

That means the tunnel itself is probably working. The proxy app is the problem: it’s serving UI routes, but not the OpenAI-compatible API routes OpenClaw expects.

#

Check locally too:

curl -i http://127.0.0.1:PORT/v1/models

If local also says Cannot GET /v1/models, you need to either:

  • point OpenClaw/Cloudflare at the real model API port, not the UI/proxy port, or
  • update proxy.js to forward /v1/* to the model API backend.

If you paste the relevant sanitized proxy.js route/listen part — no secrets — I can tell you exactly what’s missing.

drowsy dome
#

cannot getmy url

uncut breachBOT
#

Cannot GET /your-url means the request reached your Express proxy, but Express doesn’t have a route for that path.

For OpenClaw, don’t test the random UI URL/path — test the model API path:

curl -i https://acts-billy-mounts-kelkoo.trycloudflared.com/v1/models

If that still says Cannot GET /v1/models, your proxy.js is not forwarding /v1/* to the actual model API.

So the fix is one of these:

  1. Use the real model API port directly in cloudflared/OpenClaw, not the UI/proxy port.
  2. Add forwarding in proxy.js for /v1/models and /v1/chat/completions to your model server.

What is the backend model app — Ollama, LM Studio, Open WebUI, llama.cpp, or something else?

drowsy dome
#

yeah that didnt6 work said cannot get [the url]

uncut breachBOT
#

That error means your proxy is receiving the request, but it doesn’t know what to do with that path.

Important bit: don’t put the full URL after the domain as a path. This is wrong-ish:

curl https://acts-billy-mounts-kelkoo.trycloudflared.com/https://acts-billy-mounts-kelkoo.trycloudflared.com/v1/models

Use exactly this shape:

curl -i https://acts-billy-mounts-kelkoo.trycloudflared.com/v1/models

If that says:

#
Cannot GET /v1/models

then Cloudflare is fine, but proxy.js is only serving your UI and is not forwarding OpenAI API routes.

At that point we need to know what the real model API is. Try these locally on the Raspberry Pi:

curl -i http://127.0.0.1:11434/v1/models
curl -i http://127.0.0.1:1234/v1/models
curl -i http://127.0.0.1:8080/v1/models

One of those may return JSON. If none do, tell me what app you’re running for the model: Ollama, LM Studio, Open WebUI, llama.cpp, etc.

drowsy dome
uncut breachBOT
#

That one is different: Could not resolve host means DNS can’t find that Cloudflare tunnel hostname at all.

So before debugging OpenClaw/model API, make sure the tunnel is actually running and that you’re using the current trycloudflared URL.

On the Pi, run cloudflared again and copy the fresh URL it prints:

cloudflared tunnel --url http://127.0.0.1:PORT

Replace PORT with the local port your proxy/model API is actually on.

Then test the exact new URL:

curl -i https://NEW-URL.trycloudflared.com/v1/models
#

Temporary trycloudflared.com URLs can change when cloudflared restarts. If the old URL worked before but now says “could not resolve host,” that URL is probably dead/expired or mistyped.

drowsy dome
uncut breachBOT
#

Aha — there’s the typo 🦞

Your tunnel URL is:

https://acts-billy-mounts-kelkoo.trycloudflare.com

But you were testing:

trycloudflared.com

Extra d at the end. Use this exact command:

#
curl -i https://acts-billy-mounts-kelkoo.trycloudflare.com/v1/models

If that returns Cannot GET /v1/models, then DNS/tunnel is fixed and we’re back to the proxy not forwarding /v1/* to the model API. If it returns JSON, use this as the OpenClaw base URL:

https://acts-billy-mounts-kelkoo.trycloudflare.com/v1
drowsy dome
#

oo.trycloudflare.com/v1
HTTP/2 404
date: Sun, 10 May 2026 07:05:59 GMT
content-type: text/html; charset=utf-8
cf-ray: 9f9719400878d87d-MEL
cf-cache-status: DYNAMIC
server: cloudflare
content-security-policy: default-src 'none'
x-content-type-options: nosniff
x-powered-by: Express

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /v1</pre>
</body>
</html>
p-gamer123@raspberrypi:~/raspberry-chat $

uncut breachBOT
#

Good, that confirms Cloudflare is reaching your Express app.

/v1 by itself often returns 404, so test the actual endpoint:

curl -i https://acts-billy-mounts-kelkoo.trycloudflare.com/v1/models

But if that also says Cannot GET /v1/models, then the problem is definitely your proxy.js: it is not exposing/forwarding OpenAI-compatible /v1/* routes.

Most likely you’re tunneling to the UI app instead of the model API. Try finding the real local API port:

curl -i http://127.0.0.1:11434/v1/models
curl -i http://127.0.0.1:1234/v1/models
curl -i http://127.0.0.1:8080/v1/models
#

Whichever one returns JSON is the port Cloudflare/OpenClaw should use. If none return JSON, paste the non-secret part of proxy.js — especially the app.get/app.use routes and listen(...) line — and say what model app you’re running.

drowsy dome
#

curl -i https://acts-billy-mounts-kelkoo.trycloudflare.com/v1/models
HTTP/2 404
date: Sun, 10 May 2026 07:06:54 GMT
content-type: text/html; charset=utf-8
cf-ray: 9f971a983f59e685-MEL
cf-cache-status: DYNAMIC
server: cloudflare
content-security-policy: default-src 'none'
x-content-type-options: nosniff
x-powered-by: Express

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /v1/models</pre>
</body>
</html>

uncut breachBOT
#

Yep — that confirms it cleanly:

Cloudflare ✅ reaching your Pi / Express app
proxy.js ❌ does not provide /v1/models

So OpenClaw is currently hitting a web/Express app, not an OpenAI-compatible model API.

Next, find the actual model API port on the Pi:

curl -i http://127.0.0.1:11434/v1/models
curl -i http://127.0.0.1:1234/v1/models
curl -i http://127.0.0.1:8080/v1/models
curl -i http://127.0.0.1:5000/v1/models

You’re looking for JSON, not HTML. If one works, start cloudflared against that port instead, for example:

#
cloudflared tunnel --url http://127.0.0.1:11434

Then OpenClaw’s base URL would be:

https://acts-billy-mounts-kelkoo.trycloudflare.com/v1

If none work, tell me what model server you’re using — Ollama, LM Studio, llama.cpp, Open WebUI, etc. Also please run openclaw --version when you can; it matters for support.

drowsy dome
#

it was workinbg yesterday..... it randomly stopped working btw my proxy forwards to ui and ui goes to gateway API

uncut breachBOT
#

I believe you — but the key detail is: UI → gateway API in the browser is not the same as proxy → gateway API on /v1/models.

Your curl result proves this request path:

Cloudflare → proxy.js / Express → /v1/models → 404 Cannot GET

So even if the UI still loads and the UI can call the gateway API, your Express server is not forwarding /v1/models to whatever backend OpenClaw/model API expects.

If it randomly stopped yesterday, likely one of these changed:

  • the gateway/API port changed
  • the UI config changed its API URL
  • proxy.js lost or never had a catch-all /v1/* forwarder
  • cloudflared is now tunneling the UI port instead of the API/proxy port
  • the backend server restarted and is no longer listening
#

Run these from the Pi:

curl -i http://127.0.0.1:PORT/v1/models
curl -i http://127.0.0.1:PORT/api/health
curl -i http://127.0.0.1:PORT/health

Use the port your proxy forwards to / your gateway API port.

Also check what the UI is actually calling: open the UI → browser devtools → Network → refresh → look for the API request URL. That URL/port is what your proxy needs to forward to.

If you paste your sanitized proxy.js routing section, I can point at the exact missing route. Don’t paste tokens.

drowsy dome
#

do u think i ran out of api tokens on openai

uncut breachBOT
#

Probably not based on the error you showed.

If you ran out of OpenAI credits/tokens, you’d usually see something like 401, 429, insufficient_quota, billing, or an OpenAI JSON error.

Your current error is:

404 Cannot GET /v1/models
X-Powered-By: Express

That happens before OpenAI is even involved. It means Cloudflare is reaching your Express proxy, but the proxy doesn’t have/forward the /v1/models route.

To check OpenAI quota separately, hit the actual backend endpoint that calls OpenAI, or try one request directly from wherever your proxy runs. But first fix the routing: /v1/models needs to return JSON, not Express HTML.

drowsy dome
#

IM CORRECT

uncut breachBOT
#

You might be right that your OpenAI quota is out — I’m not ruling that out.

But the specific error you pasted is not an OpenAI quota error. It’s your Express proxy saying:

Cannot GET /v1/models

That means this request never made it to OpenAI.

Quick way to prove both separately:

  1. Routing/API check:
curl -i https://acts-billy-mounts-kelkoo.trycloudflare.com/v1/models

This currently shows Express 404 → proxy route problem.

#
  1. OpenAI quota check:
curl https://api.openai.com/v1/models \
  -H "Authorization: Bearer YOUR_OPENAI_KEY"

If quota/auth is the issue, this will return an OpenAI JSON error like invalid_api_key, insufficient_quota, etc.

So yes, check your OpenAI billing/quota — but the thing blocking your Cloudflare URL right now is still that /v1/models isn’t being forwarded.

drowsy dome
#

[openclaw] Failed to start CLI: ConfigMutationConflictError: config changed since last load
at assertBaseHashMatches (file:///home/p-gamer123/.npm-global/lib/node_modules/openclaw/dist/config-D4CCgNz1.js:14:69)
at replaceConfigFile (file:///home/p-gamer123/.npm-global/lib/node_modules/openclaw/dist/config-D4CCgNz1.js:22:23)
at async persistConfig (file:///home/p-gamer123/.npm-global/lib/node_modules/openclaw/dist/configure-CP-Lvt30.js:915:4)
at async runConfigureWizard (file:///home/p-gamer123/.npm-global/lib/node_modules/openclaw/dist/configure-CP-Lvt30.js:1002:4)
at async configureCommandWithSections (file:///home/p-gamer123/.npm-global/lib/node_modules/openclaw/dist/configure-CP-Lvt30.js:1137:2)
at async configureCommandFromSectionsArg (file:///home/p-gamer123/.npm-global/lib/node_modules/openclaw/dist/configure-CP-Lvt30.js:1153:2)
at async Command.<anonymous> (file:///home/p-gamer123/.npm-global/lib/node_modules/openclaw/dist/config-cli-ranzgR2T.js:926:3)
at async Command.parseAsync (/home/p-gamer123/.npm-global/lib/node_modules/openclaw/node_modules/commander/lib/command.js:1122:5)
at async runCli (file:///home/p-gamer123/.npm-global/lib/node_modules/openclaw/dist/run-main-CWEXgPOd.js:463:4)

trying to add a github kety got this error

uncut breachBOT
#

That error usually means OpenClaw loaded openclaw.json, then something else changed the config before the wizard tried to save it — so it refused to overwrite newer changes. Annoying, but it’s a safety check, not your GitHub token being rejected.

First thing: what does this show?

openclaw --version

Then try this cleanly:

# close any other openclaw configure/onboard/auth commands first
openclaw models auth login-github-copilot

If you were in openclaw configure, exit it and rerun after the GitHub auth completes. If it keeps happening, update OpenClaw and try again — current code has retry handling for config conflicts during configure/auth flows.

drowsy dome
#

i used config --section model

uncut breachBOT
#

Yep, that maps to the interactive configure wizard. Small naming weirdness: docs mostly show:

openclaw configure --section model

openclaw config without a subcommand opens the same wizard, but for GitHub Copilot the cleaner path is usually the dedicated auth command:

openclaw models auth login-github-copilot

Then set/use a model separately if needed:

openclaw models status
#
openclaw models set github-copilot/gpt-4.1

The conflict likely happened because the model wizard + GitHub auth both touched config during the same run, or another OpenClaw process/dashboard changed config while the wizard was open.

I’d do:

openclaw --version
# close any other configure/onboard/config wizard terminals first
openclaw models auth login-github-copilot

If you still want to use the wizard after auth, rerun it fresh:

drowsy dome
#

by choosing github does it automatically add my key?

uncut breachBOT
#

If you choose GitHub Copilot and complete the browser/device-code login, yes — OpenClaw stores a GitHub token in its auth profile store and later exchanges it for Copilot API tokens automatically. You don’t usually paste/manage a key yourself.

So the expected flow is:

openclaw models auth login-github-copilot

Then follow the URL/code prompt and keep the terminal open until it says it completed.

If you only selected GitHub in configure --section model but the flow crashed with that config conflict before finishing, assume it did not save cleanly. Rerun the dedicated login command above, then check:

openclaw models status

Docs: https://docs.openclaw.ai/providers/github-copilot

drowsy dome
#

and github api keys are 100% free? no catch

uncut breachBOT
#

Not exactly “100% free, no catch.”

The GitHub token itself is free to create/login with. But Copilot access depends on your GitHub Copilot plan/entitlement:

  • Copilot Free exists, but it’s limited.
  • Paid/student/org plans unlock more usage/features/models.
  • GitHub’s own docs currently warn billing/signups/limits are changing, so don’t treat it like an unlimited free API key.

OpenClaw is just using your GitHub/Copilot entitlement; it doesn’t magically bypass Copilot pricing or quotas.

Official GitHub docs: https://docs.github.com/en/copilot/get-started/plans
OpenClaw Copilot docs: https://docs.openclaw.ai/providers/github-copilot

drowsy dome
#

how do i use my personal access tokens? i have set one up for meta llama 3.3 70b instruct

uncut breachBOT
#

Don’t paste the token here 🙂 The exact setup depends on who issued the token. “Meta Llama 3.3 70B Instruct” is a model, not the API provider.

Most likely cases:

Hugging Face token for meta-llama/Llama-3.3-70B-Instruct:

openclaw onboard --auth-choice huggingface-api-key
# paste the HF token when prompted
openclaw models set huggingface/meta-llama/Llama-3.3-70B-Instruct
openclaw models status

HF token needs the “Make calls to Inference Providers” permission.
Docs: https://docs.openclaw.ai/providers/huggingface

OpenRouter key:

#
openclaw onboard --auth-choice openrouter-api-key
openclaw models set openrouter/meta-llama/llama-3.3-70b-instruct:free
openclaw models status

Model availability/free suffix depends on OpenRouter’s current catalog/account.
Docs: https://docs.openclaw.ai/providers/openrouter

Groq key — their Llama 3.3 model ref is different:

openclaw onboard --auth-choice groq-api-key
openclaw models set groq/llama-3.3-70b-versatile
openclaw models status

Docs: https://docs.openclaw.ai/providers/groq

GitHub personal access token: that’s only useful for the github-copilot provider path (COPILOT_GITHUB_TOKEN / GH_TOKEN / GITHUB_TOKEN), and it won’t automatically mean you can use every Meta Llama model. For Copilot, the cleaner command is:

#
openclaw models auth login-github-copilot

Which site did you create the token on — Hugging Face, OpenRouter, Groq, or GitHub?

drowsy dome
#

no i did it on github

uncut breachBOT
#

Got it — that’s GitHub Models, not GitHub Copilot. OpenClaw’s first-class GitHub provider is currently github-copilot; GitHub Models can be treated as a custom OpenAI-compatible provider.

Your GitHub PAT needs the models scope / models: read permission. Don’t paste it here.

Add something like this to your openclaw.json:

{
  env: {
    GITHUB_MODELS_TOKEN: "github_pat_..."
  },
  models: {
    mode: "merge",
    providers: {
      "github-models": {
        baseUrl: "https://models.github.ai/inference",
#
        api: "openai-completions",
        apiKey: "${GITHUB_MODELS_TOKEN}",
        headers: {
          "X-GitHub-Api-Version": "2022-11-28"
        },
        models: [
          {
            id: "meta/llama-3.3-70b-instruct",
            name: "Llama 3.3 70B Instruct",
            contextWindow: 128000,
            maxTokens: 4096
          }
        ]
      }
    }
#
  },
  agents: {
    defaults: {
      model: {
        primary: "github-models/meta/llama-3.3-70b-instruct"
      }
    }
  }
}

Then restart the gateway and check:

openclaw gateway restart
#
openclaw models status

If OpenClaw complains about the custom provider shape, paste the error + openclaw --version. This path is more “custom provider” than polished wizard flow, so version details matter. 🦞

GitHub Models docs: https://docs.github.com/en/github-models/quickstart

drowsy dome
#

gimme all in one msg

uncut breachBOT
#

Yep — all-in-one version:

You made a GitHub Models PAT, not a Copilot token. For Meta Llama 3.3 70B Instruct, use GitHub Models as a custom OpenAI-compatible provider.

  1. Make sure your GitHub PAT has Models / models: read permission. Do not paste it in Discord.

  2. Edit your OpenClaw config:

openclaw config file

Open that file and add/merge this:

{
#
  env: {
    GITHUB_MODELS_TOKEN: "github_pat_YOUR_TOKEN_HERE"
  },
  models: {
    mode: "merge",
    providers: {
      "github-models": {
        baseUrl: "https://models.github.ai/inference",
        api: "openai-completions",
        apiKey: "${GITHUB_MODELS_TOKEN}",
        headers: {
          "X-GitHub-Api-Version": "2022-11-28"
        },
        models: [
          {
#
            id: "meta/llama-3.3-70b-instruct",
            name: "Llama 3.3 70B Instruct",
            contextWindow: 128000,
            maxTokens: 4096
          }
        ]
      }
    }
  },
  agents: {
    defaults: {
      model: {
        primary: "github-models/meta/llama-3.3-70b-instruct"
      }
    }
#
  }
}

If your config already has env, models, or agents, merge these sections — don’t duplicate top-level keys.

  1. Restart and verify:
openclaw gateway restart
openclaw models status
  1. If it errors, paste:
#
openclaw --version
openclaw models status

GitHub’s model ID for that one is:

meta/llama-3.3-70b-instruct

OpenClaw model ref becomes:

github-models/meta/llama-3.3-70b-instruct
drowsy dome
#

I dont see openclaw.json

uncut breachBOT
#

No worries — it may not be in your current folder. The default path is:

~/.openclaw/openclaw.json

Best way to find the active one:

openclaw config file

If that prints a path, open that exact file.

If it says the file doesn’t exist yet, create the default folder/file:

#
mkdir -p ~/.openclaw
nano ~/.openclaw/openclaw.json

Paste the config there. If the file is brand new, use the whole JSON5 object. If it already exists, merge the sections instead.

Quick check after saving:

openclaw config validate
openclaw gateway restart
openclaw models status

Docs: https://docs.openclaw.ai/gateway/configuration

drowsy dome
#

where do i add that code

uncut breachBOT
#

Add it to your active OpenClaw config file.

Run this first:

openclaw config file

It will print a path, usually:

/home/p-gamer123/.openclaw/openclaw.json

Open that file:

#
nano ~/.openclaw/openclaw.json

If it’s empty/new, paste this whole thing:

{
  env: {
    GITHUB_MODELS_TOKEN: "github_pat_YOUR_TOKEN_HERE"
  },
  models: {
    mode: "merge",
    providers: {
      "github-models": {
        baseUrl: "https://models.github.ai/inference",
#
        api: "openai-completions",
        apiKey: "${GITHUB_MODELS_TOKEN}",
        headers: {
          "X-GitHub-Api-Version": "2022-11-28"
        },
        models: [
          {
            id: "meta/llama-3.3-70b-instruct",
            name: "Llama 3.3 70B Instruct",
            contextWindow: 128000,
            maxTokens: 4096
          }
        ]
      }
    }
#
  },
  agents: {
    defaults: {
      model: {
        primary: "github-models/meta/llama-3.3-70b-instruct"
      }
    }
  }
}

Replace only this part with your actual token:

github_pat_YOUR_TOKEN_HERE
#

Save in nano: Ctrl+O, Enter, then Ctrl+X.

Then run:

openclaw config validate
openclaw gateway restart
openclaw models status

If your file already has stuff in it, don’t paste a second { ... } at the bottom — paste the existing file here with tokens removed/redacted and I’ll show exactly where to merge it.

#

Got part 1 — don’t paste/edit yet, this is incomplete and currently cuts off inside commands.ownerDisplay.

Send part 2 with the rest of the file. Also: please make sure any real tokens/API keys are removed before posting. What you pasted so far only shows auth profile names, not secrets, which is fine.

#

I deleted the message with the exposed secrets. Please rotate these immediately — they were posted publicly:

  • Discord bot token
  • OpenAI API key
  • Google/Gemini API key
  • OpenClaw gateway token

For the config change: add the GitHub Models provider as a new top-level models block, and change agents.defaults.model.primary.

In your file, add this block after auth and before agents:

"models": {
  "mode": "merge",
  "providers": {
    "github-models": {
#
      "baseUrl": "https://models.github.ai/inference",
      "api": "openai-completions",
      "apiKey": "${GITHUB_MODELS_TOKEN}",
      "headers": {
        "X-GitHub-Api-Version": "2022-11-28"
      },
      "models": [
        {
          "id": "meta/llama-3.3-70b-instruct",
          "name": "Llama 3.3 70B Instruct",
          "contextWindow": 128000,
          "maxTokens": 4096
        }
      ]
    }
#
  }
},

Then inside your existing agents.defaults.model, change:

"primary": "openai/gpt-5.4"

to:

"primary": "github-models/meta/llama-3.3-70b-instruct"
#

Also add your GitHub Models token to env. If your config doesn’t already have env, add this top-level block near the top, before auth:

"env": {
  "GITHUB_MODELS_TOKEN": "github_pat_YOUR_TOKEN_HERE"
},

After saving:

openclaw config validate
openclaw gateway restart
openclaw models status

But rotate the leaked keys first. That’s the urgent part.

drowsy dome
#

where do i paste that code

uncut breachBOT
#

Paste it inside this file:

nano ~/.openclaw/openclaw.json

In your config, find this part:

"auth": {
  ...
},
"agents": {

Paste the new blocks between auth and agents, so it becomes:

#
"auth": {
  ...
},
"env": {
  "GITHUB_MODELS_TOKEN": "github_pat_YOUR_TOKEN_HERE"
},
"models": {
  "mode": "merge",
  "providers": {
    "github-models": {
      "baseUrl": "https://models.github.ai/inference",
      "api": "openai-completions",
      "apiKey": "${GITHUB_MODELS_TOKEN}",
      "headers": {
        "X-GitHub-Api-Version": "2022-11-28"
#
      },
      "models": [
        {
          "id": "meta/llama-3.3-70b-instruct",
          "name": "Llama 3.3 70B Instruct",
          "contextWindow": 128000,
          "maxTokens": 4096
        }
      ]
    }
  }
},
"agents": {

Then lower down, find:

#
"primary": "openai/gpt-5.4"

Change it to:

"primary": "github-models/meta/llama-3.3-70b-instruct"

Save nano with Ctrl+O, Enter, then Ctrl+X.

Then run:

openclaw config validate
#
openclaw gateway restart
openclaw models status

Also please rotate the keys you pasted earlier before relying on this setup — they were exposed publicly.

drowsy dome
#

its not highlighting the pasted code blue like the rest why

uncut breachBOT
#

That’s usually just your editor/syntax highlighting, not necessarily a problem.

But if the color changed right where you pasted it, common causes are:

  • missing comma before/after the pasted block
  • pasted outside the main { ... }
  • unclosed quote earlier in the file
  • duplicate/extra { or }

The real check is this:

openclaw config validate

If it says valid, you’re fine even if the color looks different.

#

The shape should look like this around the paste point:

  "auth": {
    ...
  },
  "env": {
    "GITHUB_MODELS_TOKEN": "github_pat_YOUR_TOKEN_HERE"
  },
  "models": {
    ...
  },
  "agents": {
    ...
  }
#

Important: there must be a comma after the closing } of auth, and after the closing } of env and models because more sections follow.

If openclaw config validate errors, paste only the error text — not the config or tokens.

drowsy dome
#

send me what real code is

uncut breachBOT
#

Yep — here’s the real full config shape based on what you pasted, with secrets replaced by placeholders. Paste this into ~/.openclaw/openclaw.json, then replace the placeholder values with your own new/rotated tokens.

{
  "meta": {
    "lastTouchedVersion": "2026.4.14",
    "lastTouchedAt": "2026-05-12T08:32:46.695Z"
  },
  "wizard": {
    "lastRunAt": "2026-05-12T08:20:10.713Z",
    "lastRunVersion": "2026.4.14",
    "lastRunCommand": "configure",
    "lastRunMode": "local"
  },
  "auth": {
    "profiles": {
#
      "openrouter:default": {
        "provider": "openrouter",
        "mode": "api_key"
      },
      "openai:default": {
        "provider": "openai",
        "mode": "api_key"
      },
      "github-copilot:github": {
        "provider": "github-copilot",
        "mode": "token"
      }
    }
  },
  "env": {
#
    "GITHUB_MODELS_TOKEN": "github_pat_YOUR_GITHUB_MODELS_TOKEN_HERE"
  },
  "models": {
    "mode": "merge",
    "providers": {
      "github-models": {
        "baseUrl": "https://models.github.ai/inference",
        "api": "openai-completions",
        "apiKey": "${GITHUB_MODELS_TOKEN}",
        "headers": {
          "X-GitHub-Api-Version": "2022-11-28"
        },
        "models": [
          {
            "id": "meta/llama-3.3-70b-instruct",
#
            "name": "Llama 3.3 70B Instruct",
            "contextWindow": 128000,
            "maxTokens": 4096
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "github-models/meta/llama-3.3-70b-instruct",
        "fallbacks": [
          "openrouter/meta-llama/llama-3.3-70b-instruct:free",
          "openrouter/auto"
#
        ]
      },
      "models": {
        "github-models/meta/llama-3.3-70b-instruct": {
          "alias": "GitHub Llama"
        },
        "openrouter/meta-llama/llama-3.3-70b-instruct:free": {},
        "openrouter/auto": {
          "alias": "OpenRouter"
        },
        "openai/gpt-5.4": {
          "alias": "GPT"
        }
      },
      "workspace": "/home/p-gamer123/.openclaw/workspace"
#
    },
    "list": [
      {
        "id": "main",
        "model": {
          "primary": "github-models/meta/llama-3.3-70b-instruct",
          "fallbacks": [
            "openrouter/meta-llama/llama-3.3-70b-instruct:free",
            "openrouter/auto"
          ]
        }
      }
    ]
  },
  "tools": {
#
    "profile": "coding",
    "web": {
      "search": {
        "enabled": true,
        "provider": "gemini",
        "openaiCodex": {}
      },
      "fetch": {
        "enabled": false
      }
    }
  },
  "commands": {
    "native": "auto",
    "nativeSkills": "auto",
#
    "restart": true,
    "ownerDisplay": "raw"
  },
  "session": {
    "dmScope": "per-channel-peer"
  },
  "channels": {
    "discord": {
      "enabled": true,
      "token": "YOUR_NEW_DISCORD_BOT_TOKEN",
      "groupPolicy": "open",
      "streaming": {
        "mode": "off"
      }
    }
#
  },
  "gateway": {
    "port": 18789,
    "mode": "local",
    "auth": {
      "mode": "token",
      "token": "YOUR_NEW_GATEWAY_TOKEN"
    },
    "tailscale": {
      "mode": "off",
      "resetOnExit": false
    },
    "nodes": {
      "denyCommands": [
        "camera.snap",
#
        "camera.clip",
        "screen.record",
        "contacts.add",
        "calendar.add",
        "reminders.add",
        "sms.send"
      ]
    },
    "bind": "loopback",
    "http": {
      "endpoints": {
        "chatCompletions": {
          "enabled": true
        }
      }
#
    }
  },
  "skills": {
    "entries": {
      "openai-image-gen": {
        "apiKey": "YOUR_NEW_OPENAI_API_KEY"
      },
      "openai-whisper-api": {
        "apiKey": "YOUR_NEW_OPENAI_API_KEY"
      }
    }
  },
  "plugins": {
    "entries": {
      "google": {
#
        "config": {
          "webSearch": {
            "apiKey": "YOUR_NEW_GOOGLE_API_KEY"
          }
        },
        "enabled": true
      },
      "openai": {
        "enabled": true
      },
      "openrouter": {
        "enabled": true
      }
    }
  }
#
}

Then run:

openclaw config validate
openclaw gateway restart
openclaw models status

Important: use new rotated secrets, not the ones you pasted earlier.

drowsy dome
#

dw i deleted those messages

uncut breachBOT
#

Good call deleting them — but deletion isn’t enough for secrets. Discord messages can be logged, cached, indexed, or seen before deletion.

Please still rotate them, especially:

  • Discord bot token
  • OpenAI key
  • Google/Gemini key
  • OpenClaw gateway token

After rotating, update ~/.openclaw/openclaw.json, then run:

openclaw config validate
openclaw gateway restart

I know it’s annoying, but it’s the safe move. 🦞

drowsy dome
#

tell me jst where to put the code and the code to put in not everything and dont surround the code with code i dont need to add

uncut breachBOT
#

Open ~/.openclaw/openclaw.json.

Put this after the auth block and before the agents block:

"env": {
  "GITHUB_MODELS_TOKEN": "github_pat_YOUR_TOKEN_HERE"
},
"models": {
  "mode": "merge",
  "providers": {
    "github-models": {
      "baseUrl": "https://models.github.ai/inference",
      "api": "openai-completions",
      "apiKey": "${GITHUB_MODELS_TOKEN}",
      "headers": {
#
        "X-GitHub-Api-Version": "2022-11-28"
      },
      "models": [
        {
          "id": "meta/llama-3.3-70b-instruct",
          "name": "Llama 3.3 70B Instruct",
          "contextWindow": 128000,
          "maxTokens": 4096
        }
      ]
    }
  }
},

Then find this existing line:

#
"primary": "openai/gpt-5.4"

Change it to:

"primary": "github-models/meta/llama-3.3-70b-instruct"

That’s it. Then run:

openclaw config validate
openclaw gateway restart
drowsy dome
#

THEN ITLL RUN MY GITHUB MODEL???

uncut breachBOT
#

Yes — if the config validates and GitHub accepts your PAT, OpenClaw should use:

github-models/meta/llama-3.3-70b-instruct

as the primary model.

After editing, run:

openclaw config validate
openclaw gateway restart
openclaw models status

If models status shows github-models/meta/llama-3.3-70b-instruct as the primary/default, you’re good.

One caveat: this is a custom provider setup, so if GitHub Models rejects the request because of token permission/quota/model access, OpenClaw will fall back to your fallback models. Your GitHub PAT needs models: read.

drowsy dome
#

NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

gateway error 401... thats wrong token right? gimme cmds to reset it

uncut breachBOT
#

Yeah — Gateway 401 = OpenClaw gateway auth token mismatch, not necessarily your GitHub model token.

Run these to reset the Gateway token safely:

NEW_TOKEN="$(openssl rand -hex 32)"
openclaw config set gateway.auth.mode token
openclaw config set gateway.auth.token "$NEW_TOKEN"
openclaw gateway restart
printf '
New Gateway token:
%s
' "$NEW_TOKEN"

Then use that printed token anywhere the UI asks for Gateway Token.

#

After that:

openclaw status
openclaw models status

If you then get a model/provider 401, that’s the GitHub PAT. But “gateway error 401” means fix the gateway token first.

drowsy dome
#

if it works will my ai be github model?

uncut breachBOT
#

Yes. If the config validates, the gateway restarts, and openclaw models status shows:

github-models/meta/llama-3.3-70b-instruct

as the primary/default model, then your OpenClaw AI will try to use the GitHub Models Llama model first.

If that model fails — bad PAT, no models: read, GitHub quota, model unavailable — OpenClaw may fall back to the fallback models you still have configured.

drowsy dome
#

its error 500

uncut breachBOT
#

500 means the gateway is running, but something crashed/failed while handling the model request. Need the actual error line now.

Run these and paste the output with tokens removed:

openclaw config validate
openclaw models status
openclaw logs --tail 80

Also test your GitHub Models token directly — do not paste the token or full output if it includes secrets:

curl -sS -X POST "https://models.github.ai/inference/chat/completions" \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer $GITHUB_MODELS_TOKEN" \
#
  -H "X-GitHub-Api-Version: 2022-11-28" \
  -H "Content-Type: application/json" \
  -d '{"model":"meta/llama-3.3-70b-instruct","messages":[{"role":"user","content":"Say hi"}],"max_tokens":20}'

If that curl fails, it’s GitHub token/model access. If curl works but OpenClaw gives 500, it’s our custom provider config/compat issue.

If you need to get OpenClaw working again immediately, switch back:

openclaw models set openrouter/meta-llama/llama-3.3-70b-instruct:free
openclaw gateway restart
drowsy dome
#

the main is openai gpt 5.4 and fallbacks r openrouters stuff but ive removed the keys for openai and openrouter

uncut breachBOT
#

Yep, that explains it. OpenClaw is still trying OpenAI/OpenRouter because they’re still configured as primary/fallbacks, but you removed their keys.

Run this to force both the default agent and your main agent to use GitHub Models only:

openclaw config set agents.defaults.model.primary "github-models/meta/llama-3.3-70b-instruct"
openclaw config set agents.defaults.model.fallbacks '[]' --strict-json
openclaw config set agents.list[0].model.primary "github-models/meta/llama-3.3-70b-instruct"
openclaw config set agents.list[0].model.fallbacks '[]' --strict-json
openclaw config set agents.defaults.models '{"github-models/meta/llama-3.3-70b-instruct":{"alias":"GitHub Llama"}}' --strict-json --merge
openclaw config validate
openclaw gateway restart
openclaw models status

If agents.list[0] errors, run:

#
openclaw config get agents.list

and tell me what index has "id": "main".

drowsy dome
#

also gimme the cmds to change it all back to openai to main and github to secondary

uncut breachBOT
#

Run these to make OpenAI primary and GitHub Models secondary/fallback:

openclaw config set agents.defaults.model.primary "openai/gpt-5.4"
openclaw config set agents.defaults.model.fallbacks '["github-models/meta/llama-3.3-70b-instruct"]' --strict-json
openclaw config set agents.list[0].model.primary "openai/gpt-5.4"
openclaw config set agents.list[0].model.fallbacks '["github-models/meta/llama-3.3-70b-instruct"]' --strict-json
openclaw config set agents.defaults.models '{"openai/gpt-5.4":{"alias":"GPT"},"github-models/meta/llama-3.3-70b-instruct":{"alias":"GitHub Llama"}}' --strict-json --merge
openclaw config validate
openclaw gateway restart
openclaw models status

But if you removed your OpenAI auth/key, restore it first:

#
openclaw models auth login --provider openai --set-default

Or if you specifically want OpenAI API key billing instead of login:

openclaw models auth login --provider openai --method api-key
drowsy dome
#

its hanging on thinking its nit gonna work

uncut breachBOT
#

Yeah, if it’s hanging on “thinking”, I’d stop fighting the GitHub Models route for now. That custom provider path may not handle OpenClaw agent/tool traffic cleanly, even if the raw GitHub API works.

Fast recovery: put OpenAI back as primary and remove GitHub as fallback:

openclaw config set agents.defaults.model.primary "openai/gpt-5.4"
openclaw config set agents.defaults.model.fallbacks '[]' --strict-json
openclaw config set agents.list[0].model.primary "openai/gpt-5.4"
openclaw config set agents.list[0].model.fallbacks '[]' --strict-json
openclaw config validate
openclaw gateway restart
openclaw models status

Then restore OpenAI auth if needed:

#
openclaw models auth login --provider openai --set-default

If you want Llama, I’d use OpenRouter/Groq/Hugging Face instead of GitHub Models for OpenClaw. GitHub Models is fine for simple API calls, but for an agent it’s probably the wrong hill to die on.

drowsy dome
#

Context overflow: prompt too large for the model. Try /reset (or /new) to start a fresh session, or use a larger-context model.

💀

uncut breachBOT
#

Yep 💀 that means the current thread/session got too big for the model context.

Fast fix:

/reset

or start a fresh chat/thread with:

/new

Then keep the next test tiny, like:

#
say hi

If you’re still on the GitHub Models Llama setup, I’d switch back first because Llama 3.3 via GitHub Models has a 128k input limit and your session/history may be blowing past what OpenClaw is sending.

Recovery commands:

openclaw config set agents.defaults.model.primary "openai/gpt-5.4"
openclaw config set agents.defaults.model.fallbacks '[]' --strict-json
openclaw config set agents.list[0].model.primary "openai/gpt-5.4"
openclaw config set agents.list[0].model.fallbacks '[]' --strict-json
openclaw gateway restart

Then /new and try again.

drowsy dome
#

i said one message and thats too long? "Hi raspberry! What's your AI model?" 💀 🥀

uncut breachBOT
#

Yeah 💀 it’s not that your one message was too long.

The model gets sent more than just:

Hi raspberry! What's your AI model?

It also gets the session history, system/context instructions, tool definitions, config context, previous troubleshooting, etc. This thread has a lot of accumulated baggage now, so the total prompt blew up.

Do this:

/new

Then ask the same short message again in the fresh session.

#

Also: asking “what’s your AI model?” can be weird in OpenClaw because the configured model, runtime, fallback, and actual route may differ. To check config, use:

openclaw models status

or:

openclaw status
drowsy dome
#

it's the first msg in the discussion 💀

uncut breachBOT
#

Ahhh yeah, then it’s not thread history — it’s OpenClaw’s startup prompt/context being too large for that GitHub Models route.

Even on the first user message, OpenClaw may send system instructions, tools, workspace docs, channel context, skills, etc. If the custom github-models provider/model reports or enforces a smaller usable context than expected, it can overflow immediately.

I’d call this GitHub Models custom-provider path not viable for your OpenClaw agent setup right now.

Switch back to OpenAI primary:

openclaw config set agents.defaults.model.primary "openai/gpt-5.4"
openclaw config set agents.defaults.model.fallbacks '[]' --strict-json
openclaw config set agents.list[0].model.primary "openai/gpt-5.4"
openclaw config set agents.list[0].model.fallbacks '[]' --strict-json
openclaw gateway restart

If you want Llama in OpenClaw, use OpenRouter/Groq/Hugging Face instead. GitHub Models is okay for direct API calls, but it’s being awkward as an agent backend here. 🥀

drowsy dome
#

so i cant use github models?

uncut breachBOT
#

You can use GitHub Models for direct API calls, but I wouldn’t recommend it as your main OpenClaw agent model right now.

For OpenClaw, GitHub Models is not a first-class supported provider like OpenAI/OpenRouter/Groq/Hugging Face/Copilot. We tried the custom OpenAI-compatible provider route, but the immediate context overflow suggests it’s not handling OpenClaw’s agent prompt/tool context properly.

So the practical answer is:

  • GitHub Models direct curl/app usage: yes
  • OpenClaw main agent backend: probably no / not reliable right now
  • GitHub Copilot provider in OpenClaw: yes, if you have Copilot entitlement
  • Llama 3.3 70B in OpenClaw: use OpenRouter, Groq, Together, or Hugging Face instead

If you want free-ish Llama, your existing OpenRouter fallback is the closest path:

openclaw config set agents.defaults.model.primary "openrouter/meta-llama/llama-3.3-70b-instruct:free"
openclaw config set agents.list[0].model.primary "openrouter/meta-llama/llama-3.3-70b-instruct:free"
#
openclaw gateway restart

But you’ll need a working OpenRouter key.

drowsy dome
#

i want a free github model tell me which to use. Openai gpt 5.4??????

uncut breachBOT
#

No — openai/gpt-5.4 is OpenAI, not a free GitHub model.

If you want the free GitHub Models API, that’s GitHub Models, but it’s not a good OpenClaw main agent backend right now. The context overflow you hit is exactly why I’d stop trying to use it for OpenClaw.

Use one of these instead:

  • Best for OpenClaw: openai/gpt-5.4 / openai/gpt-5.5 with proper OpenAI/Codex auth
  • GitHub account route: github-copilot/... only if you have Copilot entitlement
  • Free-ish Llama route: OpenRouter free model, e.g. your existing openrouter/meta-llama/llama-3.3-70b-instruct:free, but you need an OpenRouter key

So the honest answer: there is no “free GitHub model” I’d recommend as your OpenClaw agent model. GitHub Models is fine for curl/scripts, but for OpenClaw use OpenAI/Copilot/OpenRouter/Groq/HF.

drowsy dome
#

gimme the cmds to switch primary to phi 4 reasoning i got it from github alr changed json to have new key.

uncut breachBOT
#

For GitHub Models Phi-4 Reasoning, the model id is:

microsoft/phi-4-reasoning

So the OpenClaw ref is:

github-models/microsoft/phi-4-reasoning

Run:

openclaw config set models.providers.github-models.models '[{"id":"microsoft/phi-4-reasoning","name":"Phi-4 Reasoning","contextWindow":32768,"maxTokens":4096}]' --strict-json --replace
#
openclaw config set agents.defaults.model.primary "github-models/microsoft/phi-4-reasoning"
openclaw config set agents.defaults.model.fallbacks '[]' --strict-json
openclaw config set agents.list[0].model.primary "github-models/microsoft/phi-4-reasoning"
openclaw config set agents.list[0].model.fallbacks '[]' --strict-json
openclaw config set agents.defaults.models '{"github-models/microsoft/phi-4-reasoning":{"alias":"Phi 4 Reasoning"}}' --strict-json --merge
openclaw config validate
openclaw gateway restart
openclaw models status

Heads up: Phi-4 Reasoning is only 32k context, so it may hit context overflow even faster than Llama. If that happens, try the bigger-context GitHub model:

github-models/microsoft/phi-4-mini-reasoning
#

That one reports 128k context.

drowsy dome
#

can a github key run any model?

uncut breachBOT
#

No — a GitHub PAT for GitHub Models can only run models that GitHub Models makes available to your account/org.

It depends on:

  • whether the model exists in GitHub Models catalog
  • your account/org access
  • your PAT having models: read
  • GitHub’s rate limits / quota / availability
  • sometimes model-specific limits

Check what GitHub exposes with:

curl -sS https://models.github.ai/catalog/models \
  -H "Authorization: Bearer $GITHUB_MODELS_TOKEN" \
  -H "Accept: application/vnd.github+json" | grep -i "phi\|llama\|gpt"
#

If a model is not in that catalog, your GitHub key won’t run it. And even if it’s in the catalog, it still may not be reliable as an OpenClaw agent backend.

drowsy dome
#

can a key run any model in the catalogue? like can i use the same key for diff models

uncut breachBOT
#

Yes — same GitHub Models PAT can be used for different models in the GitHub Models catalog, as long as your account/org has access and the key has models: read.

You don’t make one key per model. You switch the model id, e.g.:

microsoft/phi-4-reasoning
meta/llama-3.3-70b-instruct
openai/gpt-4.1

For OpenClaw, that becomes:

github-models/microsoft/phi-4-reasoning
github-models/meta/llama-3.3-70b-instruct
github-models/openai/gpt-4.1
#

Caveat: “in catalog” doesn’t always mean “works great in OpenClaw.” Some may fail from quota, access, context size, or tool/prompt compatibility.

drowsy dome
#

it hung for so long that my browser canceled the requests

uncut breachBOT
#

Yep — that confirms it’s not viable as your OpenClaw agent backend right now. The browser canceled because the gateway/model request didn’t return fast enough.

Switch back to something supported so your assistant works again:

openclaw config set agents.defaults.model.primary "openai/gpt-5.4"
openclaw config set agents.defaults.model.fallbacks '[]' --strict-json
openclaw config set agents.list[0].model.primary "openai/gpt-5.4"
openclaw config set agents.list[0].model.fallbacks '[]' --strict-json
openclaw config validate
openclaw gateway restart

If you don’t have OpenAI auth set up anymore:

#
openclaw models auth login --provider openai --set-default

For free/cheap Llama-style models in OpenClaw, use OpenRouter/Groq/Hugging Face instead of GitHub Models. GitHub Models can work for simple curl/API tests, but it’s hanging on real OpenClaw agent requests.

drowsy dome
#

im switching to phi 4 mini reasoning

uncut breachBOT
#

Good choice if you’re still testing GitHub Models — Phi-4 mini reasoning has the bigger reported context.

Use this model id:

microsoft/phi-4-mini-reasoning

Run:

openclaw config set models.providers.github-models.models '[{"id":"microsoft/phi-4-mini-reasoning","name":"Phi-4 Mini Reasoning","contextWindow":128000,"maxTokens":4096}]' --strict-json --replace
openclaw config set agents.defaults.model.primary "github-models/microsoft/phi-4-mini-reasoning"
openclaw config set agents.defaults.model.fallbacks '[]' --strict-json
openclaw config set agents.list[0].model.primary "github-models/microsoft/phi-4-mini-reasoning"
openclaw config set agents.list[0].model.fallbacks '[]' --strict-json
#
openclaw config set agents.defaults.models '{"github-models/microsoft/phi-4-mini-reasoning":{"alias":"Phi 4 Mini"}}' --strict-json --merge
openclaw config validate
openclaw gateway restart
openclaw models status

Then test with a tiny fresh session/message. If it still hangs, GitHub Models just isn’t behaving well as an OpenClaw backend on your setup.

drowsy dome
#

nope what model has the max report context

uncut breachBOT
#

Max reported GitHub Models context right now is:

meta/llama-4-scout-17b-16e-instruct

It reports:

10,000,000 input tokens
4,096 output tokens

OpenClaw ref would be:

#
github-models/meta/llama-4-scout-17b-16e-instruct

Next biggest ones I see:

openai/gpt-4.1          1,048,576 input / 32,768 output
openai/gpt-4.1-mini     1,048,576 input / 32,768 output
openai/gpt-4.1-nano     1,048,576 input / 32,768 output
meta/llama-4-maverick-17b-128e-instruct-fp8  1,000,000 input / 4,096 output

If you want the max-context GitHub Models test, use Llama 4 Scout.

drowsy dome
#

what abt quen 2.5

uncut breachBOT
#

If you mean Qwen 2.5: I don’t see any Qwen models in the current GitHub Models catalog from https://models.github.ai/catalog/models, so your GitHub Models PAT probably can’t run Qwen there.

For Qwen in OpenClaw, use another provider instead:

  • OpenRouter: usually has Qwen variants
  • Groq: may have Qwen/Kimi-style open models depending on current catalog
  • Hugging Face: huggingface/Qwen/... if available to your HF token
  • Ollama/local: if your machine can run it

For GitHub Models max-context, the best catalog option I found was still:

github-models/meta/llama-4-scout-17b-16e-instruct
drowsy dome
#

no github

uncut breachBOT
#

If you mean “only GitHub Models”: I checked the GitHub Models catalog and I don’t see Qwen/Qwen 2.5 there.

So with a GitHub Models PAT, you can’t use Qwen unless GitHub adds it to their catalog for your account.

Best GitHub Models options instead:

github-models/meta/llama-4-scout-17b-16e-instruct

max reported context, or:

github-models/openai/gpt-4.1-mini

big 1M context and probably more stable than random open-weight models.

#

To see exactly what your GitHub key can access:

curl -sS https://models.github.ai/catalog/models \
  -H "Authorization: Bearer $GITHUB_MODELS_TOKEN" \
  -H "Accept: application/vnd.github+json" | grep -i qwen

If that prints nothing, no Qwen on GitHub for you.

drowsy dome
#

but... gtp 5.4 works and github is my fallback so how come i dont get the github error when i put invalid token fr openai

uncut breachBOT
#

Because your openai/gpt-5.4 route may not be using the OpenAI API key you edited.

In OpenClaw, openai/* agent models often run through the Codex/OpenAI login auth profile / native runtime, not necessarily the OPENAI_API_KEY field you changed. So an “invalid OpenAI key” can exist in config and still not affect the working primary model.

Also, fallback only happens when the active primary request actually fails in the runtime path OpenClaw is using. If GPT is succeeding through another auth profile, GitHub fallback never gets called, so you won’t see the GitHub error.

Check what auth/model path OpenClaw thinks it’s using:

openclaw models status
openclaw models auth list --provider openai
openclaw models auth list --provider openai-codex
openclaw config get agents.defaults.model
openclaw config get agents.list

One more gotcha: your main agent had its own model override earlier. If agents.list[0].model.primary is still OpenAI, it can override agents.defaults.model.primary.

drowsy dome
#

r there any free openai source keys

uncut breachBOT
#

No legit “free OpenAI API keys,” no.

If someone offers free/shared OpenAI keys, assume they’re leaked, stolen, rate-limited, or will get you banned. Don’t put those in OpenClaw.

Your real options are:

  • OpenAI/Codex login if you have a ChatGPT/Codex entitlement:
openclaw models auth login --provider openai --set-default
  • OpenAI API key from your own OpenAI platform account — paid/usage-based:
openclaw models auth login --provider openai --method api-key
  • Free/cheap non-OpenAI routes: OpenRouter free-tier models, Groq, Hugging Face, local Ollama, etc. For fresh model recommendations, ask in #old-models because availability changes constantly.
drowsy dome
#

no as in isnt there a model that openai offers for free like gpt 1

uncut breachBOT
#

Ah, gotcha. For OpenAI API/OpenClaw usage: no, OpenAI doesn’t offer an old free API model like “GPT‑1” that you can just use with a free key.

There are two separate things:

  • OpenAI API models → require your own paid/entitled OpenAI auth.
  • Old open weights / research models like GPT‑2 → technically exist, but they’re not useful as an OpenClaw agent backend and aren’t an OpenAI hosted free API route.

So for OpenClaw, the practical free-ish routes are not OpenAI: OpenRouter free models, GitHub Models experiments, Groq/HF free tiers, or local Ollama if your hardware can handle it.

For current model picks, ask in #old-models — model availability changes too fast for me to confidently list “best free” options.

drowsy dome
#

JUST TELL ME THE BEST MODEL THATS FREE ON OPENAI IDC IF IT SUCKS

uncut breachBOT
#

There isn’t one. OpenAI does not have a free hosted API model you can use in OpenClaw.

If you have ChatGPT/Codex entitlement, use OpenAI login:

openclaw models auth login --provider openai --set-default

If you don’t, OpenAI API usage needs paid billing. For free models, use non-OpenAI providers like OpenRouter free models, GitHub Models, Groq/HF free tiers, or local Ollama.

drowsy dome
#

doesnt like an old model work for free with an api key?

uncut breachBOT
#

No. An OpenAI API key doesn’t make any old model free.

OpenAI API access is usage-based billing. Even if an older/cheaper model exists, you still need valid billing/credits/entitlement. If your account has no credits or billing, API calls fail.

Also, really old models like GPT-1/GPT-2 are not hosted as free OpenAI API models for OpenClaw. They’re research/open-weight history, not a free OpenAI endpoint.

So:

  • OpenAI API key + no billing/credits: no free hosted model
  • ChatGPT/Codex subscription entitlement: use openclaw models auth login --provider openai --set-default
  • Actually free-ish: use non-OpenAI options like OpenRouter free models, GitHub Models, Groq/HF free tiers, or local Ollama
drowsy dome
#

i have billing details so will it be free?

uncut breachBOT
#

No — if you have billing details attached, OpenAI API calls are generally paid usage, not free.

You might have free trial credits or promo credits, but once those are gone, API usage bills your account. There isn’t a “free old OpenAI model” you can safely use forever with billing enabled.

To avoid surprise charges, check your OpenAI dashboard limits/billing and set a hard monthly budget/usage limit before putting the key in OpenClaw.

drowsy dome
#

openclaw config set agents.defaults.model.primary "openai/gpt-5-nano"
openclaw config set agents.defaults.model.fallbacks '["github-models/meta/llama-3.3-70b-instruct"]' --strict-json
openclaw config set agents.list[0].model.primary "openai/gpt-5-nano"
openclaw config set agents.list[0].model.fallbacks '["github-models/meta/llama-3.3-70b-instruct"]' --strict-json
openclaw config set agents.defaults.models '{"openai/gpt-5-nano":{"alias":"GPT"},"github-models/meta/llama-3.3-70b-instruct":{"alias":"GitHub Llama"}}' --strict-json --merge
openclaw config validate
openclaw gateway restart
openclaw models status

would this cmd work?

uncut breachBOT
#

Mostly yes — the syntax is valid, and it should set:

  • primary: openai/gpt-5-nano
  • fallback: github-models/meta/llama-3.3-70b-instruct

But two caveats:

  1. openai/gpt-5-nano is still OpenAI billing/auth, not free.
  2. Your GitHub fallback may still hang/error like before if OpenClaw actually falls back to it.

I’d add one extra check before restarting:

openclaw models list --provider openai | grep gpt-5-nano

If it shows up, then run your commands.

#

If you want the safer version with no GitHub fallback, use:

openclaw config set agents.defaults.model.primary "openai/gpt-5-nano"
openclaw config set agents.defaults.model.fallbacks '[]' --strict-json
openclaw config set agents.list[0].model.primary "openai/gpt-5-nano"
openclaw config set agents.list[0].model.fallbacks '[]' --strict-json
openclaw config set agents.defaults.models '{"openai/gpt-5-nano":{"alias":"GPT Nano"}}' --strict-json --merge
openclaw config validate
openclaw gateway restart
openclaw models status
drowsy dome
#

whats openais email imma beg them for free model

uncut breachBOT
#

I don’t think there’s a useful “please give me free API credits” email that’ll work 😭

Use OpenAI’s official help/contact flow instead:

https://help.openai.com/

For API billing/credits, go through the support chat there. If you’re a student/open-source/nonprofit, mention that clearly, but I wouldn’t expect free ongoing API access.

If you just need free-ish models for OpenClaw, you’ll have better luck with OpenRouter free models, GitHub Models, Groq/HF free tiers, or local Ollama.

drowsy dome
#

do you think ill actually get free credits tho? is there a chance?

uncut breachBOT
#

Honestly? There’s a chance, but I’d keep expectations low.

OpenAI might give credits for things like startups, research, education, grants, or special programs — but random “please give me free API” requests usually don’t go anywhere.

Best angle if you try:

  • explain what you’re building
  • say you’re a student / learning, if true
  • ask for trial credits, not permanent free access
  • keep it polite and short

But don’t build your OpenClaw setup assuming they’ll say yes. Use a cheap/free fallback like OpenRouter free models, GitHub Models experiments, Groq/HF free tiers, or local Ollama while you wait.

drowsy dome
#

wait its giving me gateway error 500

uncut breachBOT
#

500 means “gateway hit an internal error” — we need the log line.

Run these and paste the output with tokens removed:

openclaw config validate
openclaw models status
openclaw logs --tail 120

If you just want to recover first, switch to OpenAI only and remove the GitHub fallback:

openclaw config set agents.defaults.model.primary "openai/gpt-5-nano"
openclaw config set agents.defaults.model.fallbacks '[]' --strict-json
openclaw config set agents.list[0].model.primary "openai/gpt-5-nano"
#
openclaw config set agents.list[0].model.fallbacks '[]' --strict-json
openclaw config validate
openclaw gateway restart
openclaw models status

If it still 500s after that, it’s probably OpenAI auth/runtime, not GitHub. Then run:

openclaw models auth login --provider openai --set-default
openclaw gateway restart
drowsy dome
#

it was the cmds u just ran that went wrong i think

uncut breachBOT
#

Yeah, fair — the risky part was switching the active model/fallbacks around. Let’s undo that and get you back to the last known-good OpenAI setup.

Run this:

openclaw config set agents.defaults.model.primary "openai/gpt-5.4"
openclaw config set agents.defaults.model.fallbacks '[]' --strict-json
openclaw config set agents.list[0].model.primary "openai/gpt-5.4"
openclaw config set agents.list[0].model.fallbacks '[]' --strict-json
openclaw config validate
openclaw gateway restart
openclaw models status

If that still gives gateway 500, run this and paste only the error lines, no tokens:

#
openclaw logs --tail 120

My guess: either openai/gpt-5-nano isn’t usable in your current OpenClaw/auth route, or the GitHub fallback caused the gateway/model request to break again. Removing fallbacks should isolate it.

drowsy dome
#

whats the model id for gpt5 nano

uncut breachBOT
#

For OpenClaw/OpenAI, the model ref is:

openai/gpt-5-nano

Raw model id is:

gpt-5-nano

If you mean GitHub Models specifically, it would be:

github-models/openai/gpt-5-nano
drowsy dome
#

so whys it not working

uncut breachBOT
#

Most likely one of these:

  1. openai/gpt-5-nano isn’t available on your OpenAI auth/entitlement.
  2. Your OpenClaw version/catalog doesn’t expose it as a usable OpenAI agent model.
  3. You set the GitHub Models ref wrong — openai/gpt-5-nano and github-models/openai/gpt-5-nano are different routes.
  4. The gateway 500 has the real reason in logs.

Run this exact check:

openclaw models list --provider openai | grep -i nano
openclaw models status
openclaw logs --tail 80

If you’re trying to use OpenAI API/OpenAI auth, set:

#
openclaw config set agents.defaults.model.primary "openai/gpt-5-nano"
openclaw config set agents.list[0].model.primary "openai/gpt-5-nano"

If you’re trying to use GitHub Models, the ref is different:

openclaw config set agents.defaults.model.primary "github-models/openai/gpt-5-nano"
openclaw config set agents.list[0].model.primary "github-models/openai/gpt-5-nano"

But for GitHub Models you also need models.providers.github-models.models to include openai/gpt-5-nano, otherwise OpenClaw may not know that custom model exists.

Paste the logs --tail 80 error line and I can tell which one it is.

drowsy dome
#

whats erorr 500

uncut breachBOT
#

HTTP 500 means “internal server error” — the request reached something, but the server on the other side crashed/failed while handling it.

For a cloudflared model setup, that usually means one of these:

  • the model server behind the tunnel errored
  • the tunnel is pointing to the wrong local port/service
  • the OpenAI-compatible endpoint is returning bad/unsupported responses
  • the model/provider config is accepted, but inference fails at runtime

First checks:

openclaw --version
openclaw status --all
openclaw logs --follow

If the 500 is coming from the model API, also test the cloudflared URL directly with a tiny /v1/models or /v1/chat/completions request and check the local model server logs. Docs: https://docs.openclaw.ai/help/faq

drowsy dome
#

my agents giving gateway error 500

uncut breachBOT
#

A Gateway 500 means the OpenClaw gateway hit an internal error while your agent turn was running. The important bit is the log line right around the failure.

Can you paste these outputs?

openclaw --version
openclaw status --all
openclaw logs --follow

Then trigger the agent once and copy the first error/stack trace that appears.

Since your thread is about a cloudflared model: also check whether the model endpoint works outside OpenClaw. If /v1/models works but agent turns 500, it’s often the local/OpenAI-compatible backend failing on OpenClaw’s bigger prompt/tool payload, not cloudflared itself.

Docs: https://docs.openclaw.ai/help/faq and https://docs.openclaw.ai/gateway/troubleshooting

drowsy dome
#

will gateway restart work

uncut breachBOT
#

Maybe — a gateway restart can clear a stuck session/connection, but it won’t fix the underlying issue if the 500 is caused by bad model config, cloudflared routing, or the backend crashing.

Safe thing to try:

openclaw gateway restart
openclaw status

Then trigger the agent again and watch:

openclaw logs --follow

If the 500 comes back immediately, the logs are the real answer. Paste the first error/stack trace after the restart, plus:

openclaw --version
drowsy dome
#

502 now.... never happened before

uncut breachBOT
#

502 is different: Bad Gateway usually means something in front of the service can’t reach the service behind it.

After a restart, the common causes are:

  • gateway didn’t come back up cleanly
  • cloudflared is pointing at a local port where nothing is listening
  • the model server behind cloudflared stopped/crashed
  • the tunnel is up, but the upstream app is down

Check in this order:

openclaw gateway status
openclaw status
openclaw logs --tail 80

Then check the model backend locally, not through cloudflared:

#
curl http://127.0.0.1:<MODEL_PORT>/v1/models

Replace <MODEL_PORT> with whatever LM Studio/Ollama/vLLM/etc is using.

If local works but cloudflared gives 502, restart/check cloudflared. If local fails too, restart the model server first.

Also paste openclaw --version + the gateway status output — 502 after restart usually has a pretty clear clue there.

drowsy dome
#

no the agent gves gateway error 502