ai-model-advisor-mcp 2.2.2 → 2.3.0
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 +17 -2
- package/build/server.d.ts +106 -0
- package/build/server.d.ts.map +1 -1
- package/build/server.js +54 -0
- package/build/server.js.map +1 -1
- package/build/tools/select.d.ts +113 -0
- package/build/tools/select.d.ts.map +1 -0
- package/build/tools/select.js +371 -0
- package/build/tools/select.js.map +1 -0
- package/package.json +3 -2
- package/build/data/fal-pricing.d.ts +0 -15
- package/build/data/fal-pricing.d.ts.map +0 -1
- package/build/data/fal-pricing.js +0 -145
- package/build/data/fal-pricing.js.map +0 -1
- package/build/data/fireworks-pricing.d.ts +0 -14
- package/build/data/fireworks-pricing.d.ts.map +0 -1
- package/build/data/fireworks-pricing.js +0 -57
- package/build/data/fireworks-pricing.js.map +0 -1
- package/build/data/replicate-pricing.d.ts +0 -16
- package/build/data/replicate-pricing.d.ts.map +0 -1
- package/build/data/replicate-pricing.js +0 -71
- package/build/data/replicate-pricing.js.map +0 -1
- package/build/data/together-pricing.d.ts +0 -14
- package/build/data/together-pricing.d.ts.map +0 -1
- package/build/data/together-pricing.js +0 -73
- package/build/data/together-pricing.js.map +0 -1
- package/build/providers/fal.d.ts +0 -3
- package/build/providers/fal.d.ts.map +0 -1
- package/build/providers/fal.js +0 -168
- package/build/providers/fal.js.map +0 -1
- package/build/providers/fireworks.d.ts +0 -3
- package/build/providers/fireworks.d.ts.map +0 -1
- package/build/providers/fireworks.js +0 -75
- package/build/providers/fireworks.js.map +0 -1
- package/build/providers/openrouter.d.ts +0 -3
- package/build/providers/openrouter.d.ts.map +0 -1
- package/build/providers/openrouter.js +0 -78
- package/build/providers/openrouter.js.map +0 -1
- package/build/providers/replicate.d.ts +0 -3
- package/build/providers/replicate.d.ts.map +0 -1
- package/build/providers/replicate.js +0 -129
- package/build/providers/replicate.js.map +0 -1
- package/build/providers/together.d.ts +0 -3
- package/build/providers/together.d.ts.map +0 -1
- package/build/providers/together.js +0 -93
- package/build/providers/together.js.map +0 -1
package/README.md
CHANGED
|
@@ -44,7 +44,22 @@ The server works **entirely out-of-the-box**. Just add it to your MCP settings a
|
|
|
44
44
|
|
|
45
45
|
That's it! Live pricing for **all 1,000+ models** across all 5 providers is fetched automatically using our hosted Cloudflare Worker Pricing API. No API keys, no environment variables, no setup.
|
|
46
46
|
|
|
47
|
-
## Tools (
|
|
47
|
+
## Tools (9 total)
|
|
48
|
+
|
|
49
|
+
### 🧭 `select_model_for_project` ⭐ NEW
|
|
50
|
+
|
|
51
|
+
One call for agents that already have project context. Returns the best overall model, cheapest acceptable model, and best value option without forcing the agent to manually chain several tools.
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
select_model_for_project({
|
|
55
|
+
project: "TypeScript MCP server for coding agents",
|
|
56
|
+
task: "coding assistant",
|
|
57
|
+
requirements: ["coding", "reasoning", "tool_use"],
|
|
58
|
+
expected_usage: { input_tokens: 5000000, output_tokens: 1000000 }
|
|
59
|
+
})
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The server searches the catalog behind the scenes and returns a compact decision with model IDs, provider, price, quality tier, reasons, tradeoffs, and structured output that agents can parse.
|
|
48
63
|
|
|
49
64
|
### 🏷️ `find_cheapest_provider` ⭐ NEW
|
|
50
65
|
|
|
@@ -175,7 +190,7 @@ Agent → MCP Server → Cloudflare Worker Pricing API (Our Hosted Backend)
|
|
|
175
190
|
└─ Fetches from Fireworks AI (12+ models)
|
|
176
191
|
|
|
177
192
|
Unified Model Registry
|
|
178
|
-
→ recommend, compare, list, info, estimate, shop, batch
|
|
193
|
+
→ select, recommend, compare, list, info, estimate, shop, batch
|
|
179
194
|
```
|
|
180
195
|
|
|
181
196
|
The MCP Server connects to our blazing-fast Cloudflare Worker that aggregates live pricing data across all 5 providers on a recurring 6-hour cron schedule. This gives your agent real-time pricing awareness without requiring you to juggle 5 different API keys.
|
package/build/server.d.ts
CHANGED
|
@@ -1,5 +1,83 @@
|
|
|
1
1
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
2
|
export declare const TOOL_DEFINITIONS: ({
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object";
|
|
7
|
+
properties: {
|
|
8
|
+
project: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
task: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
requirements: {
|
|
17
|
+
type: string;
|
|
18
|
+
items: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
budget: {
|
|
24
|
+
type: string;
|
|
25
|
+
description: string;
|
|
26
|
+
enum: string[];
|
|
27
|
+
};
|
|
28
|
+
optimization_goal: {
|
|
29
|
+
type: string;
|
|
30
|
+
description: string;
|
|
31
|
+
enum: string[];
|
|
32
|
+
};
|
|
33
|
+
expected_usage: {
|
|
34
|
+
type: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
limit: {
|
|
38
|
+
type: string;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
model_ids?: undefined;
|
|
42
|
+
category?: undefined;
|
|
43
|
+
provider?: undefined;
|
|
44
|
+
capability?: undefined;
|
|
45
|
+
max_price?: undefined;
|
|
46
|
+
model_id?: undefined;
|
|
47
|
+
usage?: undefined;
|
|
48
|
+
since?: undefined;
|
|
49
|
+
model?: undefined;
|
|
50
|
+
};
|
|
51
|
+
required?: undefined;
|
|
52
|
+
};
|
|
53
|
+
outputSchema: {
|
|
54
|
+
type: "object";
|
|
55
|
+
properties: {
|
|
56
|
+
query: {
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
59
|
+
best_overall: {
|
|
60
|
+
type: string;
|
|
61
|
+
};
|
|
62
|
+
cheapest_acceptable: {
|
|
63
|
+
type: string;
|
|
64
|
+
};
|
|
65
|
+
best_value: {
|
|
66
|
+
type: string;
|
|
67
|
+
};
|
|
68
|
+
candidates: {
|
|
69
|
+
type: string;
|
|
70
|
+
items: {
|
|
71
|
+
type: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
cost_basis: {
|
|
75
|
+
type: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
required: string[];
|
|
79
|
+
};
|
|
80
|
+
} | {
|
|
3
81
|
name: string;
|
|
4
82
|
description: string;
|
|
5
83
|
inputSchema: {
|
|
@@ -25,6 +103,9 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
25
103
|
type: string;
|
|
26
104
|
description: string;
|
|
27
105
|
};
|
|
106
|
+
project?: undefined;
|
|
107
|
+
optimization_goal?: undefined;
|
|
108
|
+
expected_usage?: undefined;
|
|
28
109
|
model_ids?: undefined;
|
|
29
110
|
category?: undefined;
|
|
30
111
|
provider?: undefined;
|
|
@@ -37,6 +118,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
37
118
|
};
|
|
38
119
|
required: string[];
|
|
39
120
|
};
|
|
121
|
+
outputSchema?: undefined;
|
|
40
122
|
} | {
|
|
41
123
|
name: string;
|
|
42
124
|
description: string;
|
|
@@ -50,9 +132,12 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
50
132
|
};
|
|
51
133
|
description: string;
|
|
52
134
|
};
|
|
135
|
+
project?: undefined;
|
|
53
136
|
task?: undefined;
|
|
54
137
|
requirements?: undefined;
|
|
55
138
|
budget?: undefined;
|
|
139
|
+
optimization_goal?: undefined;
|
|
140
|
+
expected_usage?: undefined;
|
|
56
141
|
limit?: undefined;
|
|
57
142
|
category?: undefined;
|
|
58
143
|
provider?: undefined;
|
|
@@ -65,6 +150,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
65
150
|
};
|
|
66
151
|
required: string[];
|
|
67
152
|
};
|
|
153
|
+
outputSchema?: undefined;
|
|
68
154
|
} | {
|
|
69
155
|
name: string;
|
|
70
156
|
description: string;
|
|
@@ -92,9 +178,12 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
92
178
|
type: string;
|
|
93
179
|
description: string;
|
|
94
180
|
};
|
|
181
|
+
project?: undefined;
|
|
95
182
|
task?: undefined;
|
|
96
183
|
requirements?: undefined;
|
|
97
184
|
budget?: undefined;
|
|
185
|
+
optimization_goal?: undefined;
|
|
186
|
+
expected_usage?: undefined;
|
|
98
187
|
model_ids?: undefined;
|
|
99
188
|
model_id?: undefined;
|
|
100
189
|
usage?: undefined;
|
|
@@ -103,6 +192,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
103
192
|
};
|
|
104
193
|
required?: undefined;
|
|
105
194
|
};
|
|
195
|
+
outputSchema?: undefined;
|
|
106
196
|
} | {
|
|
107
197
|
name: string;
|
|
108
198
|
description: string;
|
|
@@ -113,9 +203,12 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
113
203
|
type: string;
|
|
114
204
|
description: string;
|
|
115
205
|
};
|
|
206
|
+
project?: undefined;
|
|
116
207
|
task?: undefined;
|
|
117
208
|
requirements?: undefined;
|
|
118
209
|
budget?: undefined;
|
|
210
|
+
optimization_goal?: undefined;
|
|
211
|
+
expected_usage?: undefined;
|
|
119
212
|
limit?: undefined;
|
|
120
213
|
model_ids?: undefined;
|
|
121
214
|
category?: undefined;
|
|
@@ -128,6 +221,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
128
221
|
};
|
|
129
222
|
required: string[];
|
|
130
223
|
};
|
|
224
|
+
outputSchema?: undefined;
|
|
131
225
|
} | {
|
|
132
226
|
name: string;
|
|
133
227
|
description: string;
|
|
@@ -142,9 +236,12 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
142
236
|
type: string;
|
|
143
237
|
description: string;
|
|
144
238
|
};
|
|
239
|
+
project?: undefined;
|
|
145
240
|
task?: undefined;
|
|
146
241
|
requirements?: undefined;
|
|
147
242
|
budget?: undefined;
|
|
243
|
+
optimization_goal?: undefined;
|
|
244
|
+
expected_usage?: undefined;
|
|
148
245
|
limit?: undefined;
|
|
149
246
|
model_ids?: undefined;
|
|
150
247
|
category?: undefined;
|
|
@@ -156,6 +253,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
156
253
|
};
|
|
157
254
|
required: string[];
|
|
158
255
|
};
|
|
256
|
+
outputSchema?: undefined;
|
|
159
257
|
} | {
|
|
160
258
|
name: string;
|
|
161
259
|
description: string;
|
|
@@ -174,9 +272,12 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
174
272
|
type: string;
|
|
175
273
|
description: string;
|
|
176
274
|
};
|
|
275
|
+
project?: undefined;
|
|
177
276
|
task?: undefined;
|
|
178
277
|
requirements?: undefined;
|
|
179
278
|
budget?: undefined;
|
|
279
|
+
optimization_goal?: undefined;
|
|
280
|
+
expected_usage?: undefined;
|
|
180
281
|
model_ids?: undefined;
|
|
181
282
|
provider?: undefined;
|
|
182
283
|
capability?: undefined;
|
|
@@ -187,6 +288,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
187
288
|
};
|
|
188
289
|
required?: undefined;
|
|
189
290
|
};
|
|
291
|
+
outputSchema?: undefined;
|
|
190
292
|
} | {
|
|
191
293
|
name: string;
|
|
192
294
|
description: string;
|
|
@@ -197,9 +299,12 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
197
299
|
type: string;
|
|
198
300
|
description: string;
|
|
199
301
|
};
|
|
302
|
+
project?: undefined;
|
|
200
303
|
task?: undefined;
|
|
201
304
|
requirements?: undefined;
|
|
202
305
|
budget?: undefined;
|
|
306
|
+
optimization_goal?: undefined;
|
|
307
|
+
expected_usage?: undefined;
|
|
203
308
|
limit?: undefined;
|
|
204
309
|
model_ids?: undefined;
|
|
205
310
|
category?: undefined;
|
|
@@ -212,6 +317,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
212
317
|
};
|
|
213
318
|
required: string[];
|
|
214
319
|
};
|
|
320
|
+
outputSchema?: undefined;
|
|
215
321
|
})[];
|
|
216
322
|
export declare function createServer(): Server;
|
|
217
323
|
//# sourceMappingURL=server.d.ts.map
|
package/build/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAmBnE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwO5B,CAAC;AAoBF,wBAAgB,YAAY,IAAI,MAAM,CAqBrC"}
|
package/build/server.js
CHANGED
|
@@ -9,8 +9,61 @@ import { handleEstimateCost } from "./tools/estimate.js";
|
|
|
9
9
|
import { handleWhatsNew } from "./tools/discover.js";
|
|
10
10
|
import { handleFindCheapestProvider } from "./tools/shop.js";
|
|
11
11
|
import { handleBatchGetPricing } from "./tools/batch.js";
|
|
12
|
+
import { handleSelectModelForProject } from "./tools/select.js";
|
|
12
13
|
// ─── Tool Definitions ───────────────────────────────────────────────────────
|
|
13
14
|
export const TOOL_DEFINITIONS = [
|
|
15
|
+
{
|
|
16
|
+
name: "select_model_for_project",
|
|
17
|
+
description: "Pick the best overall, cheapest acceptable, and best value AI model for a project. Use this when an agent has project context and needs one decision instead of manually chaining recommend, compare, pricing, and cost tools. Returns concise markdown plus structured fields with candidates, scores, reasons, pricing, and tradeoffs.",
|
|
18
|
+
inputSchema: {
|
|
19
|
+
type: "object",
|
|
20
|
+
properties: {
|
|
21
|
+
project: {
|
|
22
|
+
type: "string",
|
|
23
|
+
description: 'Project or repository context. Example: "TypeScript MCP server that needs a coding/reasoning model for agent workflows"',
|
|
24
|
+
},
|
|
25
|
+
task: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: 'Optional specific task. Examples: "coding assistant", "image generation", "video generation", "transcription"',
|
|
28
|
+
},
|
|
29
|
+
requirements: {
|
|
30
|
+
type: "array",
|
|
31
|
+
items: { type: "string" },
|
|
32
|
+
description: 'Optional requirements. Examples: ["coding", "reasoning", "tool_use", "vision", "fast", "long_context"]',
|
|
33
|
+
},
|
|
34
|
+
budget: {
|
|
35
|
+
type: "string",
|
|
36
|
+
description: 'Optional budget constraint: "free", "low", or omit for any price',
|
|
37
|
+
enum: ["free", "low", "any"],
|
|
38
|
+
},
|
|
39
|
+
optimization_goal: {
|
|
40
|
+
type: "string",
|
|
41
|
+
description: 'Optional ranking goal for the candidate list: "balanced" (default), "best", or "cheapest"',
|
|
42
|
+
enum: ["balanced", "best", "cheapest"],
|
|
43
|
+
},
|
|
44
|
+
expected_usage: {
|
|
45
|
+
type: "object",
|
|
46
|
+
description: "Optional usage estimate for cost-aware ranking. LLMs: {input_tokens, output_tokens, requests}. Media: {images, seconds, units, requests}",
|
|
47
|
+
},
|
|
48
|
+
limit: {
|
|
49
|
+
type: "number",
|
|
50
|
+
description: "Max candidate rows to return (default: 5, max: 20)",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
outputSchema: {
|
|
55
|
+
type: "object",
|
|
56
|
+
properties: {
|
|
57
|
+
query: { type: "object" },
|
|
58
|
+
best_overall: { type: "object" },
|
|
59
|
+
cheapest_acceptable: { type: "object" },
|
|
60
|
+
best_value: { type: "object" },
|
|
61
|
+
candidates: { type: "array", items: { type: "object" } },
|
|
62
|
+
cost_basis: { type: "string" },
|
|
63
|
+
},
|
|
64
|
+
required: ["query", "candidates"],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
14
67
|
{
|
|
15
68
|
name: "recommend_model",
|
|
16
69
|
description: "Recommend the best AI model for a task. Searches across 1000+ models spanning LLMs, image gen, video gen, TTS, STT, 3D, and more from 5 providers (OpenRouter, fal.ai, Together AI, Replicate, Fireworks). Returns ranked results based on task match, capabilities, quality tier, price, speed (TTFT/throughput), and intelligence benchmarks (MMLU/coding).",
|
|
@@ -168,6 +221,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
168
221
|
},
|
|
169
222
|
];
|
|
170
223
|
const HANDLER_MAP = {
|
|
224
|
+
select_model_for_project: handleSelectModelForProject,
|
|
171
225
|
recommend_model: handleRecommendModel,
|
|
172
226
|
compare_models: handleCompareModels,
|
|
173
227
|
list_models: handleListModels,
|
package/build/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,0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,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,IAAI,EAAE,CAA4B,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { ModelCategory, UnifiedModel } from "../types.js";
|
|
2
|
+
type SelectionGoal = "balanced" | "best" | "cheapest";
|
|
3
|
+
type Budget = "any" | "free" | "low";
|
|
4
|
+
interface UsageEstimate {
|
|
5
|
+
input_tokens?: number;
|
|
6
|
+
prompt_tokens?: number;
|
|
7
|
+
output_tokens?: number;
|
|
8
|
+
completion_tokens?: number;
|
|
9
|
+
requests?: number;
|
|
10
|
+
units?: number;
|
|
11
|
+
images?: number;
|
|
12
|
+
seconds?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function handleSelectModelForProject(models: UnifiedModel[], args: Record<string, unknown>): {
|
|
15
|
+
content: {
|
|
16
|
+
type: "text";
|
|
17
|
+
text: string;
|
|
18
|
+
}[];
|
|
19
|
+
isError: boolean;
|
|
20
|
+
structuredContent?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
content: {
|
|
23
|
+
type: "text";
|
|
24
|
+
text: string;
|
|
25
|
+
}[];
|
|
26
|
+
structuredContent: {
|
|
27
|
+
query: {
|
|
28
|
+
project: string;
|
|
29
|
+
task: string;
|
|
30
|
+
requirements: string[];
|
|
31
|
+
budget: Budget;
|
|
32
|
+
optimization_goal: SelectionGoal;
|
|
33
|
+
};
|
|
34
|
+
candidates: never[];
|
|
35
|
+
};
|
|
36
|
+
isError?: undefined;
|
|
37
|
+
} | {
|
|
38
|
+
content: {
|
|
39
|
+
type: "text";
|
|
40
|
+
text: string;
|
|
41
|
+
}[];
|
|
42
|
+
structuredContent: {
|
|
43
|
+
query: {
|
|
44
|
+
project: string;
|
|
45
|
+
task: string;
|
|
46
|
+
requirements: string[];
|
|
47
|
+
budget: Budget;
|
|
48
|
+
optimization_goal: SelectionGoal;
|
|
49
|
+
inferred_categories: ModelCategory[];
|
|
50
|
+
expected_usage: UsageEstimate;
|
|
51
|
+
};
|
|
52
|
+
best_overall: {
|
|
53
|
+
id: string;
|
|
54
|
+
name: string;
|
|
55
|
+
provider: import("../types.js").ProviderName;
|
|
56
|
+
category: ModelCategory;
|
|
57
|
+
qualityTier: import("../types.js").QualityTier | null;
|
|
58
|
+
pricing: string;
|
|
59
|
+
comparisonPrice: number | null;
|
|
60
|
+
estimatedCost: number | null;
|
|
61
|
+
score: number;
|
|
62
|
+
valueScore: number;
|
|
63
|
+
reasons: string[];
|
|
64
|
+
tradeoffs: string[];
|
|
65
|
+
};
|
|
66
|
+
cheapest_acceptable: {
|
|
67
|
+
id: string;
|
|
68
|
+
name: string;
|
|
69
|
+
provider: import("../types.js").ProviderName;
|
|
70
|
+
category: ModelCategory;
|
|
71
|
+
qualityTier: import("../types.js").QualityTier | null;
|
|
72
|
+
pricing: string;
|
|
73
|
+
comparisonPrice: number | null;
|
|
74
|
+
estimatedCost: number | null;
|
|
75
|
+
score: number;
|
|
76
|
+
valueScore: number;
|
|
77
|
+
reasons: string[];
|
|
78
|
+
tradeoffs: string[];
|
|
79
|
+
};
|
|
80
|
+
best_value: {
|
|
81
|
+
id: string;
|
|
82
|
+
name: string;
|
|
83
|
+
provider: import("../types.js").ProviderName;
|
|
84
|
+
category: ModelCategory;
|
|
85
|
+
qualityTier: import("../types.js").QualityTier | null;
|
|
86
|
+
pricing: string;
|
|
87
|
+
comparisonPrice: number | null;
|
|
88
|
+
estimatedCost: number | null;
|
|
89
|
+
score: number;
|
|
90
|
+
valueScore: number;
|
|
91
|
+
reasons: string[];
|
|
92
|
+
tradeoffs: string[];
|
|
93
|
+
};
|
|
94
|
+
candidates: {
|
|
95
|
+
id: string;
|
|
96
|
+
name: string;
|
|
97
|
+
provider: import("../types.js").ProviderName;
|
|
98
|
+
category: ModelCategory;
|
|
99
|
+
qualityTier: import("../types.js").QualityTier | null;
|
|
100
|
+
pricing: string;
|
|
101
|
+
comparisonPrice: number | null;
|
|
102
|
+
estimatedCost: number | null;
|
|
103
|
+
score: number;
|
|
104
|
+
valueScore: number;
|
|
105
|
+
reasons: string[];
|
|
106
|
+
tradeoffs: string[];
|
|
107
|
+
}[];
|
|
108
|
+
cost_basis: string;
|
|
109
|
+
};
|
|
110
|
+
isError?: undefined;
|
|
111
|
+
};
|
|
112
|
+
export {};
|
|
113
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/tools/select.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE/D,KAAK,aAAa,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC;AACtD,KAAK,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC;AAErC,UAAU,aAAa;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAuTD,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,YAAY,EAAE,EACtB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwG9B"}
|