#issues with cloudflared model
1 messages ¡ Page 1 of 1 (latest)
Time to mourn
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
yay
but u shouldve asked before closing it
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
Cloudflared connectivity issues
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
k
@uncut breach
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.
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
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.
wait not nano i meant node
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(...).
it says "*0 to host 127.0.0.1 left intact"
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.
it gives me my ui but my proxy does connect to my ui
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.
but it worked before
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/modelscommands - what app/server this is: LM Studio, Ollama, Open WebUI, llama.cpp, etc.
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 $
Two things in that output:
- 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
- The
404 Cannot GET /v1/modelsis coming from Express, so Cloudflare is reaching yourproxy.js, but your proxy does not have/forward a/v1/modelsroute.
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.jsto 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.
cannot getmy url
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:
- Use the real model API port directly in cloudflared/OpenClaw, not the UI/proxy port.
- Add forwarding in
proxy.jsfor/v1/modelsand/v1/chat/completionsto your model server.
What is the backend model app â Ollama, LM Studio, Open WebUI, llama.cpp, or something else?
yeah that didnt6 work said cannot get [the url]
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.
curl -i https://acts-billy-mounts-kelkoo.trycloudflared.com/v1/models
curl: (6) Could not resolve host: acts-billy-mounts-kelkoo.trycloudflared.com
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.
2026-05-10T06:57:13Z INF | https://acts-billy-mounts-kelkoo.trycloudflare.com
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
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 $
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.
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>
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.
it was workinbg yesterday..... it randomly stopped working btw my proxy forwards to ui and ui goes to gateway API
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.jslost 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.
do u think i ran out of api tokens on openai
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.
IM CORRECT
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:
- Routing/API check:
curl -i https://acts-billy-mounts-kelkoo.trycloudflare.com/v1/models
This currently shows Express 404 â proxy route problem.
- 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.
[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
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.
Useful doc: https://docs.openclaw.ai/providers/github-copilot
If it still fails after a retry/update, paste openclaw --version plus the exact command you ran and we can narrow it down. đŚ
i used config --section model
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:
openclaw configure --section model
Docs: https://docs.openclaw.ai/providers/github-copilot and https://docs.openclaw.ai/cli/configure
by choosing github does it automatically add my key?
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
and github api keys are 100% free? no catch
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
how do i use my personal access tokens? i have set one up for meta llama 3.3 70b instruct
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?
no i did it on github
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
gimme all in one msg
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.
-
Make sure your GitHub PAT has Models /
models: readpermission. Do not paste it in Discord. -
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.
- Restart and verify:
openclaw gateway restart
openclaw models status
- 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
I dont see openclaw.json
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
where do i add that code
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.
where do i paste that code
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.
its not highlighting the pasted code blue like the rest why
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.
send me what real code is
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.
dw i deleted those messages
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. đŚ
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
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
THEN ITLL RUN MY GITHUB MODEL???
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.
NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
gateway error 401... thats wrong token right? gimme cmds to reset it
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.
if it works will my ai be github model?
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.
its error 500
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
the main is openai gpt 5.4 and fallbacks r openrouters stuff but ive removed the keys for openai and openrouter
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".
also gimme the cmds to change it all back to openai to main and github to secondary
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
its hanging on thinking its nit gonna work
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.
Context overflow: prompt too large for the model. Try /reset (or /new) to start a fresh session, or use a larger-context model.
đ
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.
i said one message and thats too long? "Hi raspberry! What's your AI model?" đ đĽ
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
it's the first msg in the discussion đ
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. đĽ
so i cant use github models?
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.
i want a free github model tell me which to use. Openai gpt 5.4??????
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.5with 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.
gimme the cmds to switch primary to phi 4 reasoning i got it from github alr changed json to have new key.
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.
can a github key run any model?
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.
can a key run any model in the catalogue? like can i use the same key for diff models
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.
it hung for so long that my browser canceled the requests
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.
im switching to phi 4 mini reasoning
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.
nope what model has the max report context
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.
what abt quen 2.5
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
no github
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.
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
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.
r there any free openai source keys
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.
no as in isnt there a model that openai offers for free like gpt 1
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.
JUST TELL ME THE BEST MODEL THATS FREE ON OPENAI IDC IF IT SUCKS
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.
doesnt like an old model work for free with an api key?
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
i have billing details so will it be free?
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.
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?
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:
openai/gpt-5-nanois still OpenAI billing/auth, not free.- 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
whats openais email imma beg them for free model
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:
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.
do you think ill actually get free credits tho? is there a chance?
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.
wait its giving me gateway error 500
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
it was the cmds u just ran that went wrong i think
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.
whats the model id for gpt5 nano
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
so whys it not working
Most likely one of these:
openai/gpt-5-nanoisnât available on your OpenAI auth/entitlement.- Your OpenClaw version/catalog doesnât expose it as a usable OpenAI agent model.
- You set the GitHub Models ref wrong â
openai/gpt-5-nanoandgithub-models/openai/gpt-5-nanoare different routes. - 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.
whats erorr 500
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
my agents giving gateway error 500
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
will gateway restart work
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
502 now.... never happened before
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.
no the agent gves gateway error 502