Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
fix: preserve kie market model ids
wauputr4fb0361fc8c90
diff --git a/open-sse/handlers/imageGeneration.ts b/open-sse/handlers/imageGeneration.tsindex 63d7bd5c55..dad16c939d 100644--- a/open-sse/handlers/imageGeneration.ts+++ b/open-sse/handlers/imageGeneration.ts@@ -392,8 +392,6 @@ async function handleKieImageGeneration({if (isMarket) {// Unified Market API endpointbaseUrl = `${providerConfig.baseUrl.replace(/\/$/, "")}/api/v1/jobs/createTask`;- // Strip category prefix (e.g., "gpt/gpt-image-2" -> "gpt-image-2")- const marketModelId = model.includes("/") ? model.split("/").pop() : model;const input: Record<string, unknown> = {prompt,aspect_ratio: mapImageSize(size, "1:1"),@@ -402,7 +400,7 @@ async function handleKieImageGeneration({input.image_url = imageUrl;}payload = {- model: marketModelId,+ model,input,};} else {diff --git a/open-sse/handlers/musicGeneration.ts b/open-sse/handlers/musicGeneration.tsindex 3a1202eeba..14fce3df0b 100644--- a/open-sse/handlers/musicGeneration.ts+++ b/open-sse/handlers/musicGeneration.ts@@ -266,7 +266,7 @@ async function handleKieMusicGeneration({if (isMarket) {url = `${baseUrl}/api/v1/jobs/createTask`;payload = {- model: model.includes("/") ? model.split("/").pop() : model,+ model,callBackUrl: getKieCallbackUrl(body),input: {prompt,@@ -310,7 +310,9 @@ async function handleKieMusicGeneration({const statusUrl = isMarket? `${baseUrl}/api/v1/jobs/recordInfo`- : providerConfig.statusUrl || `${baseUrl}/api/v1/generate/record-info`;+ : providerConfig.statusUrl && !providerConfig.statusUrl.includes("jobs/recordInfo")+ ? providerConfig.statusUrl+ : `${baseUrl}/api/v1/generate/record-info`;const { data: recordData, state } = await kieExecutor.pollTask({statusUrl,diff --git a/open-sse/handlers/videoGeneration.ts b/open-sse/handlers/videoGeneration.tsindex 25065c60f8..d5134bc8b9 100644--- a/open-sse/handlers/videoGeneration.ts+++ b/open-sse/handlers/videoGeneration.ts@@ -328,11 +328,8 @@ async function handleKieVideoGeneration({return { success: false, status: 401, error: "KIE API key is required" };}- // Strip category prefix (e.g., "veo/veo-3-1" -> "veo-3-1")- const marketModelId = model.includes("/") ? model.split("/").pop() : model;-const payload = {- model: marketModelId,+ model,input: {prompt,duration: body.duration ? String(body.duration) : "5",