@opencode-ai/ai 0.0.0-dev-18105 → 0.0.0-dev-18106
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.
|
@@ -478,6 +478,7 @@ export declare const lowerToolChoice: (protocolName: string, toolChoice: NonNull
|
|
|
478
478
|
type: "function";
|
|
479
479
|
name: string;
|
|
480
480
|
}, AIError, never>;
|
|
481
|
+
export declare const resolveParallelToolCalls: (request: LLMRequest) => boolean | undefined;
|
|
481
482
|
export declare const fromRequestWithExtension: (request: LLMRequest, extension: Extension) => Effect.Effect<{
|
|
482
483
|
truncation?: "auto" | "disabled" | undefined;
|
|
483
484
|
parallel_tool_calls?: boolean | undefined;
|
|
@@ -471,6 +471,7 @@ const lowerMessages = Effect.fn("OpenResponses.lowerMessages")(function* (reques
|
|
|
471
471
|
const lowerOptions = (request) => {
|
|
472
472
|
const options = OpenResponsesOptions.resolve(request);
|
|
473
473
|
const cacheKey = ProviderShared.clampPromptCacheKey(request.promptCacheKey);
|
|
474
|
+
const parallelToolCalls = resolveParallelToolCalls(request);
|
|
474
475
|
return {
|
|
475
476
|
...(options.instructions ? { instructions: options.instructions } : {}),
|
|
476
477
|
...(options.store !== undefined ? { store: options.store } : {}),
|
|
@@ -488,10 +489,17 @@ const lowerOptions = (request) => {
|
|
|
488
489
|
...(options.textVerbosity ? { text: { verbosity: options.textVerbosity } } : {}),
|
|
489
490
|
...(options.serviceTier ? { service_tier: options.serviceTier } : {}),
|
|
490
491
|
...(options.maxToolCalls !== undefined ? { max_tool_calls: options.maxToolCalls } : {}),
|
|
491
|
-
...(
|
|
492
|
+
...(parallelToolCalls !== undefined ? { parallel_tool_calls: parallelToolCalls } : {}),
|
|
492
493
|
...(options.truncation ? { truncation: options.truncation } : {}),
|
|
493
494
|
};
|
|
494
495
|
};
|
|
496
|
+
export const resolveParallelToolCalls = (request) => {
|
|
497
|
+
const configured = OpenResponsesOptions.resolve(request).parallelToolCalls;
|
|
498
|
+
if (configured !== undefined)
|
|
499
|
+
return configured;
|
|
500
|
+
const disabled = request.toolChoice?.disableParallelToolUse;
|
|
501
|
+
return disabled === undefined ? undefined : !disabled;
|
|
502
|
+
};
|
|
495
503
|
const allowedToolChoice = (request) => {
|
|
496
504
|
const allowed = OpenResponsesOptions.resolve(request).allowedTools;
|
|
497
505
|
if (!allowed)
|
|
@@ -93,8 +93,10 @@ const lowerToolChoice = (toolChoice, tools) => ProviderShared.matchToolChoice(NA
|
|
|
93
93
|
const fromRequest = Effect.fn("OpenAIResponses.fromRequest")(function* (request) {
|
|
94
94
|
const body = yield* OpenResponses.fromRequestWithExtension(LLMRequest.update(request, { tools: [], toolChoice: undefined }), extension);
|
|
95
95
|
const toolSchemaCompatibility = request.model.compatibility?.toolSchema;
|
|
96
|
+
const parallelToolCalls = OpenResponses.resolveParallelToolCalls(request);
|
|
96
97
|
return {
|
|
97
98
|
...body,
|
|
99
|
+
...(parallelToolCalls === undefined ? {} : { parallel_tool_calls: parallelToolCalls }),
|
|
98
100
|
tools: request.tools.length === 0
|
|
99
101
|
? undefined
|
|
100
102
|
: yield* Effect.forEach(request.tools, (tool) => lowerTool(tool, ToolSchemaProjection.modelCompatibility(tool.inputSchema, toolSchemaCompatibility))),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-18106",
|
|
4
4
|
"name": "@opencode-ai/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
32
32
|
"@effect/platform-node": "4.0.0-rc.111",
|
|
33
|
-
"@opencode-ai/http-recorder": "0.0.0-dev-
|
|
33
|
+
"@opencode-ai/http-recorder": "0.0.0-dev-18106",
|
|
34
34
|
"@tsconfig/bun": "1.0.9",
|
|
35
35
|
"@types/bun": "1.3.13",
|
|
36
36
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@smithy/eventstream-codec": "4.2.14",
|
|
41
41
|
"@smithy/util-utf8": "4.2.2",
|
|
42
|
-
"@opencode-ai/schema": "0.0.0-dev-
|
|
42
|
+
"@opencode-ai/schema": "0.0.0-dev-18106",
|
|
43
43
|
"aws4fetch": "1.0.20",
|
|
44
44
|
"effect": "4.0.0-rc.111",
|
|
45
45
|
"google-auth-library": "10.5.0"
|