Skip to content

πŸ› fix: use Anthropic SDK for Kimi Coding Plan provider#13345

Merged
arvinxx merged 2 commits intolobehub:canaryfrom
hardy-one:fix/kimi-coding-plan-anthropic-sdk
Mar 30, 2026
Merged

πŸ› fix: use Anthropic SDK for Kimi Coding Plan provider#13345
arvinxx merged 2 commits intolobehub:canaryfrom
hardy-one:fix/kimi-coding-plan-anthropic-sdk

Conversation

@hardy-one
Copy link
Copy Markdown
Contributor

πŸ’» Change Type

  • ✨ feat
  • πŸ› fix
  • ♻️ refactor
  • πŸ’„ style
  • πŸ‘· build
  • ⚑️ perf
  • βœ… test
  • πŸ“ docs
  • πŸ”¨ chore

πŸ”— Related Issue

πŸ”€ Description of Change

Kimi Coding Plan API requires Anthropic SDK instead of OpenAI SDK. Using OpenAI format will result in error: "Kimi For
Coding is currently only available for Coding Agents such as Kimi CLI, Claude Code, Roo Code, Kilo Code, etc."

Changes:

  • Switch from OpenAI SDK to Anthropic SDK for Kimi Coding Plan
  • Update baseURL from /coding/v1 to /coding (Anthropic-compatible endpoint)
  • Update model IDs: kimi-k2.5 β†’ k2p5, remove kimi-k2
  • Fix max_tokens resolution to use KimiCodingPlan model list instead of anthropic model list
  • Rewrite tests for Anthropic SDK compatibility

πŸ§ͺ How to Test

  • Tested locally
  • Added/updated tests
  • No tests needed

πŸ“Έ Screenshots / Videos

Before After
... ...

πŸ“ Additional Information

- Switch from OpenAI SDK to Anthropic SDK for Kimi Coding Plan
- Update baseURL from `/coding/v1` to `/coding` (Anthropic-compatible endpoint)
- Update model IDs: `kimi-k2.5` β†’ `k2p5`, remove `kimi-k2`
- Fix max_tokens resolution to use KimiCodingPlan model list
- Rewrite tests for Anthropic SDK compatibility
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

@hardy-one is attempting to deploy a commit to the LobeHub OSS Team on Vercel.

A member of the Team first needs to authorize it.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 93.10345% with 2 lines in your changes missing coverage. Please review.
βœ… Project coverage is 66.95%. Comparing base (966f943) to head (a6c1fa5).
⚠️ Report is 12 commits behind head on canary.

Additional details and impacted files
@@           Coverage Diff           @@
##           canary   #13345   +/-   ##
=======================================
  Coverage   66.94%   66.95%           
=======================================
  Files        1903     1903           
  Lines      153684   153689    +5     
  Branches    15534    15532    -2     
=======================================
+ Hits       102889   102899   +10     
+ Misses      50675    50670    -5     
  Partials      120      120           
Flag Coverage Ξ”
app 58.52% <ΓΈ> (ΓΈ)
database 96.66% <ΓΈ> (ΓΈ)
packages/agent-runtime 89.61% <ΓΈ> (ΓΈ)
packages/context-engine 86.47% <ΓΈ> (ΓΈ)
packages/conversation-flow 92.36% <ΓΈ> (ΓΈ)
packages/file-loaders 87.02% <ΓΈ> (ΓΈ)
packages/memory-user-memory 66.68% <ΓΈ> (ΓΈ)
packages/model-bank 99.85% <100.00%> (ΓΈ)
packages/model-runtime 84.48% <92.30%> (+0.03%) ⬆️
packages/prompts 67.76% <ΓΈ> (ΓΈ)
packages/python-interpreter 92.90% <ΓΈ> (ΓΈ)
packages/ssrf-safe-fetch 0.00% <ΓΈ> (ΓΈ)
packages/utils 90.41% <ΓΈ> (ΓΈ)
packages/web-crawler 88.82% <ΓΈ> (ΓΈ)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Ξ”
Store 67.29% <ΓΈ> (ΓΈ)
Services 49.30% <ΓΈ> (ΓΈ)
Server 67.27% <ΓΈ> (ΓΈ)
Libs 51.03% <ΓΈ> (ΓΈ)
Utils 91.01% <ΓΈ> (ΓΈ)
πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hardy-one hardy-one marked this pull request as ready for review March 27, 2026 12:22
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We've reviewed this pull request using the Sourcery rules engine

Copy link
Copy Markdown

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

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: b7426058c6

ℹ️ 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".

@arvinxx arvinxx merged commit 59d8d87 into lobehub:canary Mar 30, 2026
20 of 21 checks passed
@lobehubbot
Copy link
Copy Markdown
Member

❀️ Great PR @hardy-one ❀️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.

cy948 pushed a commit to cy948/lobe-chat that referenced this pull request Mar 31, 2026
πŸ› fix: use Anthropic SDK for Kimi Coding Plan provider

- Switch from OpenAI SDK to Anthropic SDK for Kimi Coding Plan
- Update baseURL from `/coding/v1` to `/coding` (Anthropic-compatible endpoint)
- Update model IDs: `kimi-k2.5` β†’ `k2p5`, remove `kimi-k2`
- Fix max_tokens resolution to use KimiCodingPlan model list
- Rewrite tests for Anthropic SDK compatibility
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.

3 participants