mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-23 04:02:01 +08:00
fix(models): enhance model type checks for function calling and web s… (#9579)
fix(models): enhance model type checks for function calling and web search models
This commit is contained in:
parent
ddc5f46e9b
commit
f273621082
@ -359,7 +359,7 @@ export const getThinkModelType = (model: Model): ThinkingModelType => {
|
||||
}
|
||||
|
||||
export function isFunctionCallingModel(model?: Model): boolean {
|
||||
if (!model || isEmbeddingModel(model) || isRerankModel(model)) {
|
||||
if (!model || isEmbeddingModel(model) || isRerankModel(model) || isTextToImageModel(model)) {
|
||||
return false
|
||||
}
|
||||
|
||||
@ -2723,7 +2723,14 @@ export function isGeminiReasoningModel(model?: Model): boolean {
|
||||
|
||||
export const isSupportedThinkingTokenGeminiModel = (model: Model): boolean => {
|
||||
const modelId = getLowerBaseModelName(model.id, '/')
|
||||
return modelId.includes('gemini-2.5')
|
||||
if (modelId.includes('gemini-2.5')) {
|
||||
if (modelId.includes('image') || modelId.includes('tts')) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/** 是否为Qwen推理模型 */
|
||||
@ -2957,7 +2964,7 @@ export function isNotSupportTemperatureAndTopP(model: Model): boolean {
|
||||
}
|
||||
|
||||
export function isWebSearchModel(model: Model): boolean {
|
||||
if (!model || isEmbeddingModel(model) || isRerankModel(model)) {
|
||||
if (!model || isEmbeddingModel(model) || isRerankModel(model) || isTextToImageModel(model)) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user