mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
fix: use startsWith for ling model detection and add ling to openapi prompt enum
This commit is contained in:
@@ -348,7 +348,7 @@ export namespace ProviderTransform {
|
||||
}
|
||||
return 0.6
|
||||
}
|
||||
if (model.api.id.toLowerCase().includes("ling")) return 0.3 // kilocode_change
|
||||
if (model.api.id.toLowerCase().startsWith("ling")) return 0.3 // kilocode_change
|
||||
return undefined
|
||||
}
|
||||
|
||||
@@ -358,7 +358,7 @@ export namespace ProviderTransform {
|
||||
if (["minimax-m2", "gemini", "kimi-k2.5", "kimi-k2p5", "kimi-k2-5"].some((s) => id.includes(s))) {
|
||||
return 0.95
|
||||
}
|
||||
if (model.api.id.toLowerCase().includes("ling")) return 0.95 // kilocode_change
|
||||
if (model.api.id.toLowerCase().startsWith("ling")) return 0.95 // kilocode_change
|
||||
return undefined
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ export namespace ProviderTransform {
|
||||
return 20
|
||||
}
|
||||
if (id.includes("gemini")) return 64
|
||||
if (model.api.id.toLowerCase().includes("ling")) return 20 // kilocode_change
|
||||
if (model.api.id.toLowerCase().startsWith("ling")) return 20 // kilocode_change
|
||||
return undefined
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ export namespace SystemPrompt {
|
||||
if (model.api.id.includes("claude")) return [PROMPT_ANTHROPIC]
|
||||
if (model.api.id.toLowerCase().includes("trinity")) return [PROMPT_TRINITY]
|
||||
if (model.api.id.toLowerCase().includes("kimi")) return [PROMPT_KIMI]
|
||||
if (model.api.id.toLowerCase().includes("ling")) return [PROMPT_LING] // kilocode_change
|
||||
if (model.api.id.toLowerCase().startsWith("ling")) return [PROMPT_LING] // kilocode_change
|
||||
return [PROMPT_DEFAULT]
|
||||
}
|
||||
|
||||
|
||||
@@ -15686,7 +15686,7 @@
|
||||
},
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"enum": ["codex", "gemini", "beast", "anthropic", "trinity", "anthropic_without_todo"]
|
||||
"enum": ["codex", "gemini", "beast", "anthropic", "trinity", "anthropic_without_todo", "ling"]
|
||||
},
|
||||
"isFree": {
|
||||
"type": "boolean"
|
||||
|
||||
Reference in New Issue
Block a user