@autobe/agent 0.30.2 → 0.30.4-dev.20260324
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/LICENSE +661 -661
- package/README.md +261 -0
- package/lib/AutoBeMockAgent.d.ts +2 -1
- package/lib/AutoBeMockAgent.js +37 -18
- package/lib/AutoBeMockAgent.js.map +1 -1
- package/lib/constants/AutoBeConfigConstant.d.ts +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +12 -11
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/index.mjs +497 -71
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeExtractDecisionsHistory.d.ts +18 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeExtractDecisionsHistory.js +51 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeExtractDecisionsHistory.js.map +1 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistory.js +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistory.js.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioReviewHistory.js +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioReviewHistory.js.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeSectionCrossFileReviewHistory.d.ts +1 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeSectionCrossFileReviewHistory.js +15 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeSectionCrossFileReviewHistory.js.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeSectionReviewHistory.js +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeSectionReviewHistory.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +48 -13
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeExtractDecisions.d.ts +17 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeExtractDecisions.js +345 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeExtractDecisions.js.map +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +2 -2
- package/lib/orchestrate/analyze/orchestrateAnalyzeSectionCrossFileReview.d.ts +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeSectionCrossFileReview.js +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeSectionCrossFileReview.js.map +1 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeExtractDecisionsApplication.d.ts +91 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeExtractDecisionsApplication.js +3 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeExtractDecisionsApplication.js.map +1 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +15 -5
- package/lib/orchestrate/analyze/utils/buildErrorCodeRegistry.d.ts +0 -9
- package/lib/orchestrate/analyze/utils/buildErrorCodeRegistry.js +1 -13
- package/lib/orchestrate/analyze/utils/buildErrorCodeRegistry.js.map +1 -1
- package/lib/orchestrate/analyze/utils/detectDecisionConflicts.d.ts +63 -0
- package/lib/orchestrate/analyze/utils/detectDecisionConflicts.js +105 -0
- package/lib/orchestrate/analyze/utils/detectDecisionConflicts.js.map +1 -0
- package/lib/orchestrate/common/histories/transformPreliminaryHistory.js +1 -1
- package/lib/orchestrate/common/histories/transformPreliminaryHistory.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceActionEndpointReviewHistory.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceActionEndpointReviewHistory.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceBaseEndpointReviewHistory.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceBaseEndpointReviewHistory.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRefineHistory.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRefineHistory.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRefine.js +1 -2
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRefine.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +1 -2
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
- package/lib/orchestrate/interface/utils/AutoBeJsonSchemaValidator.js +316 -283
- package/lib/orchestrate/interface/utils/AutoBeJsonSchemaValidator.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaComponentReviewHistory.js +2 -2
- package/lib/orchestrate/prisma/histories/transformPrismaComponentReviewHistory.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistory.js +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistory.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaGroupHistory.js +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaGroupHistory.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaGroupReviewHistory.js +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaGroupReviewHistory.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistory.js +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistory.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaReviewHistory.js +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaReviewHistory.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +1 -1
- package/lib/structures/IAutoBeVendor.d.ts +13 -0
- package/package.json +5 -5
- package/src/AutoBeMockAgent.ts +283 -254
- package/src/constants/AutoBeConfigConstant.ts +1 -1
- package/src/constants/AutoBeSystemPromptConstant.ts +12 -11
- package/src/orchestrate/analyze/histories/transformAnalyzeExtractDecisionsHistory.ts +69 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeSectionCrossFileReviewHistory.ts +20 -0
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +58 -1
- package/src/orchestrate/analyze/orchestrateAnalyzeExtractDecisions.ts +97 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeSectionCrossFileReview.ts +2 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeExtractDecisionsApplication.ts +99 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +15 -5
- package/src/orchestrate/analyze/utils/buildErrorCodeRegistry.ts +0 -20
- package/src/orchestrate/analyze/utils/detectDecisionConflicts.ts +172 -0
- package/src/orchestrate/interface/orchestrateInterfaceSchemaRefine.ts +291 -292
- package/src/orchestrate/interface/orchestrateInterfaceSchemaReview.ts +309 -310
- package/src/orchestrate/interface/utils/AutoBeJsonSchemaValidator.ts +763 -725
- package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +237 -237
- package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +322 -322
- package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +52 -52
- package/src/structures/IAutoBeVendor.ts +127 -113
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
-
import { IAutoBeTypeScriptCompileResult } from "@autobe/interface";
|
|
3
|
-
import { v7 } from "uuid";
|
|
4
|
-
|
|
5
|
-
import { AutoBeSystemPromptConstant } from "../../constants/AutoBeSystemPromptConstant";
|
|
6
|
-
import { IAutoBeTestWriteResult } from "./structures/IAutoBeTestWriteResult";
|
|
7
|
-
|
|
8
|
-
export const transformTestCorrectHistories = (
|
|
9
|
-
// ctx: AutoBeContext<Model>,
|
|
10
|
-
written: IAutoBeTestWriteResult,
|
|
11
|
-
failure: IAutoBeTypeScriptCompileResult.IFailure,
|
|
12
|
-
): Array<
|
|
13
|
-
IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
14
|
-
> => {
|
|
15
|
-
return [
|
|
16
|
-
{
|
|
17
|
-
id: v7(),
|
|
18
|
-
created_at: new Date().toISOString(),
|
|
19
|
-
type: "systemMessage",
|
|
20
|
-
text: AutoBeSystemPromptConstant.TEST_WRITE,
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
id: v7(),
|
|
24
|
-
created_at: new Date().toISOString(),
|
|
25
|
-
type: "assistantMessage",
|
|
26
|
-
text: [
|
|
27
|
-
"## Original Code",
|
|
28
|
-
"## `AutoBeTest.IFunction` data",
|
|
29
|
-
"```json",
|
|
30
|
-
JSON.stringify(written.file.function),
|
|
31
|
-
"```",
|
|
32
|
-
"## Generated TypeScript Code",
|
|
33
|
-
"```typescript",
|
|
34
|
-
written.file.content,
|
|
35
|
-
"```",
|
|
36
|
-
"",
|
|
37
|
-
"## Compile Errors",
|
|
38
|
-
"Fix the compilation error in the provided code.",
|
|
39
|
-
"",
|
|
40
|
-
"```json",
|
|
41
|
-
JSON.stringify(failure.diagnostics),
|
|
42
|
-
"```",
|
|
43
|
-
].join("\n"),
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
id: v7(),
|
|
47
|
-
created_at: new Date().toISOString(),
|
|
48
|
-
type: "systemMessage",
|
|
49
|
-
text: AutoBeSystemPromptConstant.TEST_CORRECT,
|
|
50
|
-
},
|
|
51
|
-
];
|
|
52
|
-
};
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { IAutoBeTypeScriptCompileResult } from "@autobe/interface";
|
|
3
|
+
import { v7 } from "uuid";
|
|
4
|
+
|
|
5
|
+
import { AutoBeSystemPromptConstant } from "../../constants/AutoBeSystemPromptConstant";
|
|
6
|
+
import { IAutoBeTestWriteResult } from "./structures/IAutoBeTestWriteResult";
|
|
7
|
+
|
|
8
|
+
export const transformTestCorrectHistories = (
|
|
9
|
+
// ctx: AutoBeContext<Model>,
|
|
10
|
+
written: IAutoBeTestWriteResult,
|
|
11
|
+
failure: IAutoBeTypeScriptCompileResult.IFailure,
|
|
12
|
+
): Array<
|
|
13
|
+
IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
14
|
+
> => {
|
|
15
|
+
return [
|
|
16
|
+
{
|
|
17
|
+
id: v7(),
|
|
18
|
+
created_at: new Date().toISOString(),
|
|
19
|
+
type: "systemMessage",
|
|
20
|
+
text: AutoBeSystemPromptConstant.TEST_WRITE,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: v7(),
|
|
24
|
+
created_at: new Date().toISOString(),
|
|
25
|
+
type: "assistantMessage",
|
|
26
|
+
text: [
|
|
27
|
+
"## Original Code",
|
|
28
|
+
"## `AutoBeTest.IFunction` data",
|
|
29
|
+
"```json",
|
|
30
|
+
JSON.stringify(written.file.function),
|
|
31
|
+
"```",
|
|
32
|
+
"## Generated TypeScript Code",
|
|
33
|
+
"```typescript",
|
|
34
|
+
written.file.content,
|
|
35
|
+
"```",
|
|
36
|
+
"",
|
|
37
|
+
"## Compile Errors",
|
|
38
|
+
"Fix the compilation error in the provided code.",
|
|
39
|
+
"",
|
|
40
|
+
"```json",
|
|
41
|
+
JSON.stringify(failure.diagnostics),
|
|
42
|
+
"```",
|
|
43
|
+
].join("\n"),
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: v7(),
|
|
47
|
+
created_at: new Date().toISOString(),
|
|
48
|
+
type: "systemMessage",
|
|
49
|
+
text: AutoBeSystemPromptConstant.TEST_CORRECT,
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
};
|
|
@@ -1,113 +1,127 @@
|
|
|
1
|
-
import OpenAI from "openai";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Interface representing AI vendor configuration for the AutoBeAgent.
|
|
5
|
-
*
|
|
6
|
-
* Defines the connection parameters and settings required to integrate with AI
|
|
7
|
-
* service providers that power the vibe coding pipeline. While utilizing the
|
|
8
|
-
* OpenAI SDK as the connection interface, this configuration supports various
|
|
9
|
-
* LLM vendors beyond OpenAI through flexible endpoint and authentication
|
|
10
|
-
* configuration, enabling integration with Claude, DeepSeek, Meta Llama, and
|
|
11
|
-
* other providers that follow OpenAI-compatible API patterns.
|
|
12
|
-
*
|
|
13
|
-
* The vendor configuration determines the AI capabilities available throughout
|
|
14
|
-
* the entire automated development workflow, from requirements analysis and
|
|
15
|
-
* database design through API specification, testing, and final implementation.
|
|
16
|
-
* Different vendors may offer varying performance characteristics, cost
|
|
17
|
-
* structures, and feature support that can be optimized for specific vibe
|
|
18
|
-
* coding needs.
|
|
19
|
-
*
|
|
20
|
-
* Concurrent request management is built-in to prevent API rate limiting and
|
|
21
|
-
* optimize resource utilization across multiple development phases and parallel
|
|
22
|
-
* operations within the vibe coding pipeline.
|
|
23
|
-
*
|
|
24
|
-
* @author Samchon
|
|
25
|
-
*/
|
|
26
|
-
export interface IAutoBeVendor {
|
|
27
|
-
/**
|
|
28
|
-
* OpenAI SDK instance configured for the target AI vendor.
|
|
29
|
-
*
|
|
30
|
-
* Provides the API connection interface used by the AutoBeAgent to
|
|
31
|
-
* communicate with AI services. While this uses the OpenAI SDK, it can be
|
|
32
|
-
* configured to connect with various LLM providers by setting the appropriate
|
|
33
|
-
* `baseURL` and authentication credentials. The SDK serves as a universal
|
|
34
|
-
* connector that abstracts the underlying API communication protocols.
|
|
35
|
-
*
|
|
36
|
-
* For non-OpenAI vendors, configure the SDK with the vendor's API endpoint
|
|
37
|
-
* and authentication requirements to enable seamless integration with the
|
|
38
|
-
* vibe coding system.
|
|
39
|
-
*/
|
|
40
|
-
api: OpenAI;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Specific model identifier to use for AI operations.
|
|
44
|
-
*
|
|
45
|
-
* Specifies the exact model name or identifier that should be used for vibe
|
|
46
|
-
* coding tasks. Supports both official OpenAI chat models and custom model
|
|
47
|
-
* identifiers for third-party hosting services, cloud providers, or
|
|
48
|
-
* alternative LLM vendors. The model choice significantly impacts the
|
|
49
|
-
* quality, performance, and cost of the automated development process.
|
|
50
|
-
*
|
|
51
|
-
* Examples include "gpt-4", "gpt-3.5-turbo" for OpenAI, or vendor-specific
|
|
52
|
-
* identifiers like "claude-3-sonnet", "deepseek-chat-v3", "llama3.3-70b" when
|
|
53
|
-
* using alternative providers through compatible APIs.
|
|
54
|
-
*/
|
|
55
|
-
model: OpenAI.ChatModel | ({} & string);
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Optional
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
1
|
+
import OpenAI from "openai";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Interface representing AI vendor configuration for the AutoBeAgent.
|
|
5
|
+
*
|
|
6
|
+
* Defines the connection parameters and settings required to integrate with AI
|
|
7
|
+
* service providers that power the vibe coding pipeline. While utilizing the
|
|
8
|
+
* OpenAI SDK as the connection interface, this configuration supports various
|
|
9
|
+
* LLM vendors beyond OpenAI through flexible endpoint and authentication
|
|
10
|
+
* configuration, enabling integration with Claude, DeepSeek, Meta Llama, and
|
|
11
|
+
* other providers that follow OpenAI-compatible API patterns.
|
|
12
|
+
*
|
|
13
|
+
* The vendor configuration determines the AI capabilities available throughout
|
|
14
|
+
* the entire automated development workflow, from requirements analysis and
|
|
15
|
+
* database design through API specification, testing, and final implementation.
|
|
16
|
+
* Different vendors may offer varying performance characteristics, cost
|
|
17
|
+
* structures, and feature support that can be optimized for specific vibe
|
|
18
|
+
* coding needs.
|
|
19
|
+
*
|
|
20
|
+
* Concurrent request management is built-in to prevent API rate limiting and
|
|
21
|
+
* optimize resource utilization across multiple development phases and parallel
|
|
22
|
+
* operations within the vibe coding pipeline.
|
|
23
|
+
*
|
|
24
|
+
* @author Samchon
|
|
25
|
+
*/
|
|
26
|
+
export interface IAutoBeVendor {
|
|
27
|
+
/**
|
|
28
|
+
* OpenAI SDK instance configured for the target AI vendor.
|
|
29
|
+
*
|
|
30
|
+
* Provides the API connection interface used by the AutoBeAgent to
|
|
31
|
+
* communicate with AI services. While this uses the OpenAI SDK, it can be
|
|
32
|
+
* configured to connect with various LLM providers by setting the appropriate
|
|
33
|
+
* `baseURL` and authentication credentials. The SDK serves as a universal
|
|
34
|
+
* connector that abstracts the underlying API communication protocols.
|
|
35
|
+
*
|
|
36
|
+
* For non-OpenAI vendors, configure the SDK with the vendor's API endpoint
|
|
37
|
+
* and authentication requirements to enable seamless integration with the
|
|
38
|
+
* vibe coding system.
|
|
39
|
+
*/
|
|
40
|
+
api: OpenAI;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Specific model identifier to use for AI operations.
|
|
44
|
+
*
|
|
45
|
+
* Specifies the exact model name or identifier that should be used for vibe
|
|
46
|
+
* coding tasks. Supports both official OpenAI chat models and custom model
|
|
47
|
+
* identifiers for third-party hosting services, cloud providers, or
|
|
48
|
+
* alternative LLM vendors. The model choice significantly impacts the
|
|
49
|
+
* quality, performance, and cost of the automated development process.
|
|
50
|
+
*
|
|
51
|
+
* Examples include "gpt-4", "gpt-3.5-turbo" for OpenAI, or vendor-specific
|
|
52
|
+
* identifiers like "claude-3-sonnet", "deepseek-chat-v3", "llama3.3-70b" when
|
|
53
|
+
* using alternative providers through compatible APIs.
|
|
54
|
+
*/
|
|
55
|
+
model: OpenAI.ChatModel | ({} & string);
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Optional human-readable label for this vendor/model configuration.
|
|
59
|
+
*
|
|
60
|
+
* This is a display or grouping name that is distinct from the underlying
|
|
61
|
+
* `model` identifier, and is intended for use in logs, UIs, selection menus,
|
|
62
|
+
* or archive views where a more descriptive name is helpful (for example,
|
|
63
|
+
* "Primary GPT-4", "Fast Drafting Model", or "Internal Llama Cluster").
|
|
64
|
+
*
|
|
65
|
+
* When omitted, callers should fall back to displaying or logging the `model`
|
|
66
|
+
* value itself, or another sensible default derived from the model
|
|
67
|
+
* identifier.
|
|
68
|
+
*/
|
|
69
|
+
label?: string | undefined;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Optional request configuration for API calls.
|
|
73
|
+
*
|
|
74
|
+
* Additional request options that will be applied to all API calls made
|
|
75
|
+
* through the OpenAI SDK. This can include custom headers, timeouts, retry
|
|
76
|
+
* policies, or other HTTP client configuration that may be required for
|
|
77
|
+
* specific vendor integrations or enterprise environments.
|
|
78
|
+
*
|
|
79
|
+
* These options provide fine-grained control over the API communication
|
|
80
|
+
* behavior and can be used to optimize performance or meet specific
|
|
81
|
+
* infrastructure requirements.
|
|
82
|
+
*/
|
|
83
|
+
options?: OpenAI.RequestOptions | undefined;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Maximum number of concurrent API requests allowed.
|
|
87
|
+
*
|
|
88
|
+
* Controls the concurrency level for AI API calls to prevent rate limiting,
|
|
89
|
+
* manage resource consumption, and optimize system performance. The vibe
|
|
90
|
+
* coding pipeline may make multiple parallel requests during development
|
|
91
|
+
* phases, and this setting ensures controlled resource utilization.
|
|
92
|
+
*
|
|
93
|
+
* A reasonable default provides balanced performance while respecting typical
|
|
94
|
+
* API rate limits. Lower values reduce resource consumption but may slow
|
|
95
|
+
* development progress, while higher values can improve performance but risk
|
|
96
|
+
* hitting rate limits or overwhelming the AI service.
|
|
97
|
+
*
|
|
98
|
+
* Set to undefined to disable concurrency limiting, allowing unlimited
|
|
99
|
+
* parallel requests (use with caution based on your API limits and
|
|
100
|
+
* infrastructure capacity).
|
|
101
|
+
*
|
|
102
|
+
* @default 16
|
|
103
|
+
*/
|
|
104
|
+
semaphore?: number | undefined;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Indicates whether this vendor/model supports explicit tool choice control.
|
|
108
|
+
*
|
|
109
|
+
* When set to `true`, the agent may pass the `tool_choice` parameter with a
|
|
110
|
+
* value of `"required"` (or other explicit values) for models that implement
|
|
111
|
+
* OpenAI-style tool calling. This allows the agent to force the model to call
|
|
112
|
+
* one of the provided tools when appropriate.
|
|
113
|
+
*
|
|
114
|
+
* When set to `false`, the agent will avoid sending `tool_choice` in a way
|
|
115
|
+
* that forces tool invocation, and will instead rely on the model's default
|
|
116
|
+
* behavior or omit tool-choice configuration entirely. This should be used
|
|
117
|
+
* for vendors or models that do not understand, partially implement, or are
|
|
118
|
+
* unstable with the `tool_choice` parameter.
|
|
119
|
+
*
|
|
120
|
+
* This flag is necessary so that a single agent implementation can work
|
|
121
|
+
* across multiple vendors and models with differing levels of tool-calling
|
|
122
|
+
* support, without causing API errors or unexpected behavior.
|
|
123
|
+
*
|
|
124
|
+
* @default true
|
|
125
|
+
*/
|
|
126
|
+
useToolChoice?: boolean;
|
|
127
|
+
}
|