fix(mitm): Kiro binary EventStream crash + add models & TTS tool filtering

- server.js: isBinaryData() skips binary AWS EventStream bodies (fix JSON parse crash)
- kiro.js: isBinaryEventStream detection + migrate to pipeTransformedEventStream pipeline
- base.js: add pipeTransformedSSE / pipeTransformedEventStream helpers
- chatCore.js: filter tool messages + tools for TTS models via getModelType()
- providerModels.js: add getModelType()
- cliTools.js: add gpt-5-mini (Copilot), glm-5 & minimax-m2.5 (Kiro)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Giao Ho
2026-06-06 11:31:52 +07:00
committed by decolua
parent c233c7c8fc
commit 0850f0a470
6 changed files with 439 additions and 117 deletions

View File

@@ -858,6 +858,13 @@ export function getModelTargetFormat(aliasOrId, modelId) {
return found?.targetFormat || null;
}
export function getModelType(aliasOrId, modelId) {
const models = PROVIDER_MODELS[aliasOrId];
if (!models) return null;
const found = models.find(m => m.id === modelId);
return found?.type || null;
}
export function getModelUpstreamId(aliasOrId, modelId) {
const models = PROVIDER_MODELS[aliasOrId];
const found = models?.find(m => m.id === modelId);