Commit a9e256ce authored by yangjianbo's avatar yangjianbo
Browse files

fix(openai): 修复 usage 为空导致 panic(P0-02)

parent 7e1674e4
......@@ -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{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment