mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-01 04:42:10 +03:00
fix: address kie provider pr review
This commit is contained in:
@@ -14,7 +14,6 @@ import { VertexExecutor } from "./vertex.ts";
|
||||
import { CliproxyapiExecutor } from "./cliproxyapi.ts";
|
||||
import { PerplexityWebExecutor } from "./perplexity-web.ts";
|
||||
import { GrokWebExecutor } from "./grok-web.ts";
|
||||
import { KieExecutor } from "./kie.ts";
|
||||
import { ChatGptWebExecutor } from "./chatgpt-web.ts";
|
||||
import { BlackboxWebExecutor } from "./blackbox-web.ts";
|
||||
import { MuseSparkWebExecutor } from "./muse-spark-web.ts";
|
||||
@@ -53,7 +52,6 @@ const executors = {
|
||||
"perplexity-web": new PerplexityWebExecutor(),
|
||||
"pplx-web": new PerplexityWebExecutor(), // Alias
|
||||
"grok-web": new GrokWebExecutor(),
|
||||
kie: new KieExecutor(),
|
||||
"chatgpt-web": new ChatGptWebExecutor(),
|
||||
"cgpt-web": new ChatGptWebExecutor(), // Alias
|
||||
"blackbox-web": new BlackboxWebExecutor(),
|
||||
|
||||
@@ -466,8 +466,8 @@ async function handleKieImageGeneration({
|
||||
|
||||
payload = {
|
||||
prompt,
|
||||
image_size: mapImageSize(size, "1:1"),
|
||||
num_images: body.n || 1,
|
||||
size: mapImageSize(size, "1:1"),
|
||||
nVariants: body.n || 1,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
12
tests/unit/kie-executor-routing.test.ts
Normal file
12
tests/unit/kie-executor-routing.test.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
|
||||
import { DefaultExecutor } from "../../open-sse/executors/default.ts";
|
||||
import { getExecutor, hasSpecializedExecutor } from "../../open-sse/executors/index.ts";
|
||||
import { KieExecutor } from "../../open-sse/executors/kie.ts";
|
||||
|
||||
test("KIE chat traffic uses the default executor while media keeps its task executor", () => {
|
||||
assert.equal(hasSpecializedExecutor("kie"), false);
|
||||
assert.ok(getExecutor("kie") instanceof DefaultExecutor);
|
||||
assert.equal(typeof KieExecutor, "function");
|
||||
});
|
||||
Reference in New Issue
Block a user