Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions packages/opencode/src/provider/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,7 @@ export namespace ProviderTransform {
id.includes("minimax") ||
id.includes("glm") ||
id.includes("mistral") ||
id.includes("kimi") ||
// TODO: Remove this after models.dev data is fixed to use "kimi-k2.5" instead of "k2p5"
id.includes("k2p5")
id.includes("kimi")
)
return {}

Expand Down Expand Up @@ -617,6 +615,16 @@ export namespace ProviderTransform {
}
}

// kimi-k2.5 supports enabling thinking capability
// https://platform.moonshot.cn/docs/guide/kimi-k2-5-quickstart
if (["k2p5", "kimi-k2.5"].includes(input.model.providerID) && input.model.api.npm === "@ai-sdk/openai-compatible") {
result["thinking"] = {
type: "enabled",
budgetTokens: 31999,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's only an enabled or disabled thing

Also k2p5 uses anthropic sdk

Copy link
Author

@3dot141 3dot141 Feb 5, 2026

Choose a reason for hiding this comment

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

k2p5 uses anthropic sdk, but moonshotai-cn use openai-compatible, i mixup.
image
image

sorry, i think this is repeated issues, the pr
https://github.com/anomalyco/opencode/pull/12147/changes
has fixed it

}
result["interleaved"] = { field: "reasoning_content" }
}

if (input.model.providerID === "openai" || input.providerOptions?.setCacheKey) {
result["promptCacheKey"] = input.sessionID
}
Expand Down
Loading