diff --git a/packages/openclaw-bridge/Dockerfile b/packages/openclaw-bridge/Dockerfile index b43ce08..f4ce00e 100644 --- a/packages/openclaw-bridge/Dockerfile +++ b/packages/openclaw-bridge/Dockerfile @@ -60,6 +60,14 @@ RUN chmod +x /app/bridge/start-dingtalk.sh # ── supervisord config ──────────────────────────────────────── COPY supervisord.conf /etc/supervisor/conf.d/openclaw-bridge.conf +# ── Patch: redirect all Anthropic API calls to IT0 LLM gateway ─────────────── +# The @mariozechner/pi-ai library hardcodes baseUrl per model in models.generated.js. +# We replace https://api.anthropic.com with the internal LLM gateway so OpenClaw +# uses our proxy instead of calling Anthropic directly. +# Using find+xargs to be version-agnostic (works even if pi-ai version changes). +RUN find /app/openclaw/node_modules -path "*/pi-ai/dist/models.generated.js" -exec \ + sed -i 's|baseUrl: "https://api.anthropic.com"|baseUrl: "http://154.84.135.121:3008"|g' {} \; + # ── Data directory for openclaw config + workspace ─────────── RUN mkdir -p /home/node/.openclaw/workspace && \ chown -R node:node /home/node/.openclaw