@exellix/ai-tasks 8.4.0 → 8.4.2
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/README.md +81 -68
- package/dist/core/task-sdk.d.ts.map +1 -1
- package/dist/core/task-sdk.js +1 -0
- package/dist/core/task-sdk.js.map +1 -1
- package/dist/invocation/defaultAiProfilesResolveOptions.d.ts.map +1 -1
- package/dist/invocation/defaultAiProfilesResolveOptions.js +5 -4
- package/dist/invocation/defaultAiProfilesResolveOptions.js.map +1 -1
- package/dist/invocation/resolveProfileInvocationRouting.d.ts.map +1 -1
- package/dist/invocation/resolveProfileInvocationRouting.js +7 -16
- package/dist/invocation/resolveProfileInvocationRouting.js.map +1 -1
- package/dist/utils/aiProfileModelFormat.d.ts +13 -5
- package/dist/utils/aiProfileModelFormat.d.ts.map +1 -1
- package/dist/utils/aiProfileModelFormat.js +34 -22
- package/dist/utils/aiProfileModelFormat.js.map +1 -1
- package/dist/utils/concreteModelId.d.ts.map +1 -1
- package/dist/utils/concreteModelId.js +4 -2
- package/dist/utils/concreteModelId.js.map +1 -1
- package/dist/utils/resolveAiProfileModel.d.ts +1 -1
- package/dist/utils/resolveAiProfileModel.d.ts.map +1 -1
- package/dist/utils/resolveAiProfileModel.js +1 -6
- package/dist/utils/resolveAiProfileModel.js.map +1 -1
- package/documenations/upstream-feature-requests/README.md +5 -3
- package/documenations/upstream-feature-requests/ai-skills-orchestrator-invoke-contract-5.9.md +6 -7
- package/documenations/upstream-feature-requests/ai-tasks-wrap-up-after-upstream.md +3 -3
- package/documenations/upstream-feature-requests/xynthesis-ai-profiles-2.1-import-break.md +324 -0
- package/documenations/upstream-feature-requests/xynthesis-orchestrator-invoke-contract-4.2.md +18 -7
- package/package.json +5 -5
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { formatProfileChoiceKey, isKnownProfileChoice, isProfileChoiceKeyFormat, } from "@x12i/ai-profiles";
|
|
2
2
|
import { isConcreteModelId } from "./concreteModelId.js";
|
|
3
|
-
/** Legacy graph-engine tier names → `@x12i/ai-profiles` profile keys. */
|
|
4
|
-
export const LEGACY_TIER_TO_PROFILE = {
|
|
5
|
-
weak: "cheap",
|
|
6
|
-
strong: "pro",
|
|
7
|
-
default: "balanced",
|
|
8
|
-
};
|
|
9
3
|
function parseProfileSlotForAlias(profileSlot) {
|
|
10
4
|
const trimmed = profileSlot.trim();
|
|
11
5
|
const at = trimmed.indexOf("@");
|
|
@@ -13,7 +7,10 @@ function parseProfileSlotForAlias(profileSlot) {
|
|
|
13
7
|
return { profileInput: trimmed.slice(0, at).trim() };
|
|
14
8
|
return { profileInput: trimmed };
|
|
15
9
|
}
|
|
16
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* True when `value` is a known ai-profiles **choice key** (`profile/choice` or shortcut).
|
|
12
|
+
* Bare profile keys (e.g. `cheap`) are resolved at invoke via {@link resolveAIProfile}, not sync-guessed.
|
|
13
|
+
*/
|
|
17
14
|
export function isResolvableModelAlias(value) {
|
|
18
15
|
const trimmed = value.trim();
|
|
19
16
|
if (!trimmed)
|
|
@@ -21,15 +18,37 @@ export function isResolvableModelAlias(value) {
|
|
|
21
18
|
if (isConcreteModelId(trimmed))
|
|
22
19
|
return false;
|
|
23
20
|
const { profileInput } = parseProfileSlotForAlias(trimmed);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
return isKnownProfileChoice(profileInput);
|
|
22
|
+
}
|
|
23
|
+
/** Trim profile slot input (no legacy tier remapping). */
|
|
24
|
+
export function normalizeProfileSlotInput(value) {
|
|
25
|
+
return value.trim();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Map wire slot → ai-profiles 2.1 `resolveAIProfile` input (`profile/choice` or shortcut).
|
|
29
|
+
* Bare profile keys (e.g. `cheap`) expand to `cheap/default`.
|
|
30
|
+
*/
|
|
31
|
+
export function toStrictAiProfileResolveInput(profileSlot, explicitChoice) {
|
|
32
|
+
const trimmed = profileSlot.trim();
|
|
33
|
+
if (!trimmed)
|
|
34
|
+
return trimmed;
|
|
35
|
+
if (explicitChoice?.trim()) {
|
|
36
|
+
return formatProfileChoiceKey(trimmed, explicitChoice.trim());
|
|
29
37
|
}
|
|
30
|
-
|
|
31
|
-
|
|
38
|
+
const at = trimmed.indexOf("@");
|
|
39
|
+
if (at > 0) {
|
|
40
|
+
const profile = trimmed.slice(0, at).trim();
|
|
41
|
+
const choice = trimmed.slice(at + 1).trim();
|
|
42
|
+
return choice ? formatProfileChoiceKey(profile, choice) : formatProfileChoiceKey(profile, "default");
|
|
43
|
+
}
|
|
44
|
+
if (isProfileChoiceKeyFormat(trimmed) || isKnownProfileChoice(trimmed)) {
|
|
45
|
+
return trimmed;
|
|
32
46
|
}
|
|
47
|
+
return formatProfileChoiceKey(trimmed, "default");
|
|
48
|
+
}
|
|
49
|
+
/** @deprecated Use {@link normalizeProfileSlotInput}. */
|
|
50
|
+
export function normalizeXynthesisModelAlias(value) {
|
|
51
|
+
return normalizeProfileSlotInput(value);
|
|
33
52
|
}
|
|
34
53
|
/** Format a resolved ai-profiles choice as a concrete provider model id for ai-skills MAIN. */
|
|
35
54
|
export function formatResolvedProfileModelId(provider, modelId) {
|
|
@@ -49,11 +68,4 @@ export function formatResolvedProfileModelId(provider, modelId) {
|
|
|
49
68
|
return trimmed;
|
|
50
69
|
return `${providerTrim}/${trimmed}`;
|
|
51
70
|
}
|
|
52
|
-
/** Map legacy tiers to ai-profiles keys without resolving to a provider model id. */
|
|
53
|
-
export function normalizeXynthesisModelAlias(value) {
|
|
54
|
-
const trimmed = value.trim();
|
|
55
|
-
if (!trimmed)
|
|
56
|
-
return trimmed;
|
|
57
|
-
return LEGACY_TIER_TO_PROFILE[trimmed.toLowerCase()] ?? trimmed;
|
|
58
|
-
}
|
|
59
71
|
//# sourceMappingURL=aiProfileModelFormat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiProfileModelFormat.js","sourceRoot":"","sources":["../../src/utils/aiProfileModelFormat.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"aiProfileModelFormat.js","sourceRoot":"","sources":["../../src/utils/aiProfileModelFormat.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"concreteModelId.d.ts","sourceRoot":"","sources":["../../src/utils/concreteModelId.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"concreteModelId.d.ts","sourceRoot":"","sources":["../../src/utils/concreteModelId.ts"],"names":[],"mappings":"AAeA,2FAA2F;AAC3F,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAOxD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isProfileChoiceKeyFormat } from "@x12i/ai-profiles";
|
|
1
2
|
const KNOWN_PROVIDER_PREFIXES = [
|
|
2
3
|
"openrouter/",
|
|
3
4
|
"anthropic/",
|
|
@@ -15,8 +16,9 @@ export function isConcreteModelId(value) {
|
|
|
15
16
|
const trimmed = value.trim();
|
|
16
17
|
if (!trimmed)
|
|
17
18
|
return false;
|
|
18
|
-
if (trimmed.includes("/"))
|
|
19
|
-
return
|
|
19
|
+
if (trimmed.includes("/")) {
|
|
20
|
+
return !isProfileChoiceKeyFormat(trimmed);
|
|
21
|
+
}
|
|
20
22
|
return KNOWN_PROVIDER_PREFIXES.some((p) => trimmed.startsWith(p));
|
|
21
23
|
}
|
|
22
24
|
//# sourceMappingURL=concreteModelId.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"concreteModelId.js","sourceRoot":"","sources":["../../src/utils/concreteModelId.ts"],"names":[],"mappings":"AAAA,MAAM,uBAAuB,GAAG;IAC9B,aAAa;IACb,YAAY;IACZ,SAAS;IACT,SAAS;IACT,OAAO;IACP,aAAa;IACb,UAAU;IACV,SAAS;IACT,WAAW;IACX,OAAO;CACC,CAAC;AAEX,2FAA2F;AAC3F,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC3B,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"concreteModelId.js","sourceRoot":"","sources":["../../src/utils/concreteModelId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,MAAM,uBAAuB,GAAG;IAC9B,aAAa;IACb,YAAY;IACZ,SAAS;IACT,SAAS;IACT,OAAO;IACP,aAAa;IACb,UAAU;IACV,SAAS;IACT,WAAW;IACX,OAAO;CACC,CAAC;AAEX,2FAA2F;AAC3F,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC3B,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1B,OAAO,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -19,7 +19,7 @@ export type ResolveModelReferenceOptions = {
|
|
|
19
19
|
export declare function resolveModelReference(value: string | undefined, options?: ResolveModelReferenceOptions): Promise<string | undefined>;
|
|
20
20
|
/**
|
|
21
21
|
* Resolve a model reference for `@exellix/xynthesis` ≥4.0 (`executeXynthesisAction`):
|
|
22
|
-
* keep ai-profiles aliases
|
|
22
|
+
* keep ai-profiles aliases on the wire; reject concrete provider ids.
|
|
23
23
|
*/
|
|
24
24
|
export declare function resolveModelReferenceForXynthesis(value: string | undefined): Promise<string | undefined>;
|
|
25
25
|
//# sourceMappingURL=resolveAiProfileModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAiProfileModel.d.ts","sourceRoot":"","sources":["../../src/utils/resolveAiProfileModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAUhF,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AAEnC,+GAA+G;AAC/G,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,2FAA2F;IAC3F,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0CAA0C;IAC1C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,OAAO,CAAC,EAAE,4BAA4B,GACrC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"resolveAiProfileModel.d.ts","sourceRoot":"","sources":["../../src/utils/resolveAiProfileModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAUhF,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AAEnC,+GAA+G;AAC/G,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,2FAA2F;IAC3F,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0CAA0C;IAC1C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,OAAO,CAAC,EAAE,4BAA4B,GACrC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAmB7B;AAED;;;GAGG;AACH,wBAAsB,iCAAiC,CACrD,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAU7B"}
|
|
@@ -19,8 +19,6 @@ export async function resolveModelReference(value, options) {
|
|
|
19
19
|
return undefined;
|
|
20
20
|
if (isConcreteModelId(trimmed))
|
|
21
21
|
return trimmed;
|
|
22
|
-
if (!isResolvableModelAlias(trimmed) && !trimmed.includes("@"))
|
|
23
|
-
return trimmed;
|
|
24
22
|
const { effectiveUseOpenRouter } = resolvePreferOpenRouterPolicy({
|
|
25
23
|
preferOpenRouter: options?.preferOpenRouter ?? options?.useOpenRouter,
|
|
26
24
|
openrouterApiKeyPresent: options?.openrouterApiKeyPresent,
|
|
@@ -36,7 +34,7 @@ export async function resolveModelReference(value, options) {
|
|
|
36
34
|
}
|
|
37
35
|
/**
|
|
38
36
|
* Resolve a model reference for `@exellix/xynthesis` ≥4.0 (`executeXynthesisAction`):
|
|
39
|
-
* keep ai-profiles aliases
|
|
37
|
+
* keep ai-profiles aliases on the wire; reject concrete provider ids.
|
|
40
38
|
*/
|
|
41
39
|
export async function resolveModelReferenceForXynthesis(value) {
|
|
42
40
|
if (value === undefined)
|
|
@@ -47,9 +45,6 @@ export async function resolveModelReferenceForXynthesis(value) {
|
|
|
47
45
|
if (isConcreteModelId(normalized)) {
|
|
48
46
|
throw new Error(`@exellix/xynthesis ≥4.0 requires ai-profiles model aliases for executeXynthesisAction (got concrete id "${normalized}"). Use a profile/shortcut such as balanced, cheapest, or json.`);
|
|
49
47
|
}
|
|
50
|
-
if (!isResolvableModelAlias(normalized)) {
|
|
51
|
-
throw new Error(`Unknown xynthesis model alias "${normalized}". Use an @x12i/ai-profiles profile or shortcut (e.g. balanced, cheapest, json).`);
|
|
52
|
-
}
|
|
53
48
|
return normalized;
|
|
54
49
|
}
|
|
55
50
|
//# sourceMappingURL=resolveAiProfileModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAiProfileModel.js","sourceRoot":"","sources":["../../src/utils/resolveAiProfileModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,kDAAkD,CAAC;AACnG,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAEL,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AAEnC,+GAA+G;AAC/G,MAAM,UAAU,qBAAqB,CAAC,KAAa;IACjD,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC;AAaD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,KAAyB,EACzB,OAAsC;IAEtC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAC/B,IAAI,iBAAiB,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"resolveAiProfileModel.js","sourceRoot":"","sources":["../../src/utils/resolveAiProfileModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,kDAAkD,CAAC;AACnG,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAEL,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AAEnC,+GAA+G;AAC/G,MAAM,UAAU,qBAAqB,CAAC,KAAa;IACjD,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC;AAaD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,KAAyB,EACzB,OAAsC;IAEtC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAC/B,IAAI,iBAAiB,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAC;IAE/C,MAAM,EAAE,sBAAsB,EAAE,GAAG,6BAA6B,CAAC;QAC/D,gBAAgB,EAAE,OAAO,EAAE,gBAAgB,IAAI,OAAO,EAAE,aAAa;QACrE,uBAAuB,EAAE,OAAO,EAAE,uBAAuB;KAC1D,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,MAAM,+BAA+B,CAAC,OAAO,EAAE;QAC9D,SAAS,EAAE,OAAO;QAClB,sBAAsB;QACtB,uBAAuB,EAAE,OAAO,EAAE,uBAAuB;QACzD,MAAM,EAAE,OAAO,EAAE,MAAM;QACvB,WAAW,EAAE,OAAO,EAAE,WAAW;KAClC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC,OAAO,CAAC;AAC1B,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,iCAAiC,CACrD,KAAyB;IAEzB,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,MAAM,UAAU,GAAG,4BAA4B,CAAC,KAAK,CAAC,CAAC;IACvD,IAAI,CAAC,UAAU;QAAE,OAAO,SAAS,CAAC;IAClC,IAAI,iBAAiB,CAAC,UAAU,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CACb,2GAA2G,UAAU,iEAAiE,CACvL,CAAC;IACJ,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -6,9 +6,11 @@ Fix reports filed for sibling packages. Hand these to the package owners; after
|
|
|
6
6
|
|
|
7
7
|
| Package | Document | Status |
|
|
8
8
|
|---------|----------|--------|
|
|
9
|
-
| `@exellix/ai-skills`
|
|
10
|
-
| `@exellix/xynthesis`
|
|
11
|
-
| `@exellix/
|
|
9
|
+
| `@exellix/ai-skills` 6.0 | [ai-skills-orchestrator-invoke-contract-5.9.md](./ai-skills-orchestrator-invoke-contract-5.9.md) | **shipped** — `ModelConfig.reasoningEffort` |
|
|
10
|
+
| `@exellix/xynthesis` 4.3 | [**xynthesis-ai-profiles-2.1-import-break.md**](./xynthesis-ai-profiles-2.1-import-break.md) | **P0 blocked** — **4.3.0** breaks `import "@exellix/xynthesis"` with ai-profiles **2.1.0**; need **≥ 4.3.1** |
|
|
11
|
+
| `@exellix/xynthesis` 4.3 | [xynthesis-orchestrator-invoke-contract-4.2.md](./xynthesis-orchestrator-invoke-contract-4.2.md) | **partial** — `reasoningEffort` shipped in 4.3.0; import break tracked in CR above |
|
|
12
|
+
| `@x12i/ai-profiles` 2.1 | — | **shipped** — `catalogLane` required; sync `isKnownProfileOrShortcut` removed (safer — resolve at invoke) |
|
|
13
|
+
| `@exellix/ai-tasks` | [ai-tasks-wrap-up-after-upstream.md](./ai-tasks-wrap-up-after-upstream.md) | **done** in 8.4 — no legacy tiers; resolve at invoke via `resolveAIProfile` |
|
|
12
14
|
|
|
13
15
|
## Older / parallel tracks
|
|
14
16
|
|
package/documenations/upstream-feature-requests/ai-skills-orchestrator-invoke-contract-5.9.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# `@exellix/ai-skills` — orchestrator invoke contract fixes (≥ 5.9)
|
|
2
2
|
|
|
3
|
-
Status: **
|
|
3
|
+
Status: **shipped** in **6.0.0** (`ModelConfig.reasoningEffort`)
|
|
4
4
|
Owner: `@exellix/ai-skills`
|
|
5
5
|
Filed by: `@exellix/ai-tasks`
|
|
6
6
|
Consumer: `@exellix/ai-tasks` 8.4.0, graph-engine 7.x (`RunTaskRequest.modelConfig` triplet)
|
|
7
|
-
Pinned in ai-tasks today: `@exellix/ai-skills@
|
|
7
|
+
Pinned in ai-tasks today: `@exellix/ai-skills@6.0.0`
|
|
8
8
|
|
|
9
9
|
Related (older, partially superseded): [`ai-skills-llm-observability.md`](./ai-skills-llm-observability.md)
|
|
10
10
|
|
|
@@ -43,13 +43,12 @@ ai-skills **5.9.11 already enforces the right side** (`ModelConfig.maxTokens?: n
|
|
|
43
43
|
|
|
44
44
|
## Required fixes
|
|
45
45
|
|
|
46
|
-
### 1. Accept `reasoningEffort` on `RunSkillRequest` (or explicit `ModelConfig` extension)
|
|
46
|
+
### 1. Accept `reasoningEffort` on `RunSkillRequest` (or explicit `ModelConfig` extension) — **shipped in 6.0.0**
|
|
47
47
|
|
|
48
|
-
#### Today
|
|
48
|
+
#### Today (6.0.0)
|
|
49
49
|
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
- `@exellix/ai-tasks` has nothing to forward from graph-engine / `llmCall` even when the operator configures it per task.
|
|
50
|
+
- **`ModelConfig.reasoningEffort`** is optional; resolution: request → Catalox catalog → `"not-applicable"`.
|
|
51
|
+
- ai-tasks forwards via `buildAiSkillsModelConfigForMain` (`modelConfig` tuning passthrough + `llmCall` overlay).
|
|
53
52
|
|
|
54
53
|
#### Why it hurts
|
|
55
54
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# `@exellix/ai-tasks` — wrap-up after upstream invoke-contract fixes
|
|
2
2
|
|
|
3
|
-
Status: **blocked** on
|
|
3
|
+
Status: **blocked** on **@exellix/xynthesis ≥ 4.3.1** ([xynthesis-ai-profiles-2.1-import-break.md](./xynthesis-ai-profiles-2.1-import-break.md)); invoke-contract items below are otherwise shipped in **ai-skills 6.0** / **xynthesis 4.3**:
|
|
4
4
|
|
|
5
5
|
- [`ai-skills-orchestrator-invoke-contract-5.9.md`](./ai-skills-orchestrator-invoke-contract-5.9.md)
|
|
6
6
|
- [`xynthesis-orchestrator-invoke-contract-4.2.md`](./xynthesis-orchestrator-invoke-contract-4.2.md)
|
|
@@ -107,8 +107,8 @@ flowchart LR
|
|
|
107
107
|
|
|
108
108
|
Recommended sequence:
|
|
109
109
|
|
|
110
|
-
1. Merge **xynthesis** + **ai-skills** contract PRs (can be parallel).
|
|
111
|
-
2. Bump `package.json`
|
|
110
|
+
1. Merge **xynthesis** ai-profiles 2.1 import fix (**≥ 4.3.1**) + **ai-skills** contract PRs (can be parallel).
|
|
111
|
+
2. Bump `package.json`: `"@exellix/xynthesis": "^4.3.1"` (minimum — **do not** ship ai-tasks 8.4.x consumer release on **4.3.0**).
|
|
112
112
|
3. Execute **this wrap-up** checklist in one ai-tasks PR.
|
|
113
113
|
4. Release note in **8.4.x** or **8.5.0** with graph-engine migration (drop `maxTokensCap` on task payloads if removed).
|
|
114
114
|
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
# `@exellix/xynthesis` — ai-profiles 2.1 import break (`isKnownProfileOrShortcut` removed)
|
|
2
|
+
|
|
3
|
+
Status: **open — blocks all consumers**
|
|
4
|
+
Owner: `@exellix/xynthesis`
|
|
5
|
+
Filed by: `@exellix/ai-tasks`
|
|
6
|
+
Target release: **`@exellix/xynthesis` ≥ 4.3.1**
|
|
7
|
+
Reproduced with: `@exellix/xynthesis` **4.3.0** (broken), `@x12i/ai-profiles` **2.1.0** (required by `@x12i/ai-tools` ≥ 2.4)
|
|
8
|
+
Consumers blocked: `@exellix/ai-tasks` **8.4.x**, graph-engine import tests, any app that `import "@exellix/xynthesis"`
|
|
9
|
+
|
|
10
|
+
Related: [`xynthesis-orchestrator-invoke-contract-4.2.md §0`](./xynthesis-orchestrator-invoke-contract-4.2.md) (invoke-contract track — this CR is the **P0 runtime fix**)
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Summary
|
|
15
|
+
|
|
16
|
+
**`@exellix/xynthesis@4.3.0`** imports and re-exports **`isKnownProfileOrShortcut`** from **`@x12i/ai-profiles`**. That symbol was **removed from the package root in ai-profiles 2.1.0** (replaced by **`isKnownProfileChoice`** and strict **`profile/choice`** resolution).
|
|
17
|
+
|
|
18
|
+
With the current Exellix stack pinned to ai-profiles **2.1.0**, **module load fails before any API call**:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
SyntaxError: The requested module '@x12i/ai-profiles' does not provide an export named 'isKnownProfileOrShortcut'
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Not an ai-profiles bug** — 2.1.0 intentionally dropped sync alias guessing.
|
|
25
|
+
**Not an ai-tasks bug** — ai-tasks already migrated to ai-profiles 2.1 APIs.
|
|
26
|
+
**Not fixable in consumers** — npm `overrides`, deep imports of `dist/isKnownProfileOrShortcut.js`, or pinning ai-profiles `<2.1` violate the no-legacy invoke contract and break `@x12i/ai-tools`.
|
|
27
|
+
|
|
28
|
+
**Required:** xynthesis **4.3.1** patch — adopt ai-profiles 2.1 resolve input normalization (same pattern as ai-tasks 8.4).
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Impact
|
|
33
|
+
|
|
34
|
+
| Path | Symptom |
|
|
35
|
+
|------|---------|
|
|
36
|
+
| `import "@exellix/xynthesis"` | **SyntaxError** at ESM link time |
|
|
37
|
+
| `import "@exellix/ai-tasks"` | Same — ai-tasks depends on xynthesis |
|
|
38
|
+
| graph-engine / consumer test suites | Fail at import; no `runTask()` coverage |
|
|
39
|
+
| `executeXynthesisAction({ model: "cheap", … })` | Would fail at resolve **after** import fix if resolve path is not updated |
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Reproduction
|
|
44
|
+
|
|
45
|
+
### Minimal (any Node 20+ project with both packages installed)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm i @exellix/xynthesis@4.3.0 @x12i/ai-profiles@2.1.0
|
|
49
|
+
node -e "import('@exellix/xynthesis').then(() => console.log('ok')).catch(e => console.error(e))"
|
|
50
|
+
# SyntaxError: ... does not provide an export named 'isKnownProfileOrShortcut'
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### From ai-tasks repo
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
cd ai-tasks
|
|
57
|
+
npm install # tree dedupes ai-profiles@2.1.0
|
|
58
|
+
node -e "import('@exellix/xynthesis')"
|
|
59
|
+
npm run test # fails at import / dist-test compile depending on test graph
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Dependency tree (why ai-profiles cannot be downgraded)
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
@exellix/ai-tasks
|
|
66
|
+
├── @x12i/ai-profiles@2.1.0
|
|
67
|
+
├── @exellix/xynthesis@4.3.0 → imports isKnownProfileOrShortcut ✗
|
|
68
|
+
├── @exellix/ai-skills@6.0.0 → ai-profiles@2.1.0
|
|
69
|
+
└── @x12i/funcx@4.3.3 → ai-profiles@2.1.0
|
|
70
|
+
└── @exellix/xynthesis (transitive)
|
|
71
|
+
└── @x12i/ai-tools@2.4.0 → requires ai-profiles 2.1 (formatProfileChoiceKey)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Root cause (xynthesis 4.3.0)
|
|
77
|
+
|
|
78
|
+
### 1. Broken ESM import / re-export
|
|
79
|
+
|
|
80
|
+
**File:** `src/index.ts` (compiled to `dist/index.js`)
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
export {
|
|
84
|
+
resolveAIProfile,
|
|
85
|
+
isKnownProfileOrShortcut, // ← removed from ai-profiles 2.1 root
|
|
86
|
+
listAIProfiles,
|
|
87
|
+
listAIShortcuts,
|
|
88
|
+
} from "@x12i/ai-profiles";
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**File:** `src/resolveAiProfileModel.ts`
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
import { isKnownProfileOrShortcut, resolveAIProfile } from "@x12i/ai-profiles";
|
|
95
|
+
|
|
96
|
+
export function assertKnownModelAlias(input: string): void {
|
|
97
|
+
// ...
|
|
98
|
+
if (!isKnownProfileOrShortcut(key)) {
|
|
99
|
+
throw new Error(`xynthesis: unknown model alias "${key}"…`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Because **`index.ts` re-exports the missing symbol**, Node fails while linking `@exellix/xynthesis` — even callers that never use `assertKnownModelAlias`.
|
|
105
|
+
|
|
106
|
+
### 2. Stale resolve input shape (secondary — fails after import fix)
|
|
107
|
+
|
|
108
|
+
**File:** `src/resolveAiProfileModel.ts` — `resolveXynthesisModel`
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
const profile = await resolveAIProfile(alias, mergedOptions);
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
ai-profiles **2.1.0** rejects bare profile keys:
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
Unknown profile/choice key: cheap. Use "profile/choice" (e.g. "cheap/default") or a shortcut that pins both.
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Orchestrators (graph-engine, ai-tasks) still send **`preActionModel: "cheap"`** / **`postActionModel: "cheap"`** on the wire. ai-tasks expands at invoke via `formatProfileChoiceKey(profile, "default")`; xynthesis must do the same before `resolveAIProfile`.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Recommended fix (xynthesis ≥ 4.3.1)
|
|
125
|
+
|
|
126
|
+
**No consumer workarounds.** Fix belongs entirely in `@exellix/xynthesis`.
|
|
127
|
+
|
|
128
|
+
### Step 1 — Bump dependency
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
"@x12i/ai-profiles": "^2.1.0"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Step 2 — Add ai-profiles 2.1 input normalization helper
|
|
135
|
+
|
|
136
|
+
Mirror **`@exellix/ai-tasks`** `src/utils/aiProfileModelFormat.ts` (`toStrictAiProfileResolveInput`). Suggested new file **`src/aiProfileResolveInput.ts`**:
|
|
137
|
+
|
|
138
|
+
```ts
|
|
139
|
+
import {
|
|
140
|
+
formatProfileChoiceKey,
|
|
141
|
+
isKnownProfileChoice,
|
|
142
|
+
isProfileChoiceKeyFormat,
|
|
143
|
+
} from "@x12i/ai-profiles";
|
|
144
|
+
|
|
145
|
+
/** Map caller alias → ai-profiles 2.1 `resolveAIProfile` input. */
|
|
146
|
+
export function toStrictAiProfileResolveInput(profileSlot: string, explicitChoice?: string): string {
|
|
147
|
+
const trimmed = profileSlot.trim();
|
|
148
|
+
if (!trimmed) return trimmed;
|
|
149
|
+
|
|
150
|
+
if (explicitChoice?.trim()) {
|
|
151
|
+
return formatProfileChoiceKey(trimmed, explicitChoice.trim());
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const at = trimmed.indexOf("@");
|
|
155
|
+
if (at > 0) {
|
|
156
|
+
const profile = trimmed.slice(0, at).trim();
|
|
157
|
+
const choice = trimmed.slice(at + 1).trim();
|
|
158
|
+
return choice
|
|
159
|
+
? formatProfileChoiceKey(profile, choice)
|
|
160
|
+
: formatProfileChoiceKey(profile, "default");
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (isProfileChoiceKeyFormat(trimmed) || isKnownProfileChoice(trimmed)) {
|
|
164
|
+
return trimmed;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Bare profile key (e.g. "cheap") → default choice ("cheap/default")
|
|
168
|
+
return formatProfileChoiceKey(trimmed, "default");
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** Sync bundled-registry check after normalization (shortcuts + profile/choice keys). */
|
|
172
|
+
export function isKnownXynthesisModelAlias(input: string): boolean {
|
|
173
|
+
const trimmed = input.trim();
|
|
174
|
+
if (!trimmed) return false;
|
|
175
|
+
const resolveInput = toStrictAiProfileResolveInput(trimmed);
|
|
176
|
+
return isKnownProfileChoice(resolveInput);
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Step 3 — Update `resolveAiProfileModel.ts`
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
import { resolveAIProfile } from "@x12i/ai-profiles";
|
|
184
|
+
import {
|
|
185
|
+
isKnownXynthesisModelAlias,
|
|
186
|
+
toStrictAiProfileResolveInput,
|
|
187
|
+
} from "./aiProfileResolveInput.js";
|
|
188
|
+
|
|
189
|
+
export function assertKnownModelAlias(input: string): void {
|
|
190
|
+
const key = normalizeAliasInput(input);
|
|
191
|
+
if (!key) {
|
|
192
|
+
throw new Error("xynthesis: model alias must be a non-empty string");
|
|
193
|
+
}
|
|
194
|
+
if (!isKnownXynthesisModelAlias(key)) {
|
|
195
|
+
throw new Error(
|
|
196
|
+
`xynthesis: unknown model alias "${key}". Use profile/choice (e.g. cheap/default), profile@choice, or a shortcut (cheapest, default, json).`
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export async function resolveXynthesisModel(input, options) {
|
|
202
|
+
// ... existing guards ...
|
|
203
|
+
const alias = normalizeAliasInput(input);
|
|
204
|
+
const resolveInput = toStrictAiProfileResolveInput(alias);
|
|
205
|
+
const profile = await resolveAIProfile(resolveInput, mergedOptions);
|
|
206
|
+
// ... rest unchanged ...
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Step 4 — Fix public re-exports in `index.ts`
|
|
211
|
+
|
|
212
|
+
**Remove** `isKnownProfileOrShortcut` from the ai-profiles re-export block.
|
|
213
|
+
|
|
214
|
+
**Preferred replacement:**
|
|
215
|
+
|
|
216
|
+
```ts
|
|
217
|
+
export {
|
|
218
|
+
resolveAIProfile,
|
|
219
|
+
isKnownProfileChoice,
|
|
220
|
+
formatProfileChoiceKey,
|
|
221
|
+
listAIProfiles,
|
|
222
|
+
listAIShortcuts,
|
|
223
|
+
} from "@x12i/ai-profiles";
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
**Breaking note for xynthesis CHANGELOG:** `isKnownProfileOrShortcut` re-export removed; use `isKnownProfileChoice` + `toStrictAiProfileResolveInput` (exported from xynthesis) or import directly from `@x12i/ai-profiles`.
|
|
227
|
+
|
|
228
|
+
Optionally export `toStrictAiProfileResolveInput` / `isKnownXynthesisModelAlias` from the package root if downstream tools relied on xynthesis as the ai-profiles facade.
|
|
229
|
+
|
|
230
|
+
### Step 5 — Tests (xynthesis)
|
|
231
|
+
|
|
232
|
+
Extend **`test/resolveAiProfileModel.unit.ts`**:
|
|
233
|
+
|
|
234
|
+
```ts
|
|
235
|
+
import assert from "node:assert/strict";
|
|
236
|
+
import { isKnownXynthesisModelAlias, toStrictAiProfileResolveInput } from "../src/aiProfileResolveInput.js";
|
|
237
|
+
import { resolveXynthesisModel, assertKnownModelAlias } from "../src/resolveAiProfileModel.js";
|
|
238
|
+
|
|
239
|
+
// Import smoke (add dedicated test file if needed)
|
|
240
|
+
await import("../dist/index.js"); // must not throw with ai-profiles 2.1 peer
|
|
241
|
+
|
|
242
|
+
assert.equal(toStrictAiProfileResolveInput("cheap"), "cheap/default");
|
|
243
|
+
assert.equal(isKnownXynthesisModelAlias("cheap"), true);
|
|
244
|
+
assert.equal(isKnownXynthesisModelAlias("cheapest"), true);
|
|
245
|
+
assert.throws(() => assertKnownModelAlias("not-a-profile"));
|
|
246
|
+
|
|
247
|
+
const resolved = await resolveXynthesisModel("cheap", {
|
|
248
|
+
source: "bundled",
|
|
249
|
+
preferOpenRouter: false,
|
|
250
|
+
openrouterApiKeyPresent: false,
|
|
251
|
+
});
|
|
252
|
+
assert.ok(resolved?.wireModelId.includes("/"));
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Add **`test/aiProfiles21Import.unit.ts`**:
|
|
256
|
+
|
|
257
|
+
```ts
|
|
258
|
+
await import("@exellix/xynthesis"); // ESM link test
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Run full suite with **`@x12i/ai-profiles@2.1.0`** installed (not 2.0.x).
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Explicitly rejected (no workarounds)
|
|
266
|
+
|
|
267
|
+
| Approach | Why rejected |
|
|
268
|
+
|----------|--------------|
|
|
269
|
+
| Consumer npm `overrides` pinning ai-profiles 2.0.x | Breaks `@x12i/ai-tools` / `formatProfileChoiceKey`; violates stack alignment |
|
|
270
|
+
| Deep import `@x12i/ai-profiles/dist/isKnownProfileOrShortcut.js` | Private path; not in package exports |
|
|
271
|
+
| ai-profiles 2.1.1 re-export shim only | Pushes debt upstream; xynthesis still passes bare keys to `resolveAIProfile` |
|
|
272
|
+
| graph-engine / ai-tasks patch | Wrong layer — xynthesis owns PRE/POST model resolve |
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## After xynthesis 4.3.1 ships — ai-tasks follow-up
|
|
277
|
+
|
|
278
|
+
1. `"@exellix/xynthesis": "^4.3.1"` in `@exellix/ai-tasks` `package.json`
|
|
279
|
+
2. `npm install && npm run test`
|
|
280
|
+
3. Patch release **8.4.x** updating README / BREAKING-CHANGES minimums
|
|
281
|
+
|
|
282
|
+
See [`ai-tasks-wrap-up-after-upstream.md`](./ai-tasks-wrap-up-after-upstream.md).
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Paste-ready GitHub issue (xynthesis repo)
|
|
287
|
+
|
|
288
|
+
**Title:** ai-profiles 2.1: remove `isKnownProfileOrShortcut` import; normalize profile resolve input
|
|
289
|
+
|
|
290
|
+
**Labels:** `bug`, `ai-profiles`, `breaking`, `P0`
|
|
291
|
+
|
|
292
|
+
**Body:**
|
|
293
|
+
|
|
294
|
+
> `@exellix/xynthesis@4.3.0` fails to load with `@x12i/ai-profiles@2.1.0`:
|
|
295
|
+
>
|
|
296
|
+
> ```
|
|
297
|
+
> SyntaxError: The requested module '@x12i/ai-profiles' does not provide an export named 'isKnownProfileOrShortcut'
|
|
298
|
+
> ```
|
|
299
|
+
>
|
|
300
|
+
> Blocks `@exellix/ai-tasks@8.4.x` and graph-engine import tests.
|
|
301
|
+
>
|
|
302
|
+
> **Fix (4.3.1):**
|
|
303
|
+
> 1. Remove `isKnownProfileOrShortcut` import/re-export; use ai-profiles 2.1 APIs.
|
|
304
|
+
> 2. Normalize bare profile keys (`cheap` → `cheap/default`) before `resolveAIProfile` — see ai-tasks `toStrictAiProfileResolveInput`.
|
|
305
|
+
> 3. Bump `@x12i/ai-profiles` peer to `^2.1.0`; add import + resolve unit tests.
|
|
306
|
+
>
|
|
307
|
+
> Full spec: [link to this doc in ai-tasks repo]
|
|
308
|
+
|
|
309
|
+
**Acceptance criteria:**
|
|
310
|
+
|
|
311
|
+
- [ ] `node -e "import('@exellix/xynthesis')"` succeeds with `@x12i/ai-profiles@2.1.0`.
|
|
312
|
+
- [ ] `resolveXynthesisModel("cheap", { source: "bundled" })` returns a wire model id (no `UNKNOWN_PROFILE_CHOICE`).
|
|
313
|
+
- [ ] `assertKnownModelAlias("cheap")` does not throw; `assertKnownModelAlias("not-a-profile")` throws.
|
|
314
|
+
- [ ] `isKnownProfileOrShortcut` is **not** exported from `@exellix/xynthesis` root.
|
|
315
|
+
- [ ] CHANGELOG entry; publish **4.3.1** (patch).
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## Related
|
|
320
|
+
|
|
321
|
+
- [`@exellix/ai-tasks` `src/utils/aiProfileModelFormat.ts`](../../src/utils/aiProfileModelFormat.ts) — reference implementation
|
|
322
|
+
- [`.docs/ai-tasks-model-profile-aliases-7x.md`](../../.docs/ai-tasks-model-profile-aliases-7x.md) — wire shapes orchestrators send
|
|
323
|
+
- [`BREAKING-CHANGES.md`](../../BREAKING-CHANGES.md) — 8.4.x blocked subsection
|
|
324
|
+
- [`xynthesis-orchestrator-invoke-contract-4.2.md`](./xynthesis-orchestrator-invoke-contract-4.2.md) — invoke contract (reasoningEffort shipped; import fix is separate P0)
|
package/documenations/upstream-feature-requests/xynthesis-orchestrator-invoke-contract-4.2.md
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
# `@exellix/xynthesis` — orchestrator invoke contract fixes (≥ 4.2)
|
|
2
2
|
|
|
3
|
-
Status: **
|
|
3
|
+
Status: **partial** — `reasoningEffort` shipped in **4.3.0**; **runtime break** with `@x12i/ai-profiles` **2.1.0** (see §0)
|
|
4
4
|
Owner: `@exellix/xynthesis`
|
|
5
5
|
Filed by: `@exellix/ai-tasks`
|
|
6
6
|
Consumer: `@exellix/ai-tasks` 8.4.0 (PRE / POST / scoping / utilities / structured synthesis)
|
|
7
|
-
Pinned in ai-tasks today: `@exellix/xynthesis@4.
|
|
7
|
+
Pinned in ai-tasks today: `@exellix/xynthesis@4.3.0`
|
|
8
8
|
|
|
9
9
|
Related (older, partially superseded): [`xynthesis-llm-observability.md`](./xynthesis-llm-observability.md)
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
## 0. Blocker: ai-profiles 2.1 import break — **see dedicated CR**
|
|
14
|
+
|
|
15
|
+
**P0 — tracked in [`xynthesis-ai-profiles-2.1-import-break.md`](./xynthesis-ai-profiles-2.1-import-break.md).**
|
|
16
|
+
|
|
17
|
+
**`@exellix/xynthesis@4.3.0`** breaks `import "@exellix/xynthesis"` with **`@x12i/ai-profiles@2.1.0`** (`isKnownProfileOrShortcut` removed). Fix requires **≥ 4.3.1** with ai-profiles 2.1 resolve-input normalization — not a symbol rename only.
|
|
18
|
+
|
|
19
|
+
**After publish — ai-tasks bump:** `"@exellix/xynthesis": "^4.3.1"`, test, patch release.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
13
23
|
## Summary
|
|
14
24
|
|
|
15
25
|
Xynthesis **4.2** moved token budgeting **inside** the package (`executeXynthesisAction` → `resolveEffectiveMaxTokens` + Optimixer). That is the right design.
|
|
@@ -49,13 +59,12 @@ Remaining gaps for orchestrators (`@exellix/ai-tasks`, graph-engine):
|
|
|
49
59
|
|
|
50
60
|
## Required fixes
|
|
51
61
|
|
|
52
|
-
### 1. Accept `reasoningEffort` on all host-facing hop APIs
|
|
62
|
+
### 1. Accept `reasoningEffort` on all host-facing hop APIs — **shipped in 4.3.0**
|
|
53
63
|
|
|
54
|
-
#### Today
|
|
64
|
+
#### Today (4.3.0)
|
|
55
65
|
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
- `executeXynthesisAction` calls Optimixer with `reasoningEffort: input.reasoningEffort ?? "not-applicable"` — hosts cannot override per call.
|
|
66
|
+
- **`ExecuteXynthesisActionRequest.reasoningEffort`** and **`RunStructuredSynthesisParams.reasoningEffort`** are present and forwarded to Optimixer.
|
|
67
|
+
- ai-tasks forwards `LlmCallConfig.reasoningEffort` on POST steps and structured PRE synthesis.
|
|
59
68
|
|
|
60
69
|
#### Why it hurts
|
|
61
70
|
|
|
@@ -158,6 +167,8 @@ ai-tasks will follow whichever contract is published; default integration is **n
|
|
|
158
167
|
|
|
159
168
|
## Verification checklist (for xynthesis PR)
|
|
160
169
|
|
|
170
|
+
- [ ] Replace `isKnownProfileOrShortcut` → `isKnownProfileChoice` (index re-export + `resolveAiProfileModel` / `assertKnownModelAlias`).
|
|
171
|
+
- [ ] `import "@exellix/xynthesis"` succeeds with `@x12i/ai-profiles@2.1.0` installed.
|
|
161
172
|
- [ ] `ExecuteXynthesisActionRequest.reasoningEffort` (and gateway wrappers).
|
|
162
173
|
- [ ] Optimixer predict receives resolved `reasoningEffort`.
|
|
163
174
|
- [ ] `temperature` + `topP` integration tests on `executeXynthesisAction` + structured gateway.
|