diff --git a/src/index.ts b/src/index.ts index 950685d..1e64ef5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -216,6 +216,7 @@ export class Client extends Core.APIClient { applicationName?: string; modelName?: string; mustCompute?: 'all_or_none' | 'ignore_failures'; + toolTrace?: any[]; }): Promise; // Unified implementation for both call styles @@ -249,6 +250,7 @@ export class Client extends Core.APIClient { applicationName: arg1.applicationName, modelName: arg1.modelName, mustCompute: arg1.mustCompute ?? 'all_or_none', + toolTrace: arg1.toolTrace, }; } else { // Called using positional syntax (backward compatible) @@ -279,7 +281,8 @@ export class Client extends Core.APIClient { opts.publish, opts.applicationName, opts.modelName, - opts.mustCompute + opts.mustCompute, + opts.toolTrace ); } diff --git a/src/resources/decorators.ts b/src/resources/decorators.ts index 7c019ed..64d67b1 100644 --- a/src/resources/decorators.ts +++ b/src/resources/decorators.ts @@ -20,7 +20,8 @@ export class Decorators extends APIResource { publish?: boolean, applicationName?: string, modelName?: string, - mustCompute: 'all_or_none' | 'ignore_failures' = 'all_or_none' + mustCompute: 'all_or_none' | 'ignore_failures' = 'all_or_none', + toolTrace?: any[] ): Promise { try { // Prepare the payload for detect API @@ -35,6 +36,7 @@ export class Decorators extends APIResource { ...(publish ? { publish } : {}), // Only include publish if provided ...(applicationName ? { application_name: applicationName } : {}), // Only include application_name if provided ...(modelName ? { model_name: modelName } : {}), // Only include model_name if provided + ...(toolTrace ? { tool_trace: toolTrace } : {}), must_compute: mustCompute, // Always include must_compute with default value }; diff --git a/src/resources/inference.ts b/src/resources/inference.ts index 4945351..04bfb45 100644 --- a/src/resources/inference.ts +++ b/src/resources/inference.ts @@ -74,6 +74,11 @@ export namespace InferenceDetectParams { * Indicates the computation strategy. Must be either 'all_or_none' or 'ignore_failures'. */ must_compute?: 'all_or_none' | 'ignore_failures'; + + /** + * Optional tool trace for analysis + */ + tool_trace?: any[]; } export namespace Body {