Skip to content

Commit df0132a

Browse files
committed
comment
Signed-off-by: Xiaolin Lin <xlin158@bloomberg.net>
1 parent 00d54fe commit df0132a

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

internal/extproc/chatcompletion_processor.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,10 @@ func (c *chatCompletionProcessorUpstreamFilter) ProcessRequestHeaders(ctx contex
266266
// Apply body mutations from the route and also restore original body on retry.
267267
if b := c.bodyMutator; b != nil {
268268
if bodyMutation != nil && bodyMutation.GetBody() != nil && len(bodyMutation.GetBody()) > 0 {
269-
// Apply body mutation to the already translated body
270269
mutatedBody, err := c.bodyMutator.Mutate(bodyMutation.GetBody(), c.onRetry)
271270
if err != nil {
272271
c.logger.Warn("failed to apply body mutation", "error", err)
273-
// Continue with original body on error
274272
} else {
275-
// Update the body mutation with the mutated body
276273
bodyMutation.Mutation = &extprocv3.BodyMutation_Body{Body: mutatedBody}
277274
}
278275
}

internal/extproc/messages_processor.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,10 @@ func (c *messagesProcessorUpstreamFilter) ProcessRequestHeaders(ctx context.Cont
210210
// Apply body mutations from the route and also restore original body on retry.
211211
if b := c.bodyMutator; b != nil {
212212
if bodyMutation != nil && bodyMutation.GetBody() != nil && len(bodyMutation.GetBody()) > 0 {
213-
// Apply body mutation to the already translated body
214213
mutatedBody, err := c.bodyMutator.Mutate(bodyMutation.GetBody(), c.onRetry)
215214
if err != nil {
216215
c.logger.Warn("failed to apply body mutation", "error", err)
217-
// Continue with original body on error
218216
} else {
219-
// Update the body mutation with the mutated body
220217
bodyMutation.Mutation = &extprocv3.BodyMutation_Body{Body: mutatedBody}
221218
}
222219
}

0 commit comments

Comments
 (0)