mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-19 04:40:52 +08:00
refactor(claude): remove redundant system instructions check in Claude executor
This commit is contained in:
@@ -110,10 +110,6 @@ func (e *ClaudeExecutor) Execute(ctx context.Context, auth *cliproxyauth.Auth, r
|
|||||||
return resp, err
|
return resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if !strings.HasPrefix(baseModel, "claude-3-5-haiku") {
|
|
||||||
body = checkSystemInstructions(body)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply cloaking (system prompt injection, fake user ID, sensitive word obfuscation)
|
// Apply cloaking (system prompt injection, fake user ID, sensitive word obfuscation)
|
||||||
// based on client type and configuration.
|
// based on client type and configuration.
|
||||||
body = applyCloaking(ctx, e.cfg, auth, body, baseModel)
|
body = applyCloaking(ctx, e.cfg, auth, body, baseModel)
|
||||||
@@ -245,8 +241,6 @@ func (e *ClaudeExecutor) ExecuteStream(ctx context.Context, auth *cliproxyauth.A
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
body = checkSystemInstructions(body)
|
|
||||||
|
|
||||||
// Apply cloaking (system prompt injection, fake user ID, sensitive word obfuscation)
|
// Apply cloaking (system prompt injection, fake user ID, sensitive word obfuscation)
|
||||||
// based on client type and configuration.
|
// based on client type and configuration.
|
||||||
body = applyCloaking(ctx, e.cfg, auth, body, baseModel)
|
body = applyCloaking(ctx, e.cfg, auth, body, baseModel)
|
||||||
|
|||||||
Reference in New Issue
Block a user