Compare commits

...
Author SHA1 Message Date
Arafatkatze 0fcafa9301 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
2026-01-08 18:04:32 -08:00
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -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)