Skip to content

fix remote control multi endpoint still use default credentials - #3466

Open
whz14 wants to merge 1 commit into
MoonshotAI:mainfrom
whz14:fix/remote-control-env-oauth-key
Open

fix remote control multi endpoint still use default credentials#3466
whz14 wants to merge 1 commit into
MoonshotAI:mainfrom
whz14:fix/remote-control-env-oauth-key

Conversation

@whz14

@whz14 whz14 commented Sep 2, 2026

Copy link
Copy Markdown

Related Issue

Resolve #(issue_number)

Problem

What changed

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: the issue must have a maintainer's /approve).
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 807e0e9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 807e0e95a5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +307 to +310
oauthKey: resolveKimiCodeOAuthKey({
oauthHost: kimiCodeEnvOAuthHost(),
baseUrl: kimiCodeEnvBaseUrl(),
}),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Resolve the persisted OAuth ref before loading the token

When a user selects the global OAuth login (or another endpoint persisted in config.toml) without endpoint environment variables, both values passed here are undefined, so this derives the default mainland credential key. Login persists a scoped key from the configured baseUrl and OAuth ref, and normal runtime auth reads that configuration, so /remote-control will either claim the user is not logged in or use a stale credential from the wrong region. Load the persisted provider configuration through the SDK and apply the same runtime-auth resolution used by login/runtime before selecting the token slot.

AGENTS.md reference: apps/kimi-code/AGENTS.md:L45-L45

Useful? React with 👍 / 👎.

resolveKimiTokenStorageName({ providerName: KIMI_CODE_PROVIDER_NAME }),
resolveKimiTokenStorageName({
providerName: KIMI_CODE_PROVIDER_NAME,
oauthKey: resolveKimiCodeOAuthKey({

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add a changeset for the user-visible credential fix

This changes shipped CLI behavior by making Remote Control select a different credential slot, but the commit contains no .changeset entry. Without the required CLI patch changeset, this user-visible bug fix will be omitted from the generated release changelog; add a short @moonshot-ai/kimi-code patch changeset.

AGENTS.md reference: AGENTS.md:L85-L85

Useful? React with 👍 / 👎.

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.

1 participant