Skip to content

fix(openclaw): avoid appending /v1 to GitHub/Copilot provider hosts (fixes #14118)#14165

Merged
kangfenmao merged 1 commit intoCherryHQ:mainfrom
404-Page-Found:hotfix/openclaw-copilot-404
Apr 11, 2026
Merged

fix(openclaw): avoid appending /v1 to GitHub/Copilot provider hosts (fixes #14118)#14165
kangfenmao merged 1 commit intoCherryHQ:mainfrom
404-Page-Found:hotfix/openclaw-copilot-404

Conversation

@404-Page-Found
Copy link
Copy Markdown
Contributor

What this PR does

Before this PR:

  • OpenClaw provider base URLs in main process could have /v1 appended for some built-in providers (GitHub / Copilot), producing incorrect endpoints and 404s.

After this PR:

  • Main process OpenClawService formats GitHub/Copilot provider hosts the same way the renderer does, avoiding appending /v1 for these providers. This prevents 404 errors when OpenClaw forwards requests.

Fixes #14118

Why we need it and why it was done in this way

  • The renderer already special-cases copilot/github and calls formatApiHost(..., false) to avoid adding /v1. The main process built OpenClaw provider URLs differently, causing mismatched endpoints.
  • Mirroring the renderer formatting in OpenClawService is minimal, low-risk, and preserves existing behavior for other providers.

The following tradeoffs were made:

  • Kept change minimal and targeted to OpenClawService to avoid cross-cutting refactors.

Breaking changes

  • None.

Special notes for your reviewer

  • Updated file: src/main/services/OpenClawService.ts
  • Behavior: only affects how provider apiHost is formatted when syncing OpenClaw config for copilot/github providers.

Checklist

  • PR: The PR description is expressive enough.
  • Code: Minimal, targeted fix.
  • Refactor: N/A
  • Upgrade: N/A
  • Documentation: N/A (bug fix visible to users)

Release note

Fix: avoid appending `/v1` to GitHub/Copilot provider hosts when syncing OpenClaw config, preventing 404 errors when sending messages with GitHub Copilot models (fixes #14118).

…ixes CherryHQ#14118)

Signed-off-by: 404-Page-Found <Lucas20220605@gmail.com>
Copy link
Copy Markdown
Collaborator

@DeJeune DeJeune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kangfenmao kangfenmao merged commit 753281a into CherryHQ:main Apr 11, 2026
10 checks passed
@404-Page-Found 404-Page-Found deleted the hotfix/openclaw-copilot-404 branch April 11, 2026 09:00
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.

[Bug]: Cherry Studio returns 404 error when sending messages with GitHub Copilot model configured in openclaw

3 participants