fix(ci): sync diagnostics and AI sampling

This commit is contained in:
t8y2 2026-06-19 14:49:34 +08:00
parent d59997c090
commit c9ab2fb60a
2 changed files with 5 additions and 3 deletions

View File

@ -425,10 +425,10 @@ fn is_kimi_model(model: &str) -> bool {
if let Some(rest) = model.strip_prefix("kimi-k") {
if rest.starts_with("2.") && rest.len() > 2 {
// K2.x — the digit after "2." must be >= 5 (so K2.5+)
rest[2..].chars().next().map_or(false, |c| c.is_ascii_digit() && c >= '5')
rest[2..].chars().next().is_some_and(|c| c.is_ascii_digit() && c >= '5')
} else {
// K3+ — first char must be digit >= 3
rest.chars().next().map_or(false, |c| c.is_ascii_digit() && c >= '3')
rest.chars().next().is_some_and(|c| c.is_ascii_digit() && c >= '3')
}
} else {
false
@ -436,7 +436,7 @@ fn is_kimi_model(model: &str) -> bool {
}
pub fn supports_temperature(config: &AiConfig) -> bool {
!(is_openai_api_config(config) && is_openai_reasoning_model(&config.model))
!(is_kimi_model(&config.model) || is_openai_api_config(config) && is_openai_reasoning_model(&config.model))
}
pub fn add_temperature_if_supported(body: &mut serde_json::Value, request: &AiCompletionRequest) {

View File

@ -20,6 +20,8 @@ export const BRIDGE_REQUIRED_TYPES = [
"sqlserver",
"oracle",
"elasticsearch",
"qdrant",
"milvus",
"etcd",
"dameng",
"kingbase",