Files
ai-agent/gateway/model_split_test.go
T
19904408334andClaude Opus 4.7 3620e1ea61 refactor(gateway): ModelCallResult 拆分为 SubmitModelCall + WaitModelCallResult
- SubmitModelCall: 提交段(异步模型生成唯一 msgTopic),返回 (res, msgTopic, err)
- WaitModelCallResult: 订阅段(重订阅可恢复结果,供 Task5 AsyncModelCallWithRecovery 复用)
- ModelCallResult 签名不变,内部复用二者;订阅参数与拆分前一致

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 16:04:13 +08:00

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
}