@decocms/runtime 1.2.13 → 1.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/decopilot.ts +1 -1
- package/src/tools.ts +0 -12
package/package.json
CHANGED
package/src/decopilot.ts
CHANGED
|
@@ -105,7 +105,7 @@ export async function streamAgent(
|
|
|
105
105
|
|
|
106
106
|
const credentialId = params.credentialId ?? config.credentialId;
|
|
107
107
|
const thinking = params.thinking ?? config.thinking;
|
|
108
|
-
const hasModels =
|
|
108
|
+
const hasModels = thinking?.id;
|
|
109
109
|
|
|
110
110
|
const request = {
|
|
111
111
|
messages: params.messages,
|
package/src/tools.ts
CHANGED
|
@@ -1050,28 +1050,16 @@ export const createMCPServer = <
|
|
|
1050
1050
|
|
|
1051
1051
|
// Only close transport for non-streaming responses
|
|
1052
1052
|
if (!isStreaming) {
|
|
1053
|
-
console.debug(
|
|
1054
|
-
"[MCP Transport] Closing transport for non-streaming response",
|
|
1055
|
-
);
|
|
1056
1053
|
try {
|
|
1057
1054
|
await transport.close?.();
|
|
1058
1055
|
} catch {
|
|
1059
1056
|
// Ignore close errors
|
|
1060
1057
|
}
|
|
1061
|
-
} else {
|
|
1062
|
-
console.debug(
|
|
1063
|
-
"[MCP Transport] Keeping transport open for streaming response (Content-Type: %s)",
|
|
1064
|
-
contentType,
|
|
1065
|
-
);
|
|
1066
1058
|
}
|
|
1067
1059
|
|
|
1068
1060
|
return response;
|
|
1069
1061
|
} catch (error) {
|
|
1070
1062
|
// On error, always try to close transport to prevent leaks
|
|
1071
|
-
console.debug(
|
|
1072
|
-
"[MCP Transport] Closing transport due to error:",
|
|
1073
|
-
error instanceof Error ? error.message : error,
|
|
1074
|
-
);
|
|
1075
1063
|
try {
|
|
1076
1064
|
await transport.close?.();
|
|
1077
1065
|
} catch {
|