StopServerToolsWhenCondition - TypeScript SDK

StopServerToolsWhenCondition type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

A single condition that, when met, halts the server-tool agent loop.

Supported Types

models.StopServerToolsWhenFinishReasonIs

1const value: models.StopServerToolsWhenFinishReasonIs = {
2 reason: "<value>",
3 type: "finish_reason_is",
4};

models.StopServerToolsWhenHasToolCall

1const value: models.StopServerToolsWhenHasToolCall = {
2 toolName: "<value>",
3 type: "has_tool_call",
4};

models.StopServerToolsWhenMaxCost

1const value: models.StopServerToolsWhenMaxCost = {
2 maxCostInDollars: 1543.31,
3 type: "max_cost",
4};

models.StopServerToolsWhenMaxTokensUsed

1const value: models.StopServerToolsWhenMaxTokensUsed = {
2 maxTokens: 577706,
3 type: "max_tokens_used",
4};

models.StopServerToolsWhenStepCountIs

1const value: models.StopServerToolsWhenStepCountIs = {
2 stepCount: 5,
3 type: "step_count_is",
4};