{"record":{"id":"bf65471ec2ad68ea","repo":"diegosouzapw/OmniRoute","slug":"kimi-web-does-not-support-image-audio-file-or-t","errorCode":null,"errorMessage":"Kimi Web does not support image, audio, file, or tool content","messagePattern":"Kimi Web does not support image, audio, file, or tool content","errorType":"validation","errorClass":"Error","httpStatus":400,"severity":"error","filePath":"open-sse/executors/kimi-web.ts","lineNumber":227,"sourceCode":"function textFromContent(content: unknown): string {\n  if (typeof content === \"string\") return content;\n  if (!Array.isArray(content)) {\n    throw new Error(\"Kimi Web only supports text message content\");\n  }\n\n  return content\n    .map((part) => {\n      if (!part || typeof part !== \"object\" || Array.isArray(part)) {\n        throw new Error(\"Kimi Web only supports text message content\");\n      }\n      const record = part as Record<string, unknown>;\n      if (\n        (record.type === \"text\" || record.type === \"input_text\") &&\n        typeof record.text === \"string\"\n      ) {\n        return record.text;\n      }\n      throw new Error(\"Kimi Web does not support image, audio, file, or tool content\");\n    })\n    .join(\"\");\n}\n\n/** Fold text-only OpenAI history into the single user turn accepted by Kimi Web. */\nexport function foldMessages(messages: KimiWebInputMessage[]): FoldedKimiWebMessages {\n  const systemParts: string[] = [];\n  const conversationParts: string[] = [];\n\n  for (const message of messages) {\n    if (message.role === \"tool\" || message.role === \"function\") {\n      throw new Error(\"Kimi Web does not support tool result messages\");\n    }\n    if (message.tool_calls !== undefined) {\n      throw new Error(\"Kimi Web does not support assistant tool calls\");\n    }\n\n    const text = textFromContent(message.content);","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/kimi-web.ts#L209-L245","documentation":"Error \"Kimi Web does not support image, audio, file, or tool content\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/executors/kimi-web.ts:227 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}