fix(models): add kimi-coding implicit provider template#22526
Merged
Takhoffman merged 1 commit intoopenclaw:mainfrom Feb 21, 2026
Merged
fix(models): add kimi-coding implicit provider template#22526Takhoffman merged 1 commit intoopenclaw:mainfrom
Takhoffman merged 1 commit intoopenclaw:mainfrom
Conversation
| agentModels: models, | ||
| providerId: "kimi-coding", | ||
| api: "anthropic-messages", | ||
| baseUrl: "https://api.kimi.com/coding/", |
Contributor
There was a problem hiding this comment.
hardcoded baseURL duplicates constant from models-config.providers.ts. consider either exporting KIMI_CODING_BASE_URL or using buildKimiCodingProvider().baseUrl like applyXiaomiProviderConfig does
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/commands/onboard-auth.config-core.ts
Line: 220
Comment:
hardcoded baseURL duplicates constant from `models-config.providers.ts`. consider either exporting `KIMI_CODING_BASE_URL` or using `buildKimiCodingProvider().baseUrl` like `applyXiaomiProviderConfig` does
How can I resolve this? If you propose a fix, please make it concise.
Contributor
|
I am not sure if this is correct. I use kimi-coding/k2p5, and aside from setting it as |
961c47c to
a7f0e20
Compare
Contributor
|
PR #22526 - fix(models): add kimi-coding implicit provider template (#22526) Merged via squash.
Summary
Thanks @lailoo! |
mmyyfirstb
pushed a commit
to mmyyfirstb/openclaw
that referenced
this pull request
Feb 21, 2026
…) thanks @lailoo Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: lailoo <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
obviyus
pushed a commit
to guirguispierre/openclaw
that referenced
this pull request
Feb 22, 2026
…) thanks @lailoo Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: lailoo <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
mreedr
pushed a commit
to mreedr/openclaw-custom
that referenced
this pull request
Feb 24, 2026
…) thanks @lailoo Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: lailoo <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…) thanks @lailoo Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: lailoo <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
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.
Summary
resolveImplicitProviders(), causing 403 errors when usingkimi-coding/k2p5modelbuildKimiCodingProvider()function and no kimi-coding handling inresolveImplicitProviders();applyKimiCodeProviderConfig()only set model alias without providerapi/baseUrlbuildKimiCodingProvider()withanthropic-messagesAPI type and wire it into implicit provider resolutionFixes #22409
Problem
When a user configures Kimi Coding via
openclaw configureor setsKIMI_API_KEY, the provider is not auto-discovered becauseresolveImplicitProviders()has no handling forkimi-coding. Every other provider (moonshot, minimax, nvidia, xiaomi, etc.) has a correspondingbuildXxxProvider()function and implicit resolution block, but kimi-coding was missing.Additionally,
applyKimiCodeProviderConfig()(used during onboarding) only set the model alias without writing the provider'sapitype orbaseUrlto the config — unlikeapplyMoonshotProviderConfig()which correctly callsapplyProviderConfigWithDefaultModel().Root cause analysis:
Before fix:
Changes
src/agents/models-config.providers.ts— AddbuildKimiCodingProvider()withapi: "anthropic-messages"andbaseUrl: "https://api.kimi.com/coding/"; add kimi-coding block inresolveImplicitProviders()src/commands/onboard-auth.config-core.ts— FixapplyKimiCodeProviderConfig()to callapplyProviderConfigWithDefaultModel()with correct api/baseUrl instead of only setting model aliassrc/agents/models-config.providers.kimi-coding.test.ts— New: 3 tests covering implicit provider creation, build config, and no-key behaviorAfter fix:
Test plan
Effect on User Experience
Before: Users configuring Kimi Coding get 403 errors because the provider template is missing. Manual JSON editing required to fix.
After: Kimi Coding works out of the box when configured via
openclaw configureorKIMI_API_KEYenvironment variable, using the correctanthropic-messagesAPI endpoint.Greptile Summary
This PR adds the missing
kimi-codingimplicit provider template that was causing 403 errors when users tried to configure Kimi for Coding viaKIMI_API_KEYenvironment variable oropenclaw configure.Key changes:
buildKimiCodingProvider()function with correctanthropic-messagesAPI type and base URLresolveImplicitProviders()to auto-discover the provider whenKIMI_API_KEYis setapplyKimiCodeProviderConfig()to properly callapplyProviderConfigWithDefaultModel()instead of only setting the model aliasThe implementation follows the same pattern used by other providers (moonshot, minimax, nvidia) and correctly fixes the root cause where the provider
apitype andbaseUrlwere not being written to config during onboarding.Confidence Score: 5/5
anthropic-messagesAPI type. Only minor style suggestion about constant reuse.Last reviewed commit: 961c47c