Skip to content

feat(acp): skip Kimi auth check for non-kimi providers#1347

Open
bu6n wants to merge 3 commits intoMoonshotAI:mainfrom
bu6n:not-login-if-default-model-provider-specified
Open

feat(acp): skip Kimi auth check for non-kimi providers#1347
bu6n wants to merge 3 commits intoMoonshotAI:mainfrom
bu6n:not-login-if-default-model-provider-specified

Conversation

@bu6n
Copy link

@bu6n bu6n commented Mar 5, 2026

Summary

  • The ACP server's _check_auth method previously always required Kimi OAuth authentication, even when the configured default model used a non-Kimi provider.
  • This change checks the provider type of the default model before enforcing Kimi auth. If the provider is not "kimi", the auth check is skipped entirely.

Motivation

Enables using kimi-cli as an ACP server in editors like Zed with a custom provider (e.g., OpenAI-compatible, Anthropic, etc.) without hitting an AUTH_REQUIRED error from the Kimi OAuth flow.

How it works

  1. Load the current config.
  2. Resolve the default model's provider.
  3. If the provider exists and its type is not "kimi", return early from _check_auth.
  4. Otherwise, proceed with the existing Kimi OAuth token check.

Testing

  • Configure a non-Kimi provider as the default in ~/.kimi/config.toml.
  • Start the ACP server and connect from Zed.
  • Verify no AUTH_REQUIRED error is raised and completions work as expected.

Open with Devin

devin-ai-integration[bot]

This comment was marked as resolved.

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