@agentgrader/optimizer 0.1.0 → 0.1.1

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/dist/index.d.ts CHANGED
@@ -4,33 +4,43 @@ import { AgentConfig } from '@agentgrader/core';
4
4
  /**
5
5
  * Each populated array becomes one axis of the cartesian product. Axes left
6
6
  * `undefined` are not varied - their value (if any) comes from `base`.
7
+ *
8
+ * `provider` varies the API gateway per combo (`openrouter`, `openai`,
9
+ * `anthropic`). Pair native model names with the matching provider in `base`
10
+ * or vary `model` and `provider` together only when the cartesian product is
11
+ * intentional (e.g. a single provider value in `dimensions.provider`).
7
12
  */
8
13
  declare const MatrixDimensionsSchema: z.ZodEffects<z.ZodObject<{
9
14
  model: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
15
+ provider: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10
16
  temperature: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
11
17
  system_prompt: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
12
18
  max_steps: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
13
19
  toolkits: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
14
20
  }, "strip", z.ZodTypeAny, {
15
21
  model?: string[] | undefined;
22
+ provider?: string[] | undefined;
16
23
  max_steps?: number[] | undefined;
17
24
  temperature?: number[] | undefined;
18
25
  system_prompt?: string[] | undefined;
19
26
  toolkits?: string[][] | undefined;
20
27
  }, {
21
28
  model?: string[] | undefined;
29
+ provider?: string[] | undefined;
22
30
  max_steps?: number[] | undefined;
23
31
  temperature?: number[] | undefined;
24
32
  system_prompt?: string[] | undefined;
25
33
  toolkits?: string[][] | undefined;
26
34
  }>, {
27
35
  model?: string[] | undefined;
36
+ provider?: string[] | undefined;
28
37
  max_steps?: number[] | undefined;
29
38
  temperature?: number[] | undefined;
30
39
  system_prompt?: string[] | undefined;
31
40
  toolkits?: string[][] | undefined;
32
41
  }, {
33
42
  model?: string[] | undefined;
43
+ provider?: string[] | undefined;
34
44
  max_steps?: number[] | undefined;
35
45
  temperature?: number[] | undefined;
36
46
  system_prompt?: string[] | undefined;
@@ -41,6 +51,7 @@ declare const MatrixSchema: z.ZodObject<{
41
51
  name: z.ZodString;
42
52
  base: z.ZodDefault<z.ZodObject<{
43
53
  model: z.ZodOptional<z.ZodString>;
54
+ provider: z.ZodOptional<z.ZodString>;
44
55
  max_steps: z.ZodOptional<z.ZodNumber>;
45
56
  temperature: z.ZodOptional<z.ZodNumber>;
46
57
  system_prompt: z.ZodOptional<z.ZodString>;
@@ -48,6 +59,7 @@ declare const MatrixSchema: z.ZodObject<{
48
59
  toolkits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
49
60
  }, "strip", z.ZodTypeAny, {
50
61
  model?: string | undefined;
62
+ provider?: string | undefined;
51
63
  max_steps?: number | undefined;
52
64
  temperature?: number | undefined;
53
65
  system_prompt?: string | undefined;
@@ -55,6 +67,7 @@ declare const MatrixSchema: z.ZodObject<{
55
67
  toolkits?: string[] | undefined;
56
68
  }, {
57
69
  model?: string | undefined;
70
+ provider?: string | undefined;
58
71
  max_steps?: number | undefined;
59
72
  temperature?: number | undefined;
60
73
  system_prompt?: string | undefined;
@@ -63,30 +76,35 @@ declare const MatrixSchema: z.ZodObject<{
63
76
  }>>;
64
77
  dimensions: z.ZodEffects<z.ZodObject<{
65
78
  model: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
79
+ provider: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
66
80
  temperature: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
67
81
  system_prompt: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
68
82
  max_steps: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
69
83
  toolkits: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
70
84
  }, "strip", z.ZodTypeAny, {
71
85
  model?: string[] | undefined;
86
+ provider?: string[] | undefined;
72
87
  max_steps?: number[] | undefined;
73
88
  temperature?: number[] | undefined;
74
89
  system_prompt?: string[] | undefined;
75
90
  toolkits?: string[][] | undefined;
76
91
  }, {
77
92
  model?: string[] | undefined;
93
+ provider?: string[] | undefined;
78
94
  max_steps?: number[] | undefined;
79
95
  temperature?: number[] | undefined;
80
96
  system_prompt?: string[] | undefined;
81
97
  toolkits?: string[][] | undefined;
82
98
  }>, {
83
99
  model?: string[] | undefined;
100
+ provider?: string[] | undefined;
84
101
  max_steps?: number[] | undefined;
85
102
  temperature?: number[] | undefined;
86
103
  system_prompt?: string[] | undefined;
87
104
  toolkits?: string[][] | undefined;
88
105
  }, {
89
106
  model?: string[] | undefined;
107
+ provider?: string[] | undefined;
90
108
  max_steps?: number[] | undefined;
91
109
  temperature?: number[] | undefined;
92
110
  system_prompt?: string[] | undefined;
@@ -96,6 +114,7 @@ declare const MatrixSchema: z.ZodObject<{
96
114
  name: string;
97
115
  base: {
98
116
  model?: string | undefined;
117
+ provider?: string | undefined;
99
118
  max_steps?: number | undefined;
100
119
  temperature?: number | undefined;
101
120
  system_prompt?: string | undefined;
@@ -104,6 +123,7 @@ declare const MatrixSchema: z.ZodObject<{
104
123
  };
105
124
  dimensions: {
106
125
  model?: string[] | undefined;
126
+ provider?: string[] | undefined;
107
127
  max_steps?: number[] | undefined;
108
128
  temperature?: number[] | undefined;
109
129
  system_prompt?: string[] | undefined;
@@ -113,6 +133,7 @@ declare const MatrixSchema: z.ZodObject<{
113
133
  name: string;
114
134
  dimensions: {
115
135
  model?: string[] | undefined;
136
+ provider?: string[] | undefined;
116
137
  max_steps?: number[] | undefined;
117
138
  temperature?: number[] | undefined;
118
139
  system_prompt?: string[] | undefined;
@@ -120,6 +141,7 @@ declare const MatrixSchema: z.ZodObject<{
120
141
  };
121
142
  base?: {
122
143
  model?: string | undefined;
144
+ provider?: string | undefined;
123
145
  max_steps?: number | undefined;
124
146
  temperature?: number | undefined;
125
147
  system_prompt?: string | undefined;
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ import { z } from 'zod';
3
3
  // src/matrix.ts
4
4
  var MatrixBaseSchema = z.object({
5
5
  model: z.string().optional(),
6
+ provider: z.string().optional(),
6
7
  max_steps: z.number().optional(),
7
8
  temperature: z.number().optional(),
8
9
  system_prompt: z.string().optional(),
@@ -11,6 +12,7 @@ var MatrixBaseSchema = z.object({
11
12
  });
12
13
  var MatrixDimensionsSchema = z.object({
13
14
  model: z.array(z.string()).optional(),
15
+ provider: z.array(z.string()).optional(),
14
16
  temperature: z.array(z.number()).optional(),
15
17
  system_prompt: z.array(z.string()).optional(),
16
18
  max_steps: z.array(z.number()).optional(),
@@ -56,6 +58,8 @@ function expandMatrix(matrix) {
56
58
  if (temperature !== void 0) config.temperature = temperature;
57
59
  const systemPrompt = combo.system_prompt ?? base.system_prompt;
58
60
  if (systemPrompt !== void 0) config.system_prompt = systemPrompt;
61
+ const provider = combo.provider ?? base.provider;
62
+ if (provider !== void 0) config.provider = provider;
59
63
  const toolkits = combo.toolkits ?? base.toolkits;
60
64
  if (toolkits !== void 0) config.toolkits = toolkits;
61
65
  if (base.tools !== void 0) config.tools = base.tools;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentgrader/optimizer",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Architecture optimizer for the Agentgrader framework: agent-config matrix expansion, result aggregation, and Pareto-front analysis",
5
5
  "license": "MIT",
6
6
  "type": "module",