This commit is contained in:
sam committed 2025-10-03 16:18:32 +07:00
1 parent d2971fcdb9
commit 4ebca7f077
3 files changed
+134 -134

No files matched your search

+13 -13
View File
@@ -3,20 +3,20 @@
* (e.g., missing function name in the streaming response)
*/
export class MalformedToolCallError extends Error {
public readonly code = 'malformed_tool_call' as const;
public readonly toolCallId: string;
public readonly providerModel: string;
public readonly code = 'malformed_tool_call' as const;
public readonly toolCallId: string;
public readonly providerModel: string;
constructor(message: string, toolCallId: string, providerModel: string) {
super(message);
this.name = 'MalformedToolCallError';
this.toolCallId = toolCallId;
this.providerModel = providerModel;
constructor(message: string, toolCallId: string, providerModel: string) {
super(message);
this.name = 'MalformedToolCallError';
this.toolCallId = toolCallId;
this.providerModel = providerModel;
// Maintains proper stack trace for where our error was thrown (only available on V8)
if (Error.captureStackTrace) {
Error.captureStackTrace(this, MalformedToolCallError);
}
}
// Maintains proper stack trace for where our error was thrown (only available on V8)
if (Error.captureStackTrace) {
Error.captureStackTrace(this, MalformedToolCallError);
}
}
}