fix: 修复并行分支续跑输出丢失及模型空指针
合并续跑时各分支独立的 ConfigMap 副本,避免汇合节点输出丢失;并对模型配置缺失和空 responseType 增加保护,防止空指针崩溃。
This commit is contained in:
@@ -69,6 +69,11 @@ func ModelCallResultLambda(ctx context.Context, modelId int64, sessionId string,
|
||||
if err != nil {
|
||||
return nil, nil, false, fmt.Errorf("获取模型配置失败: %w", err)
|
||||
}
|
||||
// model-gateway 对不存在的模型返回 modelManage=null(HTTP 仍 200),零值 struct 里 ResponseType 是 nil 指针,
|
||||
// 直接传入 ModelCallResult 会在 *responseType 处 panic,这里提前报业务错误
|
||||
if g.IsEmpty(modelInfo.ModelManage.Id) {
|
||||
return nil, nil, false, fmt.Errorf("模型配置不存在: modelId=%d", modelId)
|
||||
}
|
||||
businessParams := make(map[string]any)
|
||||
if !g.IsEmpty(prompt) {
|
||||
if modelInfo.ModelManage.ModelType != nil && *modelInfo.ModelManage.ModelType == model.TypeVideo {
|
||||
|
||||
Reference in New Issue
Block a user