- SubmitModelCall: 提交段(异步模型生成唯一 msgTopic),返回 (res, msgTopic, err) - WaitModelCallResult: 订阅段(重订阅可恢复结果,供 Task5 AsyncModelCallWithRecovery 复用) - ModelCallResult 签名不变,内部复用二者;订阅参数与拆分前一致 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
16 lines
574 B
Go
16 lines
574 B
Go
package gateway
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"ai-agent/workflow/consts/model"
|
|
)
|
|
|
|
// TestSplitSignatures 只做编译期签名验证:拆分后的函数存在且签名符合 memo 包装契约。
|
|
// 不做实际调用(依赖 live model-gateway + Consul),实际行为由端到端走查覆盖。
|
|
func TestSplitSignatures(t *testing.T) {
|
|
var _ func(context.Context, int64, model.ResponseType, string, map[string]any, map[string]any) (*ModelCallRes, string, error) = SubmitModelCall
|
|
var _ func(context.Context, string) (*ModelCallRes, error) = WaitModelCallResult
|
|
}
|