fix: remove unsupported safety_identifier and previous_response_id fields from upstream requests
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -846,10 +846,12 @@ func (s *OpenAIGatewayService) Forward(ctx context.Context, c *gin.Context, acco
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove prompt_cache_retention (not supported by upstream OpenAI API)
|
// Remove unsupported fields (not supported by upstream OpenAI API)
|
||||||
if _, has := reqBody["prompt_cache_retention"]; has {
|
for _, unsupportedField := range []string{"prompt_cache_retention", "safety_identifier", "previous_response_id"} {
|
||||||
delete(reqBody, "prompt_cache_retention")
|
if _, has := reqBody[unsupportedField]; has {
|
||||||
bodyModified = true
|
delete(reqBody, unsupportedField)
|
||||||
|
bodyModified = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user