fix(universal): 映射脚本上游模型名
ci / verify (pull_request) Successful in 9m51s
ci / verify (pull_request) Successful in 9m51s
让 server-main 参数预处理兼容上下文使用平台绑定的真实模型名,避免把用户侧别名提交给上游。
This commit is contained in:
@@ -102,7 +102,7 @@ func TestUniversalClientSupportsServerMainScriptContextAndNestedResult(t *testin
|
||||
"customGetParamsScript": map[string]any{
|
||||
"image_generate": `async function getParams(params, context) {
|
||||
const processed = await context.preProcessParams(params, context.type);
|
||||
return { prompt: processed.prompt + "-" + context.processedParams.prompt };
|
||||
return { prompt: processed.prompt + "-" + processed.model + "-" + context.processedParams.model };
|
||||
}`,
|
||||
},
|
||||
"customSubmitScript": map[string]any{
|
||||
@@ -128,7 +128,7 @@ func TestUniversalClientSupportsServerMainScriptContextAndNestedResult(t *testin
|
||||
t.Fatalf("unexpected nested result: %#v", response.Result)
|
||||
}
|
||||
image, ok := data[0].(map[string]any)
|
||||
if !ok || image["url"] != "https://cdn.example/hello-hello.png" {
|
||||
if !ok || image["url"] != "https://cdn.example/hello-provider-model-provider-model.png" {
|
||||
t.Fatalf("unexpected image result: %#v", response.Result)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user