fix(acp): remove mandatory Kimi OAuth requirement for session operations#1445
Open
zhzy0077 wants to merge 1 commit intoMoonshotAI:mainfrom
Open
fix(acp): remove mandatory Kimi OAuth requirement for session operations#1445zhzy0077 wants to merge 1 commit intoMoonshotAI:mainfrom
zhzy0077 wants to merge 1 commit intoMoonshotAI:mainfrom
Conversation
Allow ACP protocol to work without Kimi OAuth when using other providers via KIMI_BASE_URL/KIMI_API_KEY environment variables.
Contributor
There was a problem hiding this comment.
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 ACPnew_sessionandload_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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Allow ACP protocol to work without Kimi OAuth when using other providers
via KIMI_BASE_URL/KIMI_API_KEY environment variables.
Checklist
make gen-changelogto update the changelog.make gen-docsto update the user documentation.