Skip to content

Claude/fix kimi api integration i y lgb#40

Closed
dodocha2021 wants to merge 15 commits into
vignesh07:mainfrom
dodocha2021:claude/fix-kimi-api-integration-iYLgb
Closed

Claude/fix kimi api integration i y lgb#40
dodocha2021 wants to merge 15 commits into
vignesh07:mainfrom
dodocha2021:claude/fix-kimi-api-integration-iYLgb

Conversation

@dodocha2021

Copy link
Copy Markdown

No description provided.

claude and others added 15 commits January 30, 2026 17:20
Fixes "pairing required" errors when connecting to the OpenClaw UI
through Railway's reverse proxy. The gateway was rejecting WebSocket
connections because it detected proxy headers from untrusted addresses.

Changes:
- Add trustedProxies config during onboard (for new setups)
- Auto-configure trustedProxies on gateway startup (for existing setups)
- Trust Railway's CGNAT range (100.64.0.0/10) and private networks

https://claude.ai/code/session_01QPi6doSueS2rbU576ya8ey
fix: configure gateway.trustedProxies for Railway reverse proxy
The gateway was reading config from /root/.openclaw instead of
/data/.openclaw because OPENCLAW_STATE_DIR alone wasn't enough.
Now explicitly set OPENCLAW_CONFIG_PATH to ensure the gateway
reads the correct configuration file.

https://claude.ai/code/session_01QPi6doSueS2rbU576ya8ey
…ctory

OpenClaw internally uses HOME to resolve ~/.openclaw paths for config,
canvas, and other files. Even with OPENCLAW_STATE_DIR and OPENCLAW_CONFIG_PATH
set, some components still referenced /root/.openclaw instead of /data/.openclaw.

By setting HOME=path.dirname(STATE_DIR), OpenClaw's ~/.openclaw will correctly
resolve to /data/.openclaw, ensuring all paths are consistent.

https://claude.ai/code/session_01QPi6doSueS2rbU576ya8ey
…reAuth

Updates the gateway configuration for Railway deployments:
- Add 127.0.0.1 to trustedProxies list (required for local proxy detection)
- Enable gateway.controlUi.allowInsecureAuth for HTTPS proxy support

These settings fix the "pairing required" error when accessing the
Control UI through Railway's reverse proxy.

https://claude.ai/code/session_01QPi6doSueS2rbU576ya8ey
fix: add 127.0.0.1 to trustedProxies and enable controlUi.allowInsecu…
Change Moonshot API base URL from api.moonshot.cn (China) to
api.moonshot.ai (international) during Docker build.

This fixes Kimi K2.5 API calls failing on Railway deployments
which are typically hosted in international regions and cannot
access the .cn domain.

https://claude.ai/code/session_01CAAPurYhYri7i6mB4zrU4W
Add MOONSHOT_API_REGION build arg to select between:
- international (default): uses api.moonshot.ai
- cn: uses api.moonshot.cn (China)

This allows users with China-region API keys to use the correct endpoint.

https://claude.ai/code/session_01CAAPurYhYri7i6mB4zrU4W
Apply fix from openclaw/openclaw#5079 to correct OpenRouter model ID:
- Change "openrouter/auto" to "openrouter/openrouter/auto"
- This fixes "Unknown model: openrouter/auto" error

https://claude.ai/code/session_01CAAPurYhYri7i6mB4zrU4W
The build output changed from dist/entry.js to dist/index.mjs.
Update both Dockerfile and server.js to use the correct path.

https://claude.ai/code/session_01CAAPurYhYri7i6mB4zrU4W
The onboard process requires docs/reference/templates/AGENTS.md but it may
not be included in the build. This patch creates a minimal template file
if it doesn't exist.

https://claude.ai/code/session_01CAAPurYhYri7i6mB4zrU4W
@shawnholt

Copy link
Copy Markdown

I've not reviewed this - but looks like very important patches/updates.

@vignesh07

Copy link
Copy Markdown
Owner

Replacing repos with forks of your own repo is not cool. Closing.

@vignesh07 vignesh07 closed this Feb 1, 2026
@shawnholt

Copy link
Copy Markdown

Why not cool? needed to get this to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants