@exellix/ai-skills 7.0.16 → 7.0.18

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.
@@ -1,11 +1,9 @@
1
1
  import type { OptimixerModelProfile } from "@x12i/optimixer";
2
2
  import type { ModelConfig } from "../types.js";
3
3
  /**
4
- * Map a gateway wire / catalog model id to Optimixer `{ provider, model }`.
5
- *
6
- * Ownership: provider + model identity come from `@x12i/ai-profiles` (catalog / gateway wire
7
- * normalizer) or an explicit `modelConfig.provider`. This package does **not** guess vendors
8
- * from SKU keywords (`gpt-`, `claude`, `gemini`, …).
4
+ * @deprecated Prefer {@link buildOptimixerModelProfileFromModelConfig} which passes `wireModel`
5
+ * to Optimixer 3.6+ (ai-profiles resolves identity inside Optimixer). Kept for callers that still
6
+ * need an explicit `{ provider, model }` pair.
9
7
  */
10
8
  export declare function splitGatewayWireModelForOptimixer(wire: string, explicitProvider?: string): {
11
9
  provider: string;
@@ -15,14 +13,16 @@ export type BuildOptimixerModelProfileArgs = {
15
13
  modelConfig: ModelConfig | undefined;
16
14
  /**
17
15
  * From ai-profiles resolution (`modelSignals.isReasoningModel`).
18
- * When omitted, falls back to `@x12i/ai-profiles` `isReasoningModel(wire)` — never local heuristics.
16
+ * When omitted, Optimixer 3.6+ resolves reasoning via ai-profiles from `wireModel`.
17
+ * When provided, forwarded as `reasoning.enabled`.
19
18
  */
20
19
  supportsReasoning?: boolean;
21
20
  };
22
21
  /**
23
22
  * Build Optimixer `modelProfile` from resolved {@link ModelConfig}.
24
- * Rejects unresolved profile/choice aliases — callers must resolve before Optimixer predict.
25
- * Reasoning flags come only from ai-profiles (caller or `isReasoningModel`).
23
+ *
24
+ * Optimixer **≥ 3.6.0** owns provider/model identity via `wireModel` + `@x12i/ai-profiles`.
25
+ * This package does not invent vendors from SKU keywords.
26
26
  */
27
27
  export declare function buildOptimixerModelProfileFromModelConfig(args: BuildOptimixerModelProfileArgs): OptimixerModelProfile | undefined;
28
28
  //# sourceMappingURL=build-optimixer-model-profile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-optimixer-model-profile.d.ts","sourceRoot":"","sources":["../../src/optimixer/build-optimixer-model-profile.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAG7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,MAAM,EACZ,gBAAgB,CAAC,EAAE,MAAM,GACxB;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAsCrC;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;IACrC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,yCAAyC,CACvD,IAAI,EAAE,8BAA8B,GACnC,qBAAqB,GAAG,SAAS,CAqCnC"}
1
+ {"version":3,"file":"build-optimixer-model-profile.d.ts","sourceRoot":"","sources":["../../src/optimixer/build-optimixer-model-profile.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAG7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C;;;;GAIG;AACH,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,MAAM,EACZ,gBAAgB,CAAC,EAAE,MAAM,GACxB;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAsCrC;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;IACrC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,yCAAyC,CACvD,IAAI,EAAE,8BAA8B,GACnC,qBAAqB,GAAG,SAAS,CAqCnC"}
@@ -3,11 +3,9 @@ import { isResolvableModelAlias } from "../invocation/aiProfileModelFormat.js";
3
3
  import { throwSkillModelResolutionError } from "../errors/skillModelResolutionError.js";
4
4
  import { resolveWireModelFromModelConfig } from "../utils/validate-model-config-for-invoke.js";
5
5
  /**
6
- * Map a gateway wire / catalog model id to Optimixer `{ provider, model }`.
7
- *
8
- * Ownership: provider + model identity come from `@x12i/ai-profiles` (catalog / gateway wire
9
- * normalizer) or an explicit `modelConfig.provider`. This package does **not** guess vendors
10
- * from SKU keywords (`gpt-`, `claude`, `gemini`, …).
6
+ * @deprecated Prefer {@link buildOptimixerModelProfileFromModelConfig} which passes `wireModel`
7
+ * to Optimixer 3.6+ (ai-profiles resolves identity inside Optimixer). Kept for callers that still
8
+ * need an explicit `{ provider, model }` pair.
11
9
  */
12
10
  export function splitGatewayWireModelForOptimixer(wire, explicitProvider) {
13
11
  const trimmed = wire.trim();
@@ -37,12 +35,13 @@ export function splitGatewayWireModelForOptimixer(wire, explicitProvider) {
37
35
  if (providerOverride) {
38
36
  return { provider: providerOverride, model: trimmed };
39
37
  }
40
- throw new Error(`Cannot derive Optimixer provider/model from "${trimmed}" without a catalog match or modelConfig.provider. Vendor-name guessing is not supported — resolve via @x12i/ai-profiles or pass provider explicitly.`);
38
+ throw new Error(`Cannot derive Optimixer provider/model from "${trimmed}" without a catalog match or modelConfig.provider. Prefer Optimixer modelProfile.wireModel (3.6+) so @x12i/ai-profiles owns identity.`);
41
39
  }
42
40
  /**
43
41
  * Build Optimixer `modelProfile` from resolved {@link ModelConfig}.
44
- * Rejects unresolved profile/choice aliases — callers must resolve before Optimixer predict.
45
- * Reasoning flags come only from ai-profiles (caller or `isReasoningModel`).
42
+ *
43
+ * Optimixer **≥ 3.6.0** owns provider/model identity via `wireModel` + `@x12i/ai-profiles`.
44
+ * This package does not invent vendors from SKU keywords.
46
45
  */
47
46
  export function buildOptimixerModelProfileFromModelConfig(args) {
48
47
  const wire = resolveWireModelFromModelConfig(args.modelConfig);
@@ -51,29 +50,30 @@ export function buildOptimixerModelProfileFromModelConfig(args) {
51
50
  if (isResolvableModelAlias(wire)) {
52
51
  throwSkillModelResolutionError(wire, `Cannot predict max tokens for unresolved model alias "${wire}". Resolve profile/choice to a concrete provider model id before Optimixer predict.`, "modelConfig.model");
53
52
  }
54
- const split = splitGatewayWireModelForOptimixer(wire, args.modelConfig?.provider);
55
- let reasoningEnabled;
53
+ const profile = {
54
+ wireModel: wire,
55
+ };
56
+ const explicitProvider = args.modelConfig?.provider?.trim();
57
+ if (explicitProvider) {
58
+ profile.provider = explicitProvider;
59
+ }
56
60
  if (args.supportsReasoning === true) {
57
- reasoningEnabled = true;
61
+ profile.reasoning = { enabled: true };
58
62
  }
59
63
  else if (args.supportsReasoning === false) {
60
- reasoningEnabled = false;
64
+ profile.reasoning = { enabled: false };
61
65
  }
62
66
  else {
67
+ // Optional hint only — Optimixer also resolves via ai-profiles from wireModel.
63
68
  try {
64
- reasoningEnabled = isReasoningModel(wire) === true ? true : undefined;
69
+ if (isReasoningModel(wire) === true) {
70
+ profile.reasoning = { enabled: true };
71
+ }
65
72
  }
66
73
  catch {
67
- reasoningEnabled = undefined;
74
+ /* leave unset */
68
75
  }
69
76
  }
70
- const profile = {
71
- provider: split.provider,
72
- model: split.model,
73
- };
74
- if (reasoningEnabled === true) {
75
- profile.reasoning = { enabled: true };
76
- }
77
77
  return profile;
78
78
  }
79
79
  //# sourceMappingURL=build-optimixer-model-profile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-optimixer-model-profile.js","sourceRoot":"","sources":["../../src/optimixer/build-optimixer-model-profile.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAA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AI,EAAE,CAAC;YACxC,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,iBAAiB;QACnB,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exellix/ai-skills",
3
- "version": "7.0.16",
3
+ "version": "7.0.18",
4
4
  "description": "Foundational skill execution layer for exellix ecosystem using @x12i/ai-gateway with FlexMD 2.0 support and Catalox as the catalog store",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -61,9 +61,9 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "@exellix/catalox-ai-skills": "^1.0.5",
64
- "@x12i/activix": "^9.0.4",
65
- "@x12i/ai-gateway": "^11.1.1",
66
- "@x12i/ai-profiles": "^4.2.1",
64
+ "@x12i/activix": "^9.0.5",
65
+ "@x12i/ai-gateway": "^11.1.3",
66
+ "@x12i/ai-profiles": "^4.3.0",
67
67
  "@x12i/catalox": "^5.10.1",
68
68
  "@x12i/env": "^4.0.3",
69
69
  "@x12i/execution-memory-manager": "^1.2.0",
@@ -71,7 +71,7 @@
71
71
  "@x12i/graphenix-executable-contracts": "^2.17.0",
72
72
  "@x12i/graphenix-plan-format": "^2.17.0",
73
73
  "@x12i/logxer": "^5.1.0",
74
- "@x12i/optimixer": "^3.5.3",
74
+ "@x12i/optimixer": "^3.6.0",
75
75
  "@x12i/rendrix": "^4.3.0",
76
76
  "nx-helpers": "^1.5.1"
77
77
  },