fix(openai): 修复 usage 为空导致 panic(P0-02)
This commit is contained in:
1 parent
7e1674e43a
commit
a9e256ce8c
1 file changed
+4
@@ -969,6 +969,10 @@ func (s *OpenAIGatewayService) Forward(ctx context.Context, c *gin.Context, acco
|
||||
}
|
||||
}
|
||||
|
||||
if usage == nil {
|
||||
usage = &OpenAIUsage{}
|
||||
}
|
||||
|
||||
reasoningEffort := extractOpenAIReasoningEffort(reqBody, originalModel)
|
||||
|
||||
return &OpenAIForwardResult{
|
||||
|
||||
Reference in new issue
Block a user