Skip to content

fix(acp): remove mandatory Kimi OAuth requirement for session operations#1445

Open
zhzy0077 wants to merge 1 commit intoMoonshotAI:mainfrom
zhzy0077:fix-acp-oauth-requirement
Open

fix(acp): remove mandatory Kimi OAuth requirement for session operations#1445
zhzy0077 wants to merge 1 commit intoMoonshotAI:mainfrom
zhzy0077:fix-acp-oauth-requirement

Conversation

@zhzy0077
Copy link

@zhzy0077 zhzy0077 commented Mar 16, 2026

Description

Allow ACP protocol to work without Kimi OAuth when using other providers

via KIMI_BASE_URL/KIMI_API_KEY environment variables.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the related issue, if any.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run make gen-changelog to update the changelog.
  • I have run make gen-docs to update the user documentation.

Open with Devin

Allow ACP protocol to work without Kimi OAuth when using other providers

via KIMI_BASE_URL/KIMI_API_KEY environment variables.
Copilot AI review requested due to automatic review settings March 16, 2026 02:55
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the ACP server to allow session lifecycle operations (create/load) to work without requiring Kimi OAuth login, enabling ACP usage with alternative providers configured via environment variables (e.g., KIMI_BASE_URL / KIMI_API_KEY).

Changes:

  • Remove the pre-session _check_auth() gate from ACP new_session and load_session.
  • Add Unreleased changelog entries documenting the behavior change (English + Chinese + root changelog).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/kimi_cli/acp/server.py Allows creating/loading ACP sessions without enforcing Kimi OAuth at session-operation time.
docs/zh/release-notes/changelog.md Documents the ACP auth requirement change in Chinese release notes.
docs/en/release-notes/changelog.md Documents the ACP auth requirement change in English release notes.
CHANGELOG.md Adds a top-level Unreleased entry for the ACP auth requirement change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 135 to 143
async def new_session(
self, cwd: str, mcp_servers: list[MCPServer] | None = None, **kwargs: Any
) -> acp.NewSessionResponse:
logger.info("Creating new session for working directory: {cwd}", cwd=cwd)
assert self.conn is not None, "ACP client not connected"
assert self.client_capabilities is not None, "ACP connection not initialized"

# Check authentication before creating session
self._check_auth()

session = await Session.create(KaosPath.unsafe_from_local_path(Path(cwd)))

self._check_auth()

await self._setup_session(cwd, session_id, mcp_servers)
# TODO: replay session history?
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.

2 participants