#error when using chatgpt model
1 messages · Page 1 of 1 (latest)
That OpenAI line is probably not an API-key problem. The screenshot shows:
google/gemini-3.1-pro-previewprobes OK- Anthropic is failing because the Anthropic account has low credit balance
- OpenAI fails with
(0 , _agentHarnessRuntime.hasBeforeToolCallPolicy) is not a function
That last one looks like a version/runtime mismatch: newer OpenAI/Codex runtime code is trying to call hasBeforeToolCallPolicy, but the installed OpenClaw package/runtime pieces don’t line up. OpenAI openai/gpt-* models use the Codex app-server runtime path, so it can fail differently than Gemini.
First thing: what does this show?
openclaw --version
Then I’d update/restart and reprobe:
openclaw update
openclaw gateway restart
openclaw models status --probe
If you’re running from a git/source checkout instead of the packaged install, update/build from that checkout with pnpm install, pnpm build, and pnpm ui:build, then restart the gateway.
Docs: https://docs.openclaw.ai/help/faq and https://docs.openclaw.ai/install/updating
If it still happens after updating, please file it with your openclaw --version, install method, Node version, and the probe output: https://github.com/openclaw/openclaw/issues