mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
fix: cc提示词检测暂时排除haiku模型
This commit is contained in:
@@ -52,7 +52,7 @@ class ClaudeCodeValidator {
|
||||
}
|
||||
|
||||
const model = typeof body.model === 'string' ? body.model : null
|
||||
if (!model) {
|
||||
if (!model || model.startsWith('claude-3-5-haiku')) {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -66,19 +66,6 @@ class ClaudeCodeValidator {
|
||||
? systemEntries[1].text
|
||||
: null
|
||||
|
||||
if (model.startsWith('claude-3-5-haiku')) {
|
||||
const messages = Array.isArray(body.messages) ? body.messages : []
|
||||
const isSingleUserMessage =
|
||||
messages.length === 1 && messages.every((item) => item?.role === 'user')
|
||||
|
||||
if (!isSingleUserMessage || !system0Text) {
|
||||
return false
|
||||
}
|
||||
|
||||
const similarity = similaritySimple(system0Text, haikuSystemPrompt, 0.9)
|
||||
return similarity.passed
|
||||
}
|
||||
|
||||
if (!system0Text || !system1Text) {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user