From 52c17f03a55aa3dfa0f249493e7e11102c4e329b Mon Sep 17 00:00:00 2001 From: Luis Pater Date: Wed, 26 Nov 2025 02:06:16 +0800 Subject: [PATCH] **fix(executor): comment out redundant code for setting Claude system instructions** - Commented out multiple instances of `sjson.SetRawBytes` for setting `system` key to Claude instructions as they are redundant. - Code cleanup to improve clarity and maintainability without affecting functionality. --- internal/runtime/executor/claude_executor.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/runtime/executor/claude_executor.go b/internal/runtime/executor/claude_executor.go index 78f471f2..08347a4e 100644 --- a/internal/runtime/executor/claude_executor.go +++ b/internal/runtime/executor/claude_executor.go @@ -60,7 +60,7 @@ func (e *ClaudeExecutor) Execute(ctx context.Context, auth *cliproxyauth.Auth, r } if !strings.HasPrefix(modelForUpstream, "claude-3-5-haiku") { - body, _ = sjson.SetRawBytes(body, "system", []byte(misc.ClaudeCodeInstructions)) + // body, _ = sjson.SetRawBytes(body, "system", []byte(misc.ClaudeCodeInstructions)) } body = applyPayloadConfig(e.cfg, req.Model, body) @@ -154,7 +154,7 @@ func (e *ClaudeExecutor) ExecuteStream(ctx context.Context, auth *cliproxyauth.A if modelOverride := e.resolveUpstreamModel(req.Model, auth); modelOverride != "" { body, _ = sjson.SetBytes(body, "model", modelOverride) } - body, _ = sjson.SetRawBytes(body, "system", []byte(misc.ClaudeCodeInstructions)) + // body, _ = sjson.SetRawBytes(body, "system", []byte(misc.ClaudeCodeInstructions)) body = applyPayloadConfig(e.cfg, req.Model, body) url := fmt.Sprintf("%s/v1/messages?beta=true", baseURL) @@ -283,7 +283,7 @@ func (e *ClaudeExecutor) CountTokens(ctx context.Context, auth *cliproxyauth.Aut } if !strings.HasPrefix(modelForUpstream, "claude-3-5-haiku") { - body, _ = sjson.SetRawBytes(body, "system", []byte(misc.ClaudeCodeInstructions)) + // body, _ = sjson.SetRawBytes(body, "system", []byte(misc.ClaudeCodeInstructions)) } url := fmt.Sprintf("%s/v1/messages/count_tokens?beta=true", baseURL)