Skip to content

Conversation

@xxchan
Copy link
Collaborator

@xxchan xxchan commented Dec 19, 2025

  • also pass kimi thinking config as extra_body

Signed-off-by: tianxiao [email protected]

- also pass kimi thinking config as extra_body

Signed-off-by: tianxiao <[email protected]>
Copilot AI review requested due to automatic review settings December 19, 2025 12:26
Copy link

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 adds support for the extra_body parameter to multiple chat providers (Kimi, OpenAILegacy, OpenAIResponses, and Anthropic), allowing users to pass arbitrary provider-specific request fields. Additionally, it refactors how Kimi's thinking configuration is passed to use the extra_body mechanism.

  • Added extra_body parameter support to Kimi, OpenAILegacy, OpenAIResponses, and Anthropic chat providers
  • Refactored Kimi's thinking configuration to use thinking parameter (instead of reasoning_effort) which is injected via extra_body
  • Added comprehensive test coverage for extra_body functionality across all affected providers

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/kosong/chat_provider/init.py Defines the ExtraBody type alias for provider-specific request fields
src/kosong/chat_provider/kimi.py Refactors thinking config to use thinking parameter passed via extra_body; adds extra_body support
src/kosong/contrib/chat_provider/openai_legacy.py Adds extra_body parameter support to OpenAILegacy provider
src/kosong/contrib/chat_provider/openai_responses.py Adds extra_body parameter support to OpenAIResponses provider
src/kosong/contrib/chat_provider/anthropic.py Adds extra_body parameter support to Anthropic provider
tests/api_snapshot_tests/test_kimi.py Updates test to reflect new thinking format; adds test for merging extra_body with thinking config
tests/api_snapshot_tests/test_openai_legacy.py Adds test for extra_body functionality
tests/api_snapshot_tests/test_openai_responses.py Adds test for extra_body functionality
tests/api_snapshot_tests/test_anthropic.py Adds test for extra_body functionality
CHANGELOG.md Documents the new extra_body support and Kimi thinking config changes

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

@xxchan xxchan requested review from pvzheroes125 and stdrc December 19, 2025 12:48
@pvzheroes125
Copy link
Collaborator

pvzheroes125 commented Dec 19, 2025

@stdrc 现在是不是可以在Kcli config里面支持extra_body了(


@stdrc Is it possible to support extra_body in Kcli config now (

@stdrc
Copy link
Collaborator

stdrc commented Dec 19, 2025

@stdrc 现在是不是可以在Kcli config里面支持extra_body了(

@stdrc Is it possible to support extra_body in Kcli config now (

下个版本(

正准备发版了,来不及 review 了


@stdrc Is it possible to support extra_body in Kcli config now?

@stdrc Is it possible to support extra_body in Kcli config now (

next version (

It’s about to be released, it’s too late to review

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.

4 participants