weave-typescript 0.9.0 → 0.10.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/dist/weaveapi/llmx/v1/architecture.pb.d.ts +298 -10
- package/dist/weaveapi/llmx/v1/capabilities.pb.d.ts +219 -1
- package/dist/weaveapi/llmx/v1/capabilities.pb.js +11 -0
- package/dist/weaveapi/llmx/v1/model.pb.d.ts +236 -52
- package/dist/weaveapi/llmx/v1/pricing.pb.d.ts +229 -31
- package/dist/weaveapi/llmx/v1/pricing.pb.js +140 -14
- package/dist/weaveapi/llmx/v1/provider.pb.d.ts +39 -0
- package/dist/weaveapi/llmx/v1/service.pb.d.ts +158 -11
- package/package.json +1 -1
|
@@ -3,132 +3,250 @@ import { Architecture, Licensing, Safety, TechnicalSpecs, Training } from "./arc
|
|
|
3
3
|
import { Capability } from "./capabilities.pb";
|
|
4
4
|
import { Pricing } from "./pricing.pb";
|
|
5
5
|
export declare const protobufPackage = "weaveapi.llmx.v1";
|
|
6
|
+
/**
|
|
7
|
+
* Model represents a complete AI model with all its metadata, capabilities, and pricing.
|
|
8
|
+
* This is the primary entity for model discovery and comparison.
|
|
9
|
+
*/
|
|
6
10
|
export interface Model {
|
|
7
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Unique internal identifier for this model record in our database.
|
|
13
|
+
* Example: "mdl_01234567-89ab-cdef-0123-456789abcdef"
|
|
14
|
+
* Generated by our system, not provider-specific
|
|
15
|
+
*/
|
|
8
16
|
id: string;
|
|
9
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Provider's unique identifier in our system.
|
|
19
|
+
* Example: "pvd_openai_2024", "pvd_anthropic_2024"
|
|
20
|
+
* Links to Provider entity
|
|
21
|
+
*/
|
|
10
22
|
providerId: string;
|
|
11
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* URL-friendly provider identifier for routing.
|
|
25
|
+
* Examples: "openai", "anthropic", "google", "meta"
|
|
26
|
+
* Used in API paths like /models/openai/gpt-4
|
|
27
|
+
*/
|
|
12
28
|
providerSlug: string;
|
|
13
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Human-readable provider name for display.
|
|
31
|
+
* Examples: "OpenAI", "Anthropic", "Google AI", "Meta AI"
|
|
32
|
+
*/
|
|
14
33
|
providerName: string;
|
|
15
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Provider's specific model identifier as they define it.
|
|
36
|
+
* Examples: "gpt-4-turbo-2024-04-09", "claude-3-opus-20240229"
|
|
37
|
+
* This is what you use in their API calls
|
|
38
|
+
*/
|
|
16
39
|
modelId: string;
|
|
17
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Combined provider/model identifier for unique referencing.
|
|
42
|
+
* Format: "{provider_slug}/{model_id}"
|
|
43
|
+
* Examples: "openai/gpt-4", "anthropic/claude-3-opus"
|
|
44
|
+
*/
|
|
18
45
|
slug: string;
|
|
19
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Model's full technical name from the provider.
|
|
48
|
+
* Examples: "gpt-4-turbo-2024-04-09", "claude-3-opus-20240229"
|
|
49
|
+
* May include version dates or technical details
|
|
50
|
+
*/
|
|
20
51
|
name: string;
|
|
21
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* User-friendly display name for UI presentation.
|
|
54
|
+
* Examples: "GPT-4 Turbo", "Claude 3 Opus", "Gemini Pro"
|
|
55
|
+
* Simplified version of technical name
|
|
56
|
+
*/
|
|
22
57
|
displayName: string;
|
|
23
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Human-readable description of the model's purpose and capabilities.
|
|
60
|
+
* Example: "Most capable GPT-4 model, optimized for complex tasks requiring
|
|
61
|
+
* advanced reasoning, coding, and creative writing. Supports vision, function
|
|
62
|
+
* calling, and JSON mode."
|
|
63
|
+
*/
|
|
24
64
|
description: string;
|
|
25
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Model version string from provider.
|
|
67
|
+
* Examples: "2024-04-09", "v1.0", "preview-0125"
|
|
68
|
+
* May be date-based or semantic versioning
|
|
69
|
+
*/
|
|
26
70
|
version: string;
|
|
27
71
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
72
|
+
* When the model was publicly released by the provider.
|
|
73
|
+
* Example: 2024-04-09 for GPT-4 Turbo April release
|
|
30
74
|
*/
|
|
31
75
|
releaseDate: Date | undefined;
|
|
32
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* Last date of data used in training (knowledge cutoff).
|
|
78
|
+
* Example: 2023-12-01 means model knows events up to this date
|
|
79
|
+
* Important for factual queries and current events
|
|
80
|
+
*/
|
|
33
81
|
trainingDataCutoff: Date | undefined;
|
|
34
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* When the model will be/was deprecated (if scheduled).
|
|
84
|
+
* Example: 2025-01-15 for planned sunset
|
|
85
|
+
* Null if no deprecation planned
|
|
86
|
+
*/
|
|
35
87
|
deprecationDate: Date | undefined;
|
|
36
88
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
89
|
+
* List of specific capabilities this model supports.
|
|
90
|
+
* Examples: text_generation, function_calling, vision, code_interpreter
|
|
91
|
+
* See capabilities.proto for full enumeration
|
|
39
92
|
*/
|
|
40
93
|
capabilities: Capability[];
|
|
41
94
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
95
|
+
* Model type, architecture, and licensing classification.
|
|
96
|
+
* Categorizes the model for filtering and comparison
|
|
44
97
|
*/
|
|
45
98
|
classification: ModelClassification | undefined;
|
|
46
99
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
100
|
+
* Benchmark scores and performance metrics.
|
|
101
|
+
* Standardized scores for comparing model capabilities
|
|
49
102
|
*/
|
|
50
103
|
performance: ModelPerformance | undefined;
|
|
51
104
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
105
|
+
* Token limits, processing speed, and tokenizer information.
|
|
106
|
+
* Critical for understanding model constraints
|
|
54
107
|
*/
|
|
55
108
|
tokens: TokenInfo | undefined;
|
|
56
109
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
110
|
+
* Complete pricing structure for all operations.
|
|
111
|
+
* Includes standard, batch, cached, and tool pricing
|
|
59
112
|
*/
|
|
60
113
|
pricing: Pricing | undefined;
|
|
61
114
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
115
|
+
* Supported parameter ranges for generation.
|
|
116
|
+
* Temperature, top_p, and other sampling parameters
|
|
64
117
|
*/
|
|
65
118
|
configuration: Configuration | undefined;
|
|
66
119
|
/**
|
|
67
|
-
* API
|
|
68
|
-
*
|
|
120
|
+
* API endpoint information and rate limits.
|
|
121
|
+
* Everything needed to call the model programmatically
|
|
69
122
|
*/
|
|
70
123
|
apiDetails: APIDetails | undefined;
|
|
71
124
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
125
|
+
* Available regions and platforms.
|
|
126
|
+
* Where and how the model can be accessed
|
|
74
127
|
*/
|
|
75
128
|
availability: Availability | undefined;
|
|
76
129
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
130
|
+
* Technical architecture information.
|
|
131
|
+
* Transformer type, layer count, attention mechanism, etc.
|
|
79
132
|
*/
|
|
80
133
|
architecture: Architecture | undefined;
|
|
81
134
|
/**
|
|
82
|
-
* Training information
|
|
83
|
-
*
|
|
135
|
+
* Training dataset and methodology information.
|
|
136
|
+
* How the model was trained and on what data
|
|
84
137
|
*/
|
|
85
138
|
training: Training | undefined;
|
|
86
139
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
140
|
+
* Built-in safety features and content filtering.
|
|
141
|
+
* Moderation capabilities and safety guardrails
|
|
89
142
|
*/
|
|
90
143
|
safety: Safety | undefined;
|
|
91
144
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
145
|
+
* License type and usage restrictions.
|
|
146
|
+
* Legal terms for using the model
|
|
94
147
|
*/
|
|
95
148
|
licensing: Licensing | undefined;
|
|
96
149
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
150
|
+
* Hardware requirements and technical details.
|
|
151
|
+
* Memory, compute requirements for self-hosting
|
|
99
152
|
*/
|
|
100
153
|
technicalSpecs: TechnicalSpecs | undefined;
|
|
101
154
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
155
|
+
* When this model information was last updated in our system.
|
|
156
|
+
* Example: 2024-08-25T10:30:00Z
|
|
157
|
+
* For tracking data freshness
|
|
104
158
|
*/
|
|
105
159
|
lastScrapedAt: Date | undefined;
|
|
106
|
-
/**
|
|
160
|
+
/**
|
|
161
|
+
* Sources where this model information was collected from.
|
|
162
|
+
* Examples: ["https://openai.com/pricing", "https://platform.openai.com/docs"]
|
|
163
|
+
* For data provenance and verification
|
|
164
|
+
*/
|
|
107
165
|
dataSources: string[];
|
|
108
|
-
/**
|
|
166
|
+
/**
|
|
167
|
+
* Whether the model is currently available for use.
|
|
168
|
+
* false if model is down, in maintenance, or discontinued
|
|
169
|
+
*/
|
|
109
170
|
isActive: boolean;
|
|
110
|
-
/**
|
|
171
|
+
/**
|
|
172
|
+
* Whether the model has been officially deprecated.
|
|
173
|
+
* true once deprecation_date has passed or provider announces EOL
|
|
174
|
+
*/
|
|
111
175
|
isDeprecated: boolean;
|
|
112
|
-
/**
|
|
176
|
+
/**
|
|
177
|
+
* If deprecated, the recommended replacement model's ID.
|
|
178
|
+
* Example: "mdl_gpt4_turbo_2024" replacing "mdl_gpt4_2023"
|
|
179
|
+
* Helps with migration paths
|
|
180
|
+
*/
|
|
113
181
|
replacementModelId: string;
|
|
114
182
|
}
|
|
183
|
+
/** ModelClassification categorizes models for filtering and comparison. */
|
|
115
184
|
export interface ModelClassification {
|
|
116
|
-
/**
|
|
185
|
+
/**
|
|
186
|
+
* Primary model type defining its training approach.
|
|
187
|
+
* Examples: "foundation", "fine-tuned", "instruct", "chat", "reasoning"
|
|
188
|
+
* "foundation" = base model, "instruct" = instruction-following
|
|
189
|
+
*/
|
|
117
190
|
modelType: string;
|
|
118
|
-
/**
|
|
191
|
+
/**
|
|
192
|
+
* Underlying model architecture family.
|
|
193
|
+
* Examples: "GPT", "LLaMA", "BERT", "T5", "Transformer", "Mamba"
|
|
194
|
+
*/
|
|
119
195
|
architecture: string;
|
|
196
|
+
/**
|
|
197
|
+
* Approximate number of parameters in billions.
|
|
198
|
+
* Examples: 7 (7B), 70 (70B), 175 (175B for GPT-3)
|
|
199
|
+
*/
|
|
120
200
|
parameterCount: number;
|
|
201
|
+
/**
|
|
202
|
+
* Whether model weights are publicly available.
|
|
203
|
+
* true for LLaMA, Mistral; false for GPT-4, Claude
|
|
204
|
+
*/
|
|
121
205
|
isOpenSource: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Software license if open source.
|
|
208
|
+
* Examples: "MIT", "Apache-2.0", "Custom", "Proprietary"
|
|
209
|
+
*/
|
|
122
210
|
licenseType: string;
|
|
123
211
|
}
|
|
212
|
+
/** ModelPerformance captures standardized benchmark scores. */
|
|
124
213
|
export interface ModelPerformance {
|
|
125
|
-
/**
|
|
214
|
+
/**
|
|
215
|
+
* General reasoning ability score (0-10 scale).
|
|
216
|
+
* Based on benchmarks like ARC, HellaSwag, MMLU
|
|
217
|
+
* Example: 8.5 for strong reasoning models
|
|
218
|
+
*/
|
|
126
219
|
reasoningScore: number;
|
|
220
|
+
/**
|
|
221
|
+
* Programming and code generation score (0-10).
|
|
222
|
+
* Based on HumanEval, MBPP benchmarks
|
|
223
|
+
* Example: 9.2 for specialized coding models
|
|
224
|
+
*/
|
|
127
225
|
codingScore: number;
|
|
226
|
+
/**
|
|
227
|
+
* Creative writing and generation score (0-10).
|
|
228
|
+
* Based on human evaluations and creative benchmarks
|
|
229
|
+
* Example: 7.8 for models good at storytelling
|
|
230
|
+
*/
|
|
128
231
|
creativeScore: number;
|
|
232
|
+
/**
|
|
233
|
+
* Factual accuracy and knowledge score (0-10).
|
|
234
|
+
* Based on TruthfulQA, factual benchmarks
|
|
235
|
+
* Example: 8.0 for models with good factual recall
|
|
236
|
+
*/
|
|
129
237
|
factualScore: number;
|
|
238
|
+
/**
|
|
239
|
+
* Mathematical reasoning score (0-10).
|
|
240
|
+
* Based on GSM8K, MATH benchmarks
|
|
241
|
+
* Example: 9.5 for models excelling at math
|
|
242
|
+
*/
|
|
130
243
|
mathScore: number;
|
|
131
|
-
/**
|
|
244
|
+
/**
|
|
245
|
+
* Raw benchmark scores by name.
|
|
246
|
+
* Keys: "mmlu", "humaneval", "gsm8k", "truthfulqa", "arc", "hellaswag"
|
|
247
|
+
* Values: Actual benchmark scores (usually 0-100)
|
|
248
|
+
* Example: {"mmlu": 86.4, "humaneval": 92.0, "gsm8k": 95.0}
|
|
249
|
+
*/
|
|
132
250
|
benchmarkScores: {
|
|
133
251
|
[key: string]: number;
|
|
134
252
|
};
|
|
@@ -137,29 +255,95 @@ export interface ModelPerformance_BenchmarkScoresEntry {
|
|
|
137
255
|
key: string;
|
|
138
256
|
value: number;
|
|
139
257
|
}
|
|
258
|
+
/** TokenInfo describes token limits and processing capabilities. */
|
|
140
259
|
export interface TokenInfo {
|
|
260
|
+
/**
|
|
261
|
+
* Maximum tokens the model can process in a single request.
|
|
262
|
+
* Examples: 4096, 8192, 32768, 128000, 200000
|
|
263
|
+
* Includes both input and output tokens
|
|
264
|
+
*/
|
|
141
265
|
contextWindow: number;
|
|
266
|
+
/**
|
|
267
|
+
* Maximum tokens that can be generated in response.
|
|
268
|
+
* Examples: 4096 for most models, 16384 for some
|
|
269
|
+
* May be less than context_window
|
|
270
|
+
*/
|
|
142
271
|
maxOutputTokens: number;
|
|
272
|
+
/**
|
|
273
|
+
* Tokenizer algorithm used.
|
|
274
|
+
* Examples: "cl100k_base" (GPT-4), "claude", "sentencepiece"
|
|
275
|
+
*/
|
|
143
276
|
tokenizer: string;
|
|
277
|
+
/**
|
|
278
|
+
* Average generation speed in tokens per second.
|
|
279
|
+
* Example: 50 for typical API, 100+ for optimized inference
|
|
280
|
+
* May vary based on load and tier
|
|
281
|
+
*/
|
|
144
282
|
tokensPerSecond: number;
|
|
145
283
|
}
|
|
284
|
+
/** Configuration defines supported generation parameters. */
|
|
146
285
|
export interface Configuration {
|
|
286
|
+
/**
|
|
287
|
+
* Minimum allowed temperature value.
|
|
288
|
+
* Usually 0.0 for deterministic output
|
|
289
|
+
*/
|
|
147
290
|
temperatureMin: number;
|
|
291
|
+
/**
|
|
292
|
+
* Maximum allowed temperature value.
|
|
293
|
+
* Usually 1.0 or 2.0 for high randomness
|
|
294
|
+
*/
|
|
148
295
|
temperatureMax: number;
|
|
296
|
+
/**
|
|
297
|
+
* Default temperature if not specified.
|
|
298
|
+
* Typically 0.7 or 1.0
|
|
299
|
+
*/
|
|
149
300
|
temperatureDefault: number;
|
|
301
|
+
/**
|
|
302
|
+
* Minimum allowed top_p (nucleus sampling).
|
|
303
|
+
* Usually 0.0 to disable
|
|
304
|
+
*/
|
|
150
305
|
topPMin: number;
|
|
306
|
+
/**
|
|
307
|
+
* Maximum allowed top_p value.
|
|
308
|
+
* Usually 1.0 for full vocabulary
|
|
309
|
+
*/
|
|
151
310
|
topPMax: number;
|
|
152
311
|
}
|
|
312
|
+
/** APIDetails provides integration information. */
|
|
153
313
|
export interface APIDetails {
|
|
314
|
+
/**
|
|
315
|
+
* Base API endpoint URL.
|
|
316
|
+
* Example: "https://api.openai.com/v1/chat/completions"
|
|
317
|
+
*/
|
|
154
318
|
endpoint: string;
|
|
319
|
+
/**
|
|
320
|
+
* API version identifier.
|
|
321
|
+
* Examples: "v1", "2024-02-01", "beta"
|
|
322
|
+
*/
|
|
155
323
|
version: string;
|
|
156
|
-
/**
|
|
324
|
+
/**
|
|
325
|
+
* Rate limit in requests per minute.
|
|
326
|
+
* Example: 500 for standard tier, 10000 for enterprise
|
|
327
|
+
*/
|
|
157
328
|
rateLimitRpm: number;
|
|
158
|
-
/**
|
|
329
|
+
/**
|
|
330
|
+
* Rate limit in tokens per minute.
|
|
331
|
+
* Example: 90000 for GPT-4, 200000 for GPT-3.5
|
|
332
|
+
*/
|
|
159
333
|
rateLimitTpm: number;
|
|
160
334
|
}
|
|
335
|
+
/** Availability describes where the model can be accessed. */
|
|
161
336
|
export interface Availability {
|
|
337
|
+
/**
|
|
338
|
+
* Geographic regions where available.
|
|
339
|
+
* Examples: ["us-east-1", "eu-west-1", "asia-pacific"]
|
|
340
|
+
* May use provider-specific region codes
|
|
341
|
+
*/
|
|
162
342
|
regions: string[];
|
|
343
|
+
/**
|
|
344
|
+
* Platforms/services offering the model.
|
|
345
|
+
* Examples: ["api", "playground", "azure", "vertex-ai", "bedrock"]
|
|
346
|
+
*/
|
|
163
347
|
platforms: string[];
|
|
164
348
|
}
|
|
165
349
|
export declare const Model: MessageFns<Model>;
|