Commit Graph

23 Commits

Author SHA1 Message Date
ashione
0a8f5c3af8 Merge origin/main and resolve ipc/openclaw auth conflicts 2026-03-08 00:54:30 +08:00
ashione
72585589af Stabilize channels UX, reload flow, and i18n consistency 2026-03-08 00:30:26 +08:00
Lingxuan Zuo
c03d92e9a2 Fix/moonshot cn web search domain (#338) 2026-03-08 00:00:47 +08:00
Lingxuan Zuo
e52916a7ef fallback model/providers (#259)
Co-authored-by: zuolingxuan <zuolingxuan@bytedance.com>
2026-03-03 10:18:52 +08:00
Haze
730d5466dd fix(gateway): optimize gateway start robustness in version 0.1.19 (#244)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Haze <hazeone@users.noreply.github.com>
2026-03-01 17:42:25 +08:00
Haze
386d4c5454 fix(win): Windows stability improvements (#207) (#208)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Haze <hazeone@users.noreply.github.com>
2026-02-27 22:10:35 +08:00
paisley
0fb1a1a78d fix minimax oauth failed and upgrade openclaw to 2.26 (#206) 2026-02-27 19:05:56 +08:00
paisley
f70d5b0c28 feat: add new provider for minimax and qwen portals (#203)
Co-authored-by: Haze <709547807@qq.com>
2026-02-27 14:59:37 +08:00
Haze
87616b4250 fix(model): claw-x header (#198)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Haze <hazeone@users.noreply.github.com>
2026-02-26 22:57:59 +08:00
paisley
7929a43601 fix add model provider (#190) 2026-02-26 18:32:06 +08:00
paisley
7b16b6af14 feat: support OAuth & API key for Qwen/MiniMax providers (#177) 2026-02-26 15:11:37 +08:00
Haze
4f50630291 feat(gateway, openclaw-auth): add browser config synchronization (#184) 2026-02-26 14:47:36 +08:00
Haze
e8c11887d0 feat(gateway): sync gateway token and update agent models on provider… (#168) 2026-02-25 18:56:04 +08:00
Haze
265b12281c fix(model): custom model choose error (#164) 2026-02-25 16:38:03 +08:00
Haze
f821949829 fix(model): update gemini apikey modify function (#119) 2026-02-20 20:17:30 +08:00
DigHuang
1b508d5bde feat(provider): mainly support moonshot / siliconflow on setup (#43) 2026-02-11 11:33:33 +08:00
Haze
20af6c7ba3 fix(auth): add required models:[] array to provider config 2026-02-06 04:03:46 +08:00
Haze
ed060c142f fix(auth): register models.providers for OpenRouter and other providers
OpenClaw's model resolution checks cfg.models.providers[provider] for
baseUrl and API type. Without this config entry, any model for that
provider returns "Unknown model" even if the API key is correct.

- Reverted model names back to user-specified versions
- Added PROVIDER_CONFIGS with baseUrl, api type, and env var name
- setOpenClawDefaultModel() now writes models.providers.openrouter
  (and other providers) to openclaw.json so model resolution works
- Config format: { models: { providers: { openrouter: {
    baseUrl: "https://openrouter.ai/api/v1",
    api: "openai-completions",
    apiKey: "OPENROUTER_API_KEY" } } } }
2026-02-06 04:02:07 +08:00
Haze
07320042a7 fix(auth): use OpenClaw-recognized model names (openrouter/auto, etc.) 2026-02-06 03:53:26 +08:00
Haze
71409042cb fix(auth): update default models to latest versions 2026-02-06 03:37:27 +08:00
Haze
a92ced3c4a fix(auth): use correct model config format (object, not string)
OpenClaw expects agents.defaults.model as { primary: "provider/model" }
not a plain string. The previous code wrote a string which caused:
"agents.defaults.model: Invalid input: expected object, received string"
2026-02-06 03:31:24 +08:00
Haze
00475ce2b5 fix(auth): configure OpenClaw default model when saving provider
- Add setOpenClawDefaultModel() to write the correct model to
  ~/.openclaw/openclaw.json based on the selected provider
- Maps: openrouter -> openrouter/anthropic/claude-sonnet-4,
  anthropic -> anthropic/claude-sonnet-4, etc.
- Call setOpenClawDefaultModel on provider:save IPC handler
- Fixes "No API key found for provider anthropic" when user
  configured OpenRouter (wrong default model was being used)
2026-02-06 03:26:39 +08:00
Haze
284861a0f5 feat(chat): write API keys to OpenClaw and embed Control UI for chat
Part 1: API Key Integration
- Create electron/utils/openclaw-auth.ts to write keys to
  ~/.openclaw/agents/main/agent/auth-profiles.json
- Update provider:save and provider:setApiKey IPC handlers to
  persist keys to OpenClaw auth-profiles alongside ClawX storage
- Save API key to OpenClaw on successful validation in Setup wizard
- Pass provider API keys as environment variables when starting
  the Gateway process (ANTHROPIC_API_KEY, OPENROUTER_API_KEY, etc.)

Part 2: Embed OpenClaw Control UI for Chat
- Replace custom Chat UI with <webview> embedding the Gateway's
  built-in Control UI at http://127.0.0.1:{port}/?token={token}
- Add gateway:getControlUiUrl IPC handler to provide tokenized URL
- Enable webviewTag in Electron BrowserWindow preferences
- Override X-Frame-Options/CSP headers to allow webview embedding
- Suppress noisy control-ui token_mismatch stderr messages
- Add loading/error states for the embedded webview

This fixes the "No API key found for provider" error and replaces
the buggy custom chat implementation with OpenClaw's battle-tested
Control UI.
2026-02-06 03:12:17 +08:00