veryfront 0.1.1271-rc.23355 → 0.1.1271
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/esm/cli/mcp/remote-file-tools.d.ts.map +1 -1
- package/esm/cli/mcp/remote-file-tools.js +12 -10
- package/esm/deno.js +2 -2
- package/esm/extensions/ext-llm-anthropic/src/anthropic-request-builder.d.ts.map +1 -1
- package/esm/extensions/ext-llm-anthropic/src/anthropic-request-builder.js +6 -211
- package/esm/extensions/ext-llm-google/src/google-provider.d.ts.map +1 -1
- package/esm/extensions/ext-llm-google/src/google-provider.js +1 -0
- package/esm/extensions/ext-llm-google/src/google-request-builder.d.ts.map +1 -1
- package/esm/extensions/ext-llm-google/src/google-request-builder.js +78 -8
- package/esm/extensions/ext-llm-openai/src/openai-chat-request-builder.d.ts.map +1 -1
- package/esm/extensions/ext-llm-openai/src/openai-chat-request-builder.js +14 -12
- package/esm/extensions/ext-llm-openai/src/openai-provider-options.d.ts +1 -0
- package/esm/extensions/ext-llm-openai/src/openai-provider-options.d.ts.map +1 -1
- package/esm/extensions/ext-llm-openai/src/openai-provider-options.js +78 -7
- package/esm/extensions/ext-llm-openai/src/openai-provider.d.ts.map +1 -1
- package/esm/extensions/ext-llm-openai/src/openai-provider.js +3 -0
- package/esm/extensions/ext-llm-openai/src/openai-responses-request-builder.d.ts.map +1 -1
- package/esm/extensions/ext-llm-openai/src/openai-responses-request-builder.js +8 -4
- package/esm/src/agent/ag-ui/encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/encoder.js +621 -158
- package/esm/src/agent/ag-ui/native-run-events.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/native-run-events.js +24 -8
- package/esm/src/agent/ag-ui/sse-parser.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/sse-parser.js +9 -1
- package/esm/src/agent/composition/composition.d.ts.map +1 -1
- package/esm/src/agent/composition/composition.js +6 -3
- package/esm/src/agent/composition/local-child-execution.d.ts +17 -3
- package/esm/src/agent/composition/local-child-execution.d.ts.map +1 -1
- package/esm/src/agent/composition/local-child-execution.js +122 -13
- package/esm/src/agent/conversation/durable.d.ts.map +1 -1
- package/esm/src/agent/conversation/durable.js +42 -58
- package/esm/src/agent/conversation/private-run-event.d.ts +1 -1
- package/esm/src/agent/conversation/private-run-event.d.ts.map +1 -1
- package/esm/src/agent/conversation/private-run-event.js +71 -28
- package/esm/src/agent/conversation/run-event-limits.d.ts +6 -0
- package/esm/src/agent/conversation/run-event-limits.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-event-limits.js +34 -3
- package/esm/src/agent/conversation/run-event-normalization.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-event-normalization.js +125 -41
- package/esm/src/agent/hosted/durable-run-event-sink.d.ts.map +1 -1
- package/esm/src/agent/hosted/durable-run-event-sink.js +158 -52
- package/esm/src/agent/hosted/executor-model-dispatch.d.ts.map +1 -1
- package/esm/src/agent/hosted/executor-model-dispatch.js +110 -29
- package/esm/src/agent/hosted/managed-broker-persistence.d.ts +4 -0
- package/esm/src/agent/hosted/managed-broker-persistence.d.ts.map +1 -1
- package/esm/src/agent/hosted/managed-broker-persistence.js +9 -1
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +797 -363
- package/esm/src/agent/runtime/project-run-inference-credential.js +4 -4
- package/esm/src/agent/streaming/data-stream.d.ts.map +1 -1
- package/esm/src/agent/streaming/data-stream.js +10 -11
- package/esm/src/agent/streaming/lifecycle/runtime-provider-adapter.d.ts.map +1 -1
- package/esm/src/agent/streaming/lifecycle/runtime-provider-adapter.js +7 -1
- package/esm/src/cache/backends/api.d.ts.map +1 -1
- package/esm/src/cache/backends/api.js +3 -9
- package/esm/src/config/host-api-base.d.ts +3 -1
- package/esm/src/config/host-api-base.d.ts.map +1 -1
- package/esm/src/config/host-api-base.js +44 -3
- package/esm/src/eval/runner.d.ts.map +1 -1
- package/esm/src/eval/runner.js +5 -4
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
- package/esm/src/integrations/integration-transport.d.ts.map +1 -1
- package/esm/src/integrations/integration-transport.js +4 -7
- package/esm/src/internal-agents/provider-replay-checkpoint-persister.d.ts.map +1 -1
- package/esm/src/internal-agents/provider-replay-checkpoint-persister.js +4 -2
- package/esm/src/platform/adapters/fs/veryfront/adapter.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/adapter.js +7 -4
- package/esm/src/platform/adapters/veryfront-api-transport.d.ts.map +1 -1
- package/esm/src/platform/adapters/veryfront-api-transport.js +4 -2
- package/esm/src/platform/compat/abort-signal.d.ts +2 -0
- package/esm/src/platform/compat/abort-signal.d.ts.map +1 -1
- package/esm/src/platform/compat/abort-signal.js +5 -0
- package/esm/src/platform/compat/http/pinned-fetch.d.ts +1 -1
- package/esm/src/platform/compat/http/pinned-fetch.d.ts.map +1 -1
- package/esm/src/platform/compat/native-brand-checks.d.ts.map +1 -1
- package/esm/src/platform/compat/native-brand-checks.js +38 -8
- package/esm/src/platform/compat/primordials/array.d.ts +4 -0
- package/esm/src/platform/compat/primordials/array.d.ts.map +1 -1
- package/esm/src/platform/compat/primordials/array.js +36 -0
- package/esm/src/provider/shared/anthropic-output-schema.d.ts +23 -0
- package/esm/src/provider/shared/anthropic-output-schema.d.ts.map +1 -0
- package/esm/src/provider/shared/anthropic-output-schema.js +262 -0
- package/esm/src/provider/shared/index.d.ts +1 -0
- package/esm/src/provider/shared/index.d.ts.map +1 -1
- package/esm/src/provider/shared/index.js +2 -0
- package/esm/src/provider/shared/openai-reasoning.d.ts.map +1 -1
- package/esm/src/provider/shared/openai-reasoning.js +21 -11
- package/esm/src/provider/types.d.ts +2 -0
- package/esm/src/provider/types.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/context.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/context.js +29 -12
- package/esm/src/provider/veryfront-cloud/model-catalog.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/model-catalog.js +2 -1
- package/esm/src/provider/veryfront-cloud/provider.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/provider.js +7 -8
- package/esm/src/runtime/model-call-context-request.d.ts +5 -2
- package/esm/src/runtime/model-call-context-request.d.ts.map +1 -1
- package/esm/src/runtime/model-call-context-request.js +1174 -46
- package/esm/src/runtime/model-call-context.d.ts +22 -1
- package/esm/src/runtime/model-call-context.d.ts.map +1 -1
- package/esm/src/runtime/model-call-context.js +22 -10
- package/esm/src/runtime/run-event-sink-context.d.ts.map +1 -1
- package/esm/src/runtime/run-event-sink-context.js +18 -9
- package/esm/src/runtime/runtime-bridge.d.ts +1 -0
- package/esm/src/runtime/runtime-bridge.d.ts.map +1 -1
- package/esm/src/runtime/runtime-bridge.js +273 -47
- package/esm/src/sandbox/config.js +2 -2
- package/esm/src/sandbox/lazy-sandbox.d.ts +6 -0
- package/esm/src/sandbox/lazy-sandbox.d.ts.map +1 -1
- package/esm/src/sandbox/lazy-sandbox.js +57 -10
- package/esm/src/security/http/outbound-fetch.d.ts.map +1 -1
- package/esm/src/security/http/outbound-fetch.js +3 -1
- package/esm/src/security/private-async-context.d.ts +4 -0
- package/esm/src/security/private-async-context.d.ts.map +1 -0
- package/esm/src/security/private-async-context.js +19 -0
- package/esm/src/security/private-json.d.ts +4 -1
- package/esm/src/security/private-json.d.ts.map +1 -1
- package/esm/src/security/private-json.js +29 -4
- package/esm/src/security/private-promise.d.ts.map +1 -1
- package/esm/src/security/private-promise.js +4 -0
- package/esm/src/security/private-text.d.ts +1 -0
- package/esm/src/security/private-text.d.ts.map +1 -1
- package/esm/src/security/private-text.js +4 -0
- package/esm/src/security/sandbox/worker-egress-guard.d.ts.map +1 -1
- package/esm/src/security/sandbox/worker-egress-guard.js +6 -5
- package/esm/src/server/handlers/request/project-run-execute.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/project-run-execute.handler.js +590 -49
- package/esm/src/server/handlers/request/project-run-parent.d.ts.map +1 -1
- package/esm/src/server/handlers/request/project-run-parent.js +4 -2
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.js +2 -2
- package/esm/src/transforms/esm/npm-registry-client.d.ts.map +1 -1
- package/esm/src/transforms/esm/npm-registry-client.js +4 -6
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.d.ts.map +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-file-tools.d.ts","sourceRoot":"","sources":["../../../src/cli/mcp/remote-file-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"remote-file-tools.d.ts","sourceRoot":"","sources":["../../../src/cli/mcp/remote-file-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAqM1C,UAAU,YAAY;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnD;AAOD,UAAU,MAAM;IACd,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,I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
|
|
|
10
10
|
*/
|
|
11
11
|
import { defineSchema, lazySchema } from "../../src/schemas/index.js";
|
|
12
12
|
import { getEnvironmentConfig } from "../../src/config/index.js";
|
|
13
|
-
import { guardedExactHttpLoopbackOutboundFetch, guardedOutboundFetch } from "../../src/security/http/outbound-fetch.js";
|
|
13
|
+
import { createVeryfrontApiOriginBoundOutboundFetch, guardedExactHttpLoopbackOutboundFetch, guardedOutboundFetch, } from "../../src/security/http/outbound-fetch.js";
|
|
14
14
|
import { cwd } from "../../src/platform/index.js";
|
|
15
15
|
import { join } from "../../src/platform/compat/path/index.js";
|
|
16
16
|
import { withSpan } from "../../src/observability/tracing/otlp-setup.js";
|
|
@@ -19,7 +19,7 @@ import { DEFAULT_LOCAL_API_URL, resolveRestApiBaseUrl, trimTrailingSlashes, } fr
|
|
|
19
19
|
import { readConfigJsonFile, resolveApiCredentialCandidatesForAuth, resolveApiUrlTrust, } from "../shared/config.js";
|
|
20
20
|
import { getEnvSource } from "../../src/utils/env-loader.js";
|
|
21
21
|
import { getHostSecret } from "../../src/platform/compat/process/env.js";
|
|
22
|
-
import { requireHostPrivateApiHttps, resolveHostOwnedApiBaseUrl } from "../../src/config/host-api-base.js";
|
|
22
|
+
import { isHostHttpApiOrigin, requireHostPrivateApiHttps, resolveHostOwnedApiBaseUrl, } from "../../src/config/host-api-base.js";
|
|
23
23
|
import { buildProjectApiPath, buildProjectFilePath, getBranchParam, slugToName, } from "./remote-file-tool-helpers.js";
|
|
24
24
|
const NativeURL = URL;
|
|
25
25
|
const applyIntrinsic = Reflect.apply;
|
|
@@ -41,10 +41,11 @@ function validatedEndpoint(candidateApiBaseUrl) {
|
|
|
41
41
|
const protocol = readUrl(endpoint, urlProtocolGetter);
|
|
42
42
|
const loopback = hostname === "localhost" || hostname === "127.0.0.1" ||
|
|
43
43
|
hostname === "[::1]" || hostname === "::1";
|
|
44
|
-
if (protocol !== "https:" && !(protocol === "http:" && loopback)
|
|
44
|
+
if (protocol !== "https:" && !(protocol === "http:" && loopback) &&
|
|
45
|
+
!isHostHttpApiOrigin(readUrl(endpoint, urlHrefGetter))) {
|
|
45
46
|
return {
|
|
46
47
|
ok: false,
|
|
47
|
-
error: "The API endpoint must use HTTPS. HTTP
|
|
48
|
+
error: "The API endpoint must use HTTPS. HTTP requires a loopback endpoint or an operator-configured API origin.",
|
|
48
49
|
status: 400,
|
|
49
50
|
};
|
|
50
51
|
}
|
|
@@ -61,12 +62,13 @@ async function sendApiRequest(endpoint, method, path, token, body) {
|
|
|
61
62
|
// the global, and a direct call would hand its replacement the
|
|
62
63
|
// `Authorization` header to read.
|
|
63
64
|
//
|
|
64
|
-
//
|
|
65
|
-
// explicit
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
// Boot-configured HTTP APIs use the exact origin-bound exception.
|
|
66
|
+
// Preserve the explicit-token loopback route for other local endpoints.
|
|
67
|
+
const fetchEndpoint = isHostHttpApiOrigin(endpointHref)
|
|
68
|
+
? createVeryfrontApiOriginBoundOutboundFetch(endpointHref)
|
|
69
|
+
: readUrl(endpoint, urlProtocolGetter) === "http:"
|
|
70
|
+
? guardedExactHttpLoopbackOutboundFetch
|
|
71
|
+
: guardedOutboundFetch;
|
|
70
72
|
const response = await fetchEndpoint(url, {
|
|
71
73
|
method,
|
|
72
74
|
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
|
package/esm/deno.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.1271
|
|
3
|
+
"version": "0.1.1271",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"nodeModulesDir": "auto",
|
|
6
6
|
"minimumDependencyAge": {
|
|
@@ -585,7 +585,7 @@ export default {
|
|
|
585
585
|
"lint:core-deps": "deno run --allow-read scripts/lint/audit-core-deps.ts",
|
|
586
586
|
"lint:cross-runtime-jsr": "deno run --allow-read scripts/lint/audit-cross-runtime-jsr.ts",
|
|
587
587
|
"lint:dependency-boundaries": "deno run --allow-read scripts/lint/audit-dependency-boundaries.ts",
|
|
588
|
-
"lint:module-boundaries": "
|
|
588
|
+
"lint:module-boundaries": "deno run --frozen --allow-read scripts/lint/check-module-boundaries.ts",
|
|
589
589
|
"lint:extension-contracts": "deno run --config=scripts/test.deno.json --frozen --allow-read scripts/lint/audit-extension-contracts.ts",
|
|
590
590
|
"lint:extension-capabilities": "deno run --config=scripts/test.deno.json --frozen --allow-read scripts/lint/audit-extension-capabilities.ts",
|
|
591
591
|
"lint:ban-console": "deno run --allow-read scripts/lint/ban-console.ts",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anthropic-request-builder.d.ts","sourceRoot":"","sources":["../../../../src/extensions/ext-llm-anthropic/src/anthropic-request-builder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"anthropic-request-builder.d.ts","sourceRoot":"","sources":["../../../../src/extensions/ext-llm-anthropic/src/anthropic-request-builder.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,uBAAuB,EAEvB,0BAA0B,EAE3B,MAAM,uCAAuC,CAAC;AAO/C,OAAO,EACL,KAAK,iCAAiC,EAUvC,MAAM,+BAA+B,CAAC;AAEvC,KAAK,gBAAgB,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC;AA6E9C,KAAK,0BAA0B,GAAG;IAChC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAEF,MAAM,WAAW,+BAAgC,SAAQ,uBAAuB;IAC9E,YAAY,CAAC,EAAE,0BAA0B,CAAC;IAC1C,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,UAAU,CAAC,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;CACjD;AAED,gGAAgG;AAChG,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,CAAC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;CACxB,CAAC;AA+vEF,wBAAgB,iDAAiD,CAC/D,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,+BAA+B,EACxC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,gBAAgB,GACzB;IACD,IAAI,EAAE,0BAA0B,CAAC;IACjC,qBAAqB,EAAE,iCAAiC,CAAC;CAC1D,CA4KA;AAED,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,+BAA+B,EACxC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,gBAAgB,GACzB,0BAA0B,CAQ5B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { canIdentifyProxyWithoutHooks, isProxyWithoutHooks, jsonValuesEqual, readProviderOptions, readRecord, snapshotProviderJsonValue, stringifyToolResultValue, unwrapToolInputSchema, } from "../../../src/provider/shared/index.js";
|
|
1
|
+
import { canIdentifyProxyWithoutHooks, closeSchemaForOutputConfig, isProxyWithoutHooks, jsonValuesEqual, readProviderOptions, readRecord, snapshotProviderJsonValue, stringifyToolResultValue, unwrapToolInputSchema, } from "../../../src/provider/shared/index.js";
|
|
2
2
|
import { assertAnthropicMcpRequestContract, normalizeAnthropicMcpServers, normalizeAnthropicMcpToolsetArgs, } from "./anthropic-mcp-request.js";
|
|
3
3
|
import { isAnthropicProviderToolResultBlockType, MAX_ANTHROPIC_RAW_ASSISTANT_BLOCKS, MAX_ANTHROPIC_REPLAY_ASSISTANT_MESSAGES, parseAnthropicProviderToolUse, parseAnthropicServerToolResult, snapshotAnthropicRawAssistantMetadata, validateAnthropicRawAssistantMessages, } from "./anthropic-native-content.js";
|
|
4
4
|
const apply = Reflect.apply;
|
|
@@ -6,6 +6,8 @@ const NativeArray = Array;
|
|
|
6
6
|
const ArrayIsArray = Array.isArray;
|
|
7
7
|
const booleanValueOf = Boolean.prototype.valueOf;
|
|
8
8
|
const NativeSet = Set;
|
|
9
|
+
const mathMin = Math.min;
|
|
10
|
+
const numberIsSafeInteger = Number.isSafeInteger;
|
|
9
11
|
const numberValueOf = Number.prototype.valueOf;
|
|
10
12
|
const objectAssign = Object.assign;
|
|
11
13
|
const objectDefineProperty = Object.defineProperty;
|
|
@@ -1739,213 +1741,6 @@ function buildAnthropicOutputConfig(responseFormat, warnings) {
|
|
|
1739
1741
|
},
|
|
1740
1742
|
};
|
|
1741
1743
|
}
|
|
1742
|
-
/**
|
|
1743
|
-
* JSON Schema keywords whose value is itself a schema, a list of schemas, or a
|
|
1744
|
-
* map of schemas. Recursion is restricted to these so that keywords holding
|
|
1745
|
-
* literal values -- `default`, `const`, `enum`, `examples` -- are copied
|
|
1746
|
-
* through untouched instead of being rewritten when they happen to look like a
|
|
1747
|
-
* schema.
|
|
1748
|
-
*/
|
|
1749
|
-
const SCHEMA_MAP_KEYWORDS = new Set([
|
|
1750
|
-
"properties",
|
|
1751
|
-
"patternProperties",
|
|
1752
|
-
"$defs",
|
|
1753
|
-
"definitions",
|
|
1754
|
-
"dependentSchemas",
|
|
1755
|
-
// Draft-07 `dependencies` holds either a schema or an array of property
|
|
1756
|
-
// names per key. The array form contains strings, which the walk returns
|
|
1757
|
-
// unchanged, so both spellings can share this branch.
|
|
1758
|
-
"dependencies",
|
|
1759
|
-
]);
|
|
1760
|
-
const SCHEMA_LIST_KEYWORDS = new Set(["anyOf", "oneOf", "prefixItems"]);
|
|
1761
|
-
/**
|
|
1762
|
-
* `allOf` branches describe one instance together, not alternatives, and
|
|
1763
|
-
* `additionalProperties` only ever sees the `properties` of the schema object
|
|
1764
|
-
* carrying it. Closing branches that each declare part of the object therefore
|
|
1765
|
-
* makes every one of them reject the others' properties, and the composition
|
|
1766
|
-
* accepts nothing at all:
|
|
1767
|
-
*
|
|
1768
|
-
* allOf: [ { properties: { a }, additionalProperties: false },
|
|
1769
|
-
* { properties: { b }, additionalProperties: false } ]
|
|
1770
|
-
*
|
|
1771
|
-
* `{ a, b }` fails the first branch on `b` and the second on `a`.
|
|
1772
|
-
*
|
|
1773
|
-
* So branches are walked for objects nested deeper inside them, but are not
|
|
1774
|
-
* closed themselves. An `allOf` of open objects is still rejected by Anthropic
|
|
1775
|
-
* -- which is the correct outcome, and a legible one, rather than a schema that
|
|
1776
|
-
* validates nothing the model can produce.
|
|
1777
|
-
*/
|
|
1778
|
-
const COMPOSITION_LIST_KEYWORDS = new Set(["allOf"]);
|
|
1779
|
-
const SCHEMA_VALUE_KEYWORDS = new Set([
|
|
1780
|
-
"items",
|
|
1781
|
-
"additionalItems",
|
|
1782
|
-
"contains",
|
|
1783
|
-
"additionalProperties",
|
|
1784
|
-
"propertyNames",
|
|
1785
|
-
"not",
|
|
1786
|
-
"if",
|
|
1787
|
-
"then",
|
|
1788
|
-
"else",
|
|
1789
|
-
"unevaluatedProperties",
|
|
1790
|
-
"unevaluatedItems",
|
|
1791
|
-
"contentSchema",
|
|
1792
|
-
]);
|
|
1793
|
-
/**
|
|
1794
|
-
* Set `additionalProperties: false` on every object-typed subschema that left
|
|
1795
|
-
* it unset.
|
|
1796
|
-
*
|
|
1797
|
-
* Anthropic's `output_config.format` rejects an object schema without it with a
|
|
1798
|
-
* 400 -- "For 'object' type, 'additionalProperties' must be explicitly set to
|
|
1799
|
-
* false" -- unconditionally, and independently of the framework's own `strict`
|
|
1800
|
-
* flag. A plain `v.object({...})` with every field required therefore fails
|
|
1801
|
-
* even though it already satisfies the rest of strict structured output, so the
|
|
1802
|
-
* requirement is satisfied here rather than pushed onto every caller.
|
|
1803
|
-
*
|
|
1804
|
-
* An explicitly declared `additionalProperties` is preserved: rewriting it
|
|
1805
|
-
* would silently narrow a contract the caller deliberately opened, and
|
|
1806
|
-
* Anthropic surfaces its own error for that case. An explicit `undefined`
|
|
1807
|
-
* is not a declaration -- JSON drops it before the provider ever sees it.
|
|
1808
|
-
*
|
|
1809
|
-
* The result is a copy. The schema object belongs to the agent and is reused
|
|
1810
|
-
* across providers and calls, so closing it for Anthropic must not mutate it.
|
|
1811
|
-
*/
|
|
1812
|
-
function closeObjectSchemas(schema, closeSelf = true, pointer = "#", openTargets = EMPTY_POINTER_SET) {
|
|
1813
|
-
if (ArrayIsArray(schema)) {
|
|
1814
|
-
const entries = [];
|
|
1815
|
-
for (let index = 0; index < schema.length; index += 1) {
|
|
1816
|
-
entries[index] = closeObjectSchemas(schema[index], closeSelf, `${pointer}/${index}`, openTargets);
|
|
1817
|
-
}
|
|
1818
|
-
return entries;
|
|
1819
|
-
}
|
|
1820
|
-
if (typeof schema !== "object" || schema === null)
|
|
1821
|
-
return schema;
|
|
1822
|
-
const source = schema;
|
|
1823
|
-
const result = {};
|
|
1824
|
-
for (const key of objectKeys(source)) {
|
|
1825
|
-
const value = source[key];
|
|
1826
|
-
const keyPointer = `${pointer}/${encodePointerToken(key)}`;
|
|
1827
|
-
if (hasSetValue(SCHEMA_MAP_KEYWORDS, key)) {
|
|
1828
|
-
result[key] = closeSchemaMap(value, keyPointer, openTargets);
|
|
1829
|
-
continue;
|
|
1830
|
-
}
|
|
1831
|
-
if (hasSetValue(COMPOSITION_LIST_KEYWORDS, key)) {
|
|
1832
|
-
result[key] = closeObjectSchemas(value, false, keyPointer, openTargets);
|
|
1833
|
-
continue;
|
|
1834
|
-
}
|
|
1835
|
-
if (hasSetValue(SCHEMA_LIST_KEYWORDS, key) || hasSetValue(SCHEMA_VALUE_KEYWORDS, key)) {
|
|
1836
|
-
result[key] = closeObjectSchemas(value, true, keyPointer, openTargets);
|
|
1837
|
-
continue;
|
|
1838
|
-
}
|
|
1839
|
-
result[key] = value;
|
|
1840
|
-
}
|
|
1841
|
-
// `undefined` counts as unset, not as a declaration. The key survives the
|
|
1842
|
-
// walk when a caller writes it explicitly as `undefined`, but JSON drops it
|
|
1843
|
-
// on the way to the provider -- so honoring its presence would emit exactly
|
|
1844
|
-
// the open schema Anthropic rejects.
|
|
1845
|
-
//
|
|
1846
|
-
// A `$ref` holder is skipped: `additionalProperties` only ever sees the
|
|
1847
|
-
// `properties` of the schema object carrying it, and a `$ref` declares none
|
|
1848
|
-
// of its own, so closing it rejects every property the target defines.
|
|
1849
|
-
if (closeSelf && isObjectTyped(source.type) &&
|
|
1850
|
-
source.additionalProperties === undefined &&
|
|
1851
|
-
source.$ref === undefined) {
|
|
1852
|
-
result.additionalProperties = false;
|
|
1853
|
-
}
|
|
1854
|
-
return result;
|
|
1855
|
-
}
|
|
1856
|
-
/**
|
|
1857
|
-
* Walk a keyword whose value maps names to subschemas.
|
|
1858
|
-
*
|
|
1859
|
-
* A definition reached by a `$ref` that sits directly under `allOf` stays open,
|
|
1860
|
-
* for the reason spelled out on `COMPOSITION_LIST_KEYWORDS`: the branches of an
|
|
1861
|
-
* `allOf` describe one instance together, so closing each of them makes every
|
|
1862
|
-
* branch reject the properties the others declare.
|
|
1863
|
-
*/
|
|
1864
|
-
function closeSchemaMap(value, pointer, openTargets) {
|
|
1865
|
-
if (typeof value !== "object" || value === null || ArrayIsArray(value))
|
|
1866
|
-
return value;
|
|
1867
|
-
const source = value;
|
|
1868
|
-
const result = {};
|
|
1869
|
-
for (const name of objectKeys(source)) {
|
|
1870
|
-
const namePointer = `${pointer}/${encodePointerToken(name)}`;
|
|
1871
|
-
result[name] = closeObjectSchemas(source[name], !hasSetValue(openTargets, namePointer), namePointer, openTargets);
|
|
1872
|
-
}
|
|
1873
|
-
return result;
|
|
1874
|
-
}
|
|
1875
|
-
/** Shared empty set, so the common walk allocates nothing extra. */
|
|
1876
|
-
const EMPTY_POINTER_SET = new Set();
|
|
1877
|
-
/** Escape a JSON pointer token, per RFC 6901. */
|
|
1878
|
-
function encodePointerToken(token) {
|
|
1879
|
-
let escaped = "";
|
|
1880
|
-
for (const char of token) {
|
|
1881
|
-
if (char === "~")
|
|
1882
|
-
escaped += "~0";
|
|
1883
|
-
else if (char === "/")
|
|
1884
|
-
escaped += "~1";
|
|
1885
|
-
else
|
|
1886
|
-
escaped += char;
|
|
1887
|
-
}
|
|
1888
|
-
return escaped;
|
|
1889
|
-
}
|
|
1890
|
-
/**
|
|
1891
|
-
* Close every object in a schema bound for `output_config`.
|
|
1892
|
-
*
|
|
1893
|
-
* Runs a pre-pass first, because a `$ref` used as an `allOf` branch carries the
|
|
1894
|
-
* composition's meaning at its target rather than at the branch itself. The
|
|
1895
|
-
* branch object is left open by the walk, but its target lives under `$defs` or
|
|
1896
|
-
* `definitions`, which the walk would otherwise close. Collecting those
|
|
1897
|
-
* pointers up front lets the walk leave exactly those definitions open.
|
|
1898
|
-
*
|
|
1899
|
-
* A definition referenced from an `allOf` branch and used somewhere else too
|
|
1900
|
-
* stays open in both places. Opening is the safe direction: Anthropic rejects
|
|
1901
|
-
* an open object with a named 400, whereas an over-closed `allOf` is accepted
|
|
1902
|
-
* and then matches nothing, which surfaces as an empty generation.
|
|
1903
|
-
*/
|
|
1904
|
-
function closeSchemaForOutputConfig(schema) {
|
|
1905
|
-
const openTargets = new Set();
|
|
1906
|
-
collectAllOfRefTargets(schema, openTargets);
|
|
1907
|
-
return closeObjectSchemas(schema, true, "#", openTargets);
|
|
1908
|
-
}
|
|
1909
|
-
/**
|
|
1910
|
-
* Collect the pointers named by `$ref` branches sitting directly under an
|
|
1911
|
-
* `allOf`, anywhere in the schema. Only local pointers are collected, since a
|
|
1912
|
-
* remote `$ref` names nothing this walk can open.
|
|
1913
|
-
*/
|
|
1914
|
-
function collectAllOfRefTargets(schema, out) {
|
|
1915
|
-
if (ArrayIsArray(schema)) {
|
|
1916
|
-
for (const entry of schema)
|
|
1917
|
-
collectAllOfRefTargets(entry, out);
|
|
1918
|
-
return;
|
|
1919
|
-
}
|
|
1920
|
-
if (typeof schema !== "object" || schema === null)
|
|
1921
|
-
return;
|
|
1922
|
-
const source = schema;
|
|
1923
|
-
for (const key of objectKeys(source)) {
|
|
1924
|
-
const value = source[key];
|
|
1925
|
-
if (hasSetValue(COMPOSITION_LIST_KEYWORDS, key)) {
|
|
1926
|
-
const branches = ArrayIsArray(value) ? value : [value];
|
|
1927
|
-
for (const branch of branches) {
|
|
1928
|
-
if (typeof branch !== "object" || branch === null)
|
|
1929
|
-
continue;
|
|
1930
|
-
const ref = branch.$ref;
|
|
1931
|
-
if (typeof ref === "string" && ref.startsWith("#/"))
|
|
1932
|
-
out.add(ref);
|
|
1933
|
-
}
|
|
1934
|
-
}
|
|
1935
|
-
collectAllOfRefTargets(value, out);
|
|
1936
|
-
}
|
|
1937
|
-
}
|
|
1938
|
-
/**
|
|
1939
|
-
* Whether a schema declares the object type.
|
|
1940
|
-
*
|
|
1941
|
-
* `JsonSchema.type` accepts an array as well as a single name, and the array
|
|
1942
|
-
* form is how a nullable object is written by hand:
|
|
1943
|
-
* `{ type: ["object", "null"], properties: {...} }`. Matching only the exact
|
|
1944
|
-
* string would leave that branch open and let Anthropic reject it.
|
|
1945
|
-
*/
|
|
1946
|
-
function isObjectTyped(type) {
|
|
1947
|
-
return type === "object" || (Array.isArray(type) && type.includes("object"));
|
|
1948
|
-
}
|
|
1949
1744
|
function resolveAnthropicMaxTokens(modelId, callerMaxOutputTokens) {
|
|
1950
1745
|
const { maxOutputTokens: modelMax, isKnownModel } = getAnthropicModelCapabilities(modelId);
|
|
1951
1746
|
const requested = callerMaxOutputTokens ?? modelMax;
|
|
@@ -1959,7 +1754,7 @@ function resolveAnthropicThinkingBudget(option) {
|
|
|
1959
1754
|
return undefined;
|
|
1960
1755
|
}
|
|
1961
1756
|
if (option.budgetTokens !== undefined) {
|
|
1962
|
-
if (!
|
|
1757
|
+
if (!numberIsSafeInteger(option.budgetTokens) || option.budgetTokens < 1024) {
|
|
1963
1758
|
throw new TypeError("Anthropic reasoning budgetTokens must be a safe integer of at least 1024");
|
|
1964
1759
|
}
|
|
1965
1760
|
return option.budgetTokens;
|
|
@@ -1999,7 +1794,7 @@ function resolveAnthropicProviderThinkingBudget(options) {
|
|
|
1999
1794
|
}
|
|
2000
1795
|
const budgetTokens = budgetTokensProperty.present ? budgetTokensProperty.value : undefined;
|
|
2001
1796
|
if (budgetTokens !== undefined &&
|
|
2002
|
-
(!
|
|
1797
|
+
(!numberIsSafeInteger(budgetTokens) || budgetTokens < 1024)) {
|
|
2003
1798
|
throw new TypeError("Anthropic provider thinking.budget_tokens must be a safe integer of at least 1024");
|
|
2004
1799
|
}
|
|
2005
1800
|
if (type.value !== "enabled") {
|
|
@@ -2090,7 +1885,7 @@ export function buildAnthropicMessagesRequestWithCorrelationState(modelId, provi
|
|
|
2090
1885
|
const outputConfig = buildAnthropicOutputConfig(options.responseFormat, warnings);
|
|
2091
1886
|
const baseMaxTokens = resolveAnthropicMaxTokens(modelId, options.maxOutputTokens);
|
|
2092
1887
|
const maxTokens = thinkingEnabled
|
|
2093
|
-
?
|
|
1888
|
+
? mathMin(baseMaxTokens + (effectiveThinkingBudget ?? 0), getAnthropicModelCapabilities(modelId).maxOutputTokens)
|
|
2094
1889
|
: baseMaxTokens;
|
|
2095
1890
|
const body = {
|
|
2096
1891
|
model: modelId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-provider.d.ts","sourceRoot":"","sources":["../../../../src/extensions/ext-llm-google/src/google-provider.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAC3F,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,2BAA2B,EAC5B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,kBAAkB,EAMlB,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EAKpB,+BAA+B,EAC/B,qBAAqB,EACtB,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,6BAA6B,CAAC;AAyBrC,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,+BAA+B,EAC/B,qBAAqB,GACtB,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CACjC;AAydD,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,MAAM,GACd,YAAY,CAAC,+BAA+B,EAAE,2BAA2B,CAAC,
|
|
1
|
+
{"version":3,"file":"google-provider.d.ts","sourceRoot":"","sources":["../../../../src/extensions/ext-llm-google/src/google-provider.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAC3F,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,2BAA2B,EAC5B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,kBAAkB,EAMlB,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EAKpB,+BAA+B,EAC/B,qBAAqB,EACtB,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,6BAA6B,CAAC;AAyBrC,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,+BAA+B,EAC/B,qBAAqB,GACtB,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CACjC;AAydD,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,MAAM,GACd,YAAY,CAAC,+BAA+B,EAAE,2BAA2B,CAAC,CA0F5E;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,MAAM,GACd,gBAAgB,CAkFlB;AAED,qBAAa,cAAe,YAAW,WAAW;IAChD,QAAQ,CAAC,EAAE,YAAY;IAEvB,WAAW,CACT,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,iBAAiB,GACxB,YAAY,CAAC,+BAA+B,EAAE,2BAA2B,CAAC;IAY7E,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,gBAAgB;CAW9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-request-builder.d.ts","sourceRoot":"","sources":["../../../../src/extensions/ext-llm-google/src/google-request-builder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"google-request-builder.d.ts","sourceRoot":"","sources":["../../../../src/extensions/ext-llm-google/src/google-request-builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,uBAAuB,EAEvB,0BAA0B,EAE3B,MAAM,uCAAuC,CAAC;AAmB/C,MAAM,WAAW,+BAAgC,SAAQ,uBAAuB;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oBAAoB,CAAC,EAAE,aAAa,CAAC;QACnC,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;CACJ;AAED,gGAAgG;AAChG,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AAE/D,KAAK,gBAAgB,GAAG;IACtB,IAAI,CAAC,OAAO,EAAE;QACZ,I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ord, unwrapToolInputSchema } from "../../../src/provider/shared/index.js";
|
|
2
2
|
import { createGoogleToolCallCorrelationRegistry, GOOGLE_CODE_EXECUTION_TOOL_NAME, googleCodeExecutionInput, googleCodeExecutionOutput, readGoogleCodeExecutionResult, readGoogleExecutableCode, readGooglePartDataField, } from "./google-content-parts.js";
|
|
3
3
|
import { readGoogleRawAssistantReplay } from "./google-thought-signatures.js";
|
|
4
|
+
const arrayIsArray = Array.isArray;
|
|
5
|
+
const numberIsSafeInteger = Number.isSafeInteger;
|
|
6
|
+
const objectDefineProperty = Object.defineProperty;
|
|
7
|
+
const objectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
8
|
+
const objectHasOwn = Object.hasOwn;
|
|
9
|
+
const objectKeys = Object.keys;
|
|
10
|
+
function defineGoogleProviderOption(target, key, value) {
|
|
11
|
+
objectDefineProperty(target, key, {
|
|
12
|
+
value,
|
|
13
|
+
writable: true,
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function mergeGoogleProviderOptions(target, providerOptions) {
|
|
19
|
+
const optionNames = objectKeys(providerOptions);
|
|
20
|
+
for (let index = 0; index < optionNames.length; index++) {
|
|
21
|
+
const optionName = optionNames[index];
|
|
22
|
+
const descriptor = objectGetOwnPropertyDescriptor(providerOptions, optionName);
|
|
23
|
+
if (!descriptor || !descriptor.enumerable || !objectHasOwn(descriptor, "value"))
|
|
24
|
+
continue;
|
|
25
|
+
defineGoogleProviderOption(target, optionName, descriptor.value);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function readGoogleProviderOptions(providerOptions, ...providerNames) {
|
|
29
|
+
const output = {};
|
|
30
|
+
if (!providerOptions)
|
|
31
|
+
return output;
|
|
32
|
+
for (let providerIndex = 0; providerIndex < providerNames.length; providerIndex++) {
|
|
33
|
+
const providerName = providerNames[providerIndex];
|
|
34
|
+
let bucketDescriptor;
|
|
35
|
+
try {
|
|
36
|
+
bucketDescriptor = objectGetOwnPropertyDescriptor(providerOptions, providerName);
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
throw new TypeError(`Provider options for "${providerName}" could not be read`);
|
|
40
|
+
}
|
|
41
|
+
if (!bucketDescriptor)
|
|
42
|
+
continue;
|
|
43
|
+
if (!objectHasOwn(bucketDescriptor, "value")) {
|
|
44
|
+
throw new TypeError(`Provider options for "${providerName}" must be a data property`);
|
|
45
|
+
}
|
|
46
|
+
const bucket = bucketDescriptor.value;
|
|
47
|
+
if (!bucket || typeof bucket !== "object" || arrayIsArray(bucket))
|
|
48
|
+
continue;
|
|
49
|
+
let keys;
|
|
50
|
+
try {
|
|
51
|
+
keys = objectKeys(bucket);
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
throw new TypeError(`Provider options for "${providerName}" could not be enumerated`);
|
|
55
|
+
}
|
|
56
|
+
for (let keyIndex = 0; keyIndex < keys.length; keyIndex++) {
|
|
57
|
+
const optionName = keys[keyIndex];
|
|
58
|
+
let optionDescriptor;
|
|
59
|
+
try {
|
|
60
|
+
optionDescriptor = objectGetOwnPropertyDescriptor(bucket, optionName);
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
throw new TypeError(`Provider options for "${providerName}" could not be enumerated`);
|
|
64
|
+
}
|
|
65
|
+
if (!optionDescriptor || !optionDescriptor.enumerable ||
|
|
66
|
+
!objectHasOwn(optionDescriptor, "value")) {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
defineGoogleProviderOption(output, optionName, optionDescriptor.value);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return output;
|
|
73
|
+
}
|
|
4
74
|
function invalidGoogleProviderHistory() {
|
|
5
75
|
return new TypeError("Google raw assistant metadata did not match canonical provider tool history");
|
|
6
76
|
}
|
|
@@ -331,13 +401,13 @@ const GOOGLE_SEARCH_TYPE_KEYS = new Set(["webSearch", "imageSearch"]);
|
|
|
331
401
|
const GOOGLE_TIME_RANGE_KEYS = new Set(["startTime", "endTime"]);
|
|
332
402
|
const RFC_3339_TIMESTAMP = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d{1,9})?(?:Z|[+-](\d{2}):(\d{2}))$/;
|
|
333
403
|
function rejectUnknownKeys(record, allowedKeys, subject) {
|
|
334
|
-
if (
|
|
404
|
+
if (objectKeys(record).some((key) => !allowedKeys.has(key))) {
|
|
335
405
|
throw new TypeError(`${subject} contained an unsupported field`);
|
|
336
406
|
}
|
|
337
407
|
}
|
|
338
408
|
function readEmptyGoogleToolObject(value, subject) {
|
|
339
409
|
const record = readRecord(value);
|
|
340
|
-
if (!record ||
|
|
410
|
+
if (!record || objectKeys(record).length > 0) {
|
|
341
411
|
throw new TypeError(`${subject} must be an empty object`);
|
|
342
412
|
}
|
|
343
413
|
return {};
|
|
@@ -549,7 +619,7 @@ function normalizeGoogleToolChoice(toolChoice) {
|
|
|
549
619
|
}
|
|
550
620
|
function resolveGoogleThinkingConfig(option) {
|
|
551
621
|
if (option?.budgetTokens !== undefined &&
|
|
552
|
-
(!
|
|
622
|
+
(!numberIsSafeInteger(option.budgetTokens) || option.budgetTokens < 0)) {
|
|
553
623
|
throw new TypeError("Google reasoning budgetTokens must be a non-negative safe integer");
|
|
554
624
|
}
|
|
555
625
|
if (!option || option.enabled !== true) {
|
|
@@ -608,7 +678,7 @@ function buildGoogleGenerationConfig(options) {
|
|
|
608
678
|
...(thinkingConfig ? { thinkingConfig } : {}),
|
|
609
679
|
...buildGoogleStructuredOutputConfig(options.responseFormat),
|
|
610
680
|
};
|
|
611
|
-
return
|
|
681
|
+
return objectKeys(config).length > 0 ? config : undefined;
|
|
612
682
|
}
|
|
613
683
|
export function buildGoogleGenerateContentRequest(providerName, options, warnings) {
|
|
614
684
|
if (options.presencePenalty !== undefined) {
|
|
@@ -631,7 +701,7 @@ export function buildGoogleGenerateContentRequest(providerName, options, warning
|
|
|
631
701
|
const generationConfig = buildGoogleGenerationConfig(options);
|
|
632
702
|
const tools = toGoogleTools(options.tools);
|
|
633
703
|
const toolConfig = normalizeGoogleToolChoice(options.toolChoice);
|
|
634
|
-
const labels = options.requestLabels &&
|
|
704
|
+
const labels = options.requestLabels && objectKeys(options.requestLabels).length > 0
|
|
635
705
|
? options.requestLabels
|
|
636
706
|
: typeof options.userId === "string" && options.userId.length > 0
|
|
637
707
|
? { user_id: options.userId }
|
|
@@ -650,11 +720,11 @@ export function buildGoogleGenerateContentRequest(providerName, options, warning
|
|
|
650
720
|
? { safetySettings: options.googleSafetySettings }
|
|
651
721
|
: {}),
|
|
652
722
|
};
|
|
653
|
-
|
|
723
|
+
mergeGoogleProviderOptions(body, readGoogleProviderOptions(options.providerOptions, "google", providerName));
|
|
654
724
|
// Provider options replace `generationConfig` wholesale, so re-pin the
|
|
655
725
|
// runtime-owned structured-output keys the caller asked for.
|
|
656
726
|
const structuredOutput = buildGoogleStructuredOutputConfig(options.responseFormat);
|
|
657
|
-
if (
|
|
727
|
+
if (objectKeys(structuredOutput).length > 0) {
|
|
658
728
|
const generationConfig = { ...(readRecord(body.generationConfig) ?? {}) };
|
|
659
729
|
if ("responseJsonSchema" in structuredOutput) {
|
|
660
730
|
delete generationConfig.responseSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai-chat-request-builder.d.ts","sourceRoot":"","sources":["../../../../src/extensions/ext-llm-openai/src/openai-chat-request-builder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"openai-chat-request-builder.d.ts","sourceRoot":"","sources":["../../../../src/extensions/ext-llm-openai/src/openai-chat-request-builder.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,uCAAuC,CAAC;AAa/C,MAAM,WAAW,+BAAgC,SAAQ,uBAAuB;IAC9E,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IACpD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,QAAQ,CAAC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAC9C,QAAQ,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAC3C,CAAC;AAEF,yFAAyF;AACzF,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AAE/D,KAAK,gBAAgB,GAAG;IACtB,IAAI,CAAC,OAAO,EAAE;QACZ,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC;QACtC,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,IAAI,CAAC;IACT,KAAK,IAAI,KAAK,CAAC;QACb,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC;QACtC,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC,CAAC;CACJ,CAAC;AAUF,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,+BAA+B,EACxC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,gBAAgB,EAC1B,YAAY,CAAC,EAAE,6BAA6B,GAC3C,2BAA2B,CAqJ7B"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { toOpenAICompatibleMessages, toOpenAICompatibleTools, unwrapToolInputSchema, } from "../../../src/provider/shared/index.js";
|
|
2
2
|
import { rejectsOpenAISamplingParams, resolveOpenAIReasoningConfig, } from "./openai-reasoning-models.js";
|
|
3
|
-
import { defineOpenAIProviderOptions } from "./openai-provider-options.js";
|
|
3
|
+
import { defineOpenAIProviderOptions, readOpenAIProviderOptions, } from "./openai-provider-options.js";
|
|
4
|
+
const ArrayIsArray = Array.isArray;
|
|
5
|
+
const ObjectHasOwn = Object.hasOwn;
|
|
4
6
|
function isNativeOpenAIModel(modelId) {
|
|
5
7
|
return /^(gpt-|o[134](-|$)|chatgpt-)/.test(modelId);
|
|
6
8
|
}
|
|
@@ -13,16 +15,15 @@ export function buildOpenAIChatRequest(modelId, providerName, options, stream, w
|
|
|
13
15
|
// keep merging that bucket at the lowest precedence. max_tokens is normalized
|
|
14
16
|
// per bucket BEFORE merging so a higher-precedence bucket's max_tokens
|
|
15
17
|
// override still beats a lower bucket's max_completion_tokens.
|
|
16
|
-
const bucketNames =
|
|
17
|
-
|
|
18
|
-
"openai",
|
|
19
|
-
providerName,
|
|
20
|
-
];
|
|
18
|
+
const bucketNames = providerName === "openai"
|
|
19
|
+
? ["openai-compatible", "openai", providerName]
|
|
20
|
+
: ["openai", providerName];
|
|
21
21
|
const providerOpts = {};
|
|
22
|
-
for (
|
|
23
|
-
|
|
22
|
+
for (let index = 0; index < bucketNames.length; index += 1) {
|
|
23
|
+
const bucketName = bucketNames[index];
|
|
24
|
+
defineOpenAIProviderOptions(providerOpts, normalizeNativeMaxTokens(readOpenAIProviderOptions(options.providerOptions, [bucketName]), modelId));
|
|
24
25
|
}
|
|
25
|
-
const finalTools =
|
|
26
|
+
const finalTools = ObjectHasOwn(providerOpts, "tools") ? providerOpts.tools : tools;
|
|
26
27
|
const resolvedReasoning = resolveOpenAIReasoningConfig(modelId, providerName, options.reasoning);
|
|
27
28
|
const suppressReasoningForFunctionTools = hasOpenAIFunctionTools(finalTools) &&
|
|
28
29
|
capabilities?.reasoningWithFunctionTools === false;
|
|
@@ -146,10 +147,11 @@ export function buildOpenAIChatRequest(modelId, providerName, options, stream, w
|
|
|
146
147
|
return body;
|
|
147
148
|
}
|
|
148
149
|
function hasOpenAIFunctionTools(value) {
|
|
149
|
-
if (!
|
|
150
|
+
if (!ArrayIsArray(value)) {
|
|
150
151
|
return false;
|
|
151
152
|
}
|
|
152
|
-
for (
|
|
153
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
154
|
+
const tool = value[index];
|
|
153
155
|
if (typeof tool === "object" &&
|
|
154
156
|
tool !== null &&
|
|
155
157
|
"type" in tool &&
|
|
@@ -3,4 +3,5 @@
|
|
|
3
3
|
* as `Object.prototype.__proto__`.
|
|
4
4
|
*/
|
|
5
5
|
export declare function defineOpenAIProviderOptions(target: Record<string, unknown>, source: Record<string, unknown>): void;
|
|
6
|
+
export declare function readOpenAIProviderOptions(providerOptions: Record<string, unknown> | undefined, providerNames: readonly string[]): Record<string, unknown>;
|
|
6
7
|
//# sourceMappingURL=openai-provider-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai-provider-options.d.ts","sourceRoot":"","sources":["../../../../src/extensions/ext-llm-openai/src/openai-provider-options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"openai-provider-options.d.ts","sourceRoot":"","sources":["../../../../src/extensions/ext-llm-openai/src/openai-provider-options.ts"],"names":[],"mappings":"AA4DA;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,IAAI,CAON;AAED,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EACpD,aAAa,EAAE,SAAS,MAAM,EAAE,GAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAyBzB"}
|