mirror of
https://github.com/cline/cline.git
synced 2026-09-13 18:03:21 +08:00
refactor: replace @ts-ignore with @ts-expect-error and add new free model
- Replaced @ts-ignore-next-line with @ts-expect-error-next-line for better type safety in ClineHandler - Added "kwaipilot/kat-coder-pro:free" to the list of free models in OpenRouterModelPicker - Fixed trailing comma in providerUtils.ts filter condition
This commit is contained in:
@@ -184,7 +184,7 @@ export class ClineHandler implements ApiHandler {
|
||||
if (
|
||||
"reasoning_details" in delta &&
|
||||
delta.reasoning_details &&
|
||||
// @ts-ignore-next-line
|
||||
// @ts-expect-error-next-line
|
||||
delta?.reasoning_details?.length && // exists and non-0
|
||||
!shouldSkipReasoningForModel(this.options.openRouterModelId)
|
||||
) {
|
||||
@@ -196,7 +196,7 @@ export class ClineHandler implements ApiHandler {
|
||||
}
|
||||
|
||||
if (!didOutputUsage && chunk.usage) {
|
||||
// @ts-ignore-next-line
|
||||
// @ts-expect-error-next-line
|
||||
let totalCost = (chunk.usage.cost || 0) + (chunk.usage.cost_details?.upstream_inference_cost || 0)
|
||||
|
||||
if (["x-ai/grok-code-fast-1", "minimax/minimax-m2.1"].includes(this.getModel().id)) {
|
||||
|
||||
@@ -90,6 +90,11 @@ export const freeModels = [
|
||||
description: "Mistral's latest model with strong coding abilities",
|
||||
label: "FREE",
|
||||
},
|
||||
{
|
||||
id: "kwaipilot/kat-coder-pro:free",
|
||||
description: "KwaiKAT's most advanced agentic coding model in the KAT-Coder series",
|
||||
label: "FREE",
|
||||
},
|
||||
]
|
||||
|
||||
const FREE_CLINE_MODELS = freeModels.map((m) => m.id)
|
||||
|
||||
Reference in New Issue
Block a user