weave-typescript 0.9.0 → 0.10.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.
@@ -1,82 +1,228 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  export declare const protobufPackage = "weaveapi.llmx.v1";
3
+ /** PricingCategory defines the type of AI capability being priced. */
3
4
  export declare enum PricingCategory {
5
+ /** PRICING_CATEGORY_UNSPECIFIED - Default/unknown category */
4
6
  PRICING_CATEGORY_UNSPECIFIED = 0,
7
+ /**
8
+ * PRICING_CATEGORY_TEXT - Text generation models (GPT-4, Claude, etc.)
9
+ * Example: GPT-4o, GPT-4o-mini for chat/completion
10
+ */
5
11
  PRICING_CATEGORY_TEXT = 1,
12
+ /**
13
+ * PRICING_CATEGORY_IMAGE - Image understanding/analysis models
14
+ * Example: GPT-4-vision analyzing uploaded images
15
+ */
6
16
  PRICING_CATEGORY_IMAGE = 2,
17
+ /**
18
+ * PRICING_CATEGORY_AUDIO - Audio models for speech-to-text and text-to-speech
19
+ * Example: Whisper for transcription, TTS models for voice synthesis
20
+ */
7
21
  PRICING_CATEGORY_AUDIO = 3,
22
+ /**
23
+ * PRICING_CATEGORY_EMBEDDING - Embedding/vector models
24
+ * Example: text-embedding-3-large for semantic search
25
+ */
8
26
  PRICING_CATEGORY_EMBEDDING = 4,
27
+ /**
28
+ * PRICING_CATEGORY_FINE_TUNING - Fine-tuning costs for training custom models
29
+ * Example: Training GPT-4o-mini-2024-07-18 on custom data
30
+ */
9
31
  PRICING_CATEGORY_FINE_TUNING = 5,
10
- /** PRICING_CATEGORY_TOOL - Built-in or add-on tools (e.g., Web Search, File Search, Code Interpreter) */
32
+ /**
33
+ * PRICING_CATEGORY_TOOL - Built-in or add-on tools and capabilities
34
+ * Example: Web Search ($2/1k calls), Code Interpreter ($0.03/container)
35
+ */
11
36
  PRICING_CATEGORY_TOOL = 6,
12
- /** PRICING_CATEGORY_REALTIME - Realtime/streaming modalities */
37
+ /**
38
+ * PRICING_CATEGORY_REALTIME - Realtime/streaming API pricing
39
+ * Example: WebSocket-based continuous interaction models
40
+ */
13
41
  PRICING_CATEGORY_REALTIME = 7,
14
- /** PRICING_CATEGORY_MODERATION - Moderation models */
42
+ /**
43
+ * PRICING_CATEGORY_MODERATION - Content moderation models
44
+ * Example: OpenAI moderation endpoint for content filtering
45
+ */
15
46
  PRICING_CATEGORY_MODERATION = 8,
16
- /** PRICING_CATEGORY_LEGACY - Legacy pricing entries */
47
+ /**
48
+ * PRICING_CATEGORY_LEGACY - Deprecated/legacy models with special pricing
49
+ * Example: GPT-3.5-turbo-0301 (older version)
50
+ */
17
51
  PRICING_CATEGORY_LEGACY = 9,
18
52
  UNRECOGNIZED = -1
19
53
  }
20
54
  export declare function pricingCategoryFromJSON(object: any): PricingCategory;
21
55
  export declare function pricingCategoryToJSON(object: PricingCategory): string;
56
+ /** PricingTier represents different service levels with varying costs and SLAs. */
22
57
  export declare enum PricingTier {
58
+ /** PRICING_TIER_UNSPECIFIED - Default/unknown tier */
23
59
  PRICING_TIER_UNSPECIFIED = 0,
60
+ /**
61
+ * PRICING_TIER_FREE - Free tier with usage limits
62
+ * Example: Free API credits for new users
63
+ */
24
64
  PRICING_TIER_FREE = 1,
65
+ /**
66
+ * PRICING_TIER_BATCH - Batch processing with 50% discount, 24-hour turnaround
67
+ * Example: GPT-4o batch API at $1.25/1M input tokens (vs $2.50 standard)
68
+ */
25
69
  PRICING_TIER_BATCH = 2,
70
+ /**
71
+ * PRICING_TIER_FLEX - Flexible/on-demand tier (between batch and standard)
72
+ * Example: Variable pricing based on system load
73
+ */
26
74
  PRICING_TIER_FLEX = 3,
75
+ /**
76
+ * PRICING_TIER_STANDARD - Standard/regular pricing tier
77
+ * Example: GPT-4o at $2.50/1M input tokens for real-time API
78
+ */
27
79
  PRICING_TIER_STANDARD = 4,
80
+ /**
81
+ * PRICING_TIER_PRIORITY - Priority access with higher costs but guaranteed availability
82
+ * Example: Reserved capacity with SLA guarantees
83
+ */
28
84
  PRICING_TIER_PRIORITY = 5,
85
+ /**
86
+ * PRICING_TIER_ENTERPRISE - Enterprise/custom pricing with negotiated rates
87
+ * Example: Volume discounts for large organizations
88
+ */
29
89
  PRICING_TIER_ENTERPRISE = 6,
30
90
  UNRECOGNIZED = -1
31
91
  }
32
92
  export declare function pricingTierFromJSON(object: any): PricingTier;
33
93
  export declare function pricingTierToJSON(object: PricingTier): string;
94
+ /** Operation defines the specific type of usage being priced. */
34
95
  export declare enum Operation {
96
+ /** OPERATION_UNSPECIFIED - Default/unknown operation */
35
97
  OPERATION_UNSPECIFIED = 0,
36
- /** OPERATION_INPUT - Prompt/input tokens */
98
+ /**
99
+ * OPERATION_INPUT - Input/prompt tokens sent to the model
100
+ * Example: User message in chat, $2.50/1M tokens for GPT-4o
101
+ */
37
102
  OPERATION_INPUT = 1,
38
- /** OPERATION_OUTPUT - Completion/output tokens */
103
+ /**
104
+ * OPERATION_OUTPUT - Output/completion tokens generated by the model
105
+ * Example: Model response, $10.00/1M tokens for GPT-4o
106
+ */
39
107
  OPERATION_OUTPUT = 2,
40
- /** OPERATION_CACHED_INPUT - Discounted cached input */
108
+ /**
109
+ * OPERATION_CACHED_INPUT - Cached input tokens (discounted rate for repeated context)
110
+ * Example: $1.25/1M tokens for GPT-4o cached prompt (50% discount)
111
+ */
41
112
  OPERATION_CACHED_INPUT = 3,
42
- /** OPERATION_CACHE_READ - Cache read (if priced separately) */
113
+ /**
114
+ * OPERATION_CACHE_READ - Reading from cache (if priced separately from cached input)
115
+ * Example: Anthropic Claude cache read operations
116
+ */
43
117
  OPERATION_CACHE_READ = 4,
44
- /** OPERATION_CACHE_WRITE - Cache write (if priced separately) */
118
+ /**
119
+ * OPERATION_CACHE_WRITE - Writing to cache (creating cached context)
120
+ * Example: Anthropic Claude cache creation fee
121
+ */
45
122
  OPERATION_CACHE_WRITE = 5,
46
- /** OPERATION_TRAINING - Fine-tuning training tokens or hourly training */
123
+ /**
124
+ * OPERATION_TRAINING - Fine-tuning training cost (per token or per hour)
125
+ * Example: $25.00/1M tokens or $3.00/hour for GPT-4o-mini training
126
+ */
47
127
  OPERATION_TRAINING = 6,
48
- /** OPERATION_STORAGE - General storage cost (if applicable) */
128
+ /**
129
+ * OPERATION_STORAGE - General storage costs
130
+ * Example: Vector database storage for embeddings
131
+ */
49
132
  OPERATION_STORAGE = 7,
50
- /** OPERATION_CONTEXT_CACHE_STORAGE - Context cache storage per hour */
133
+ /**
134
+ * OPERATION_CONTEXT_CACHE_STORAGE - Context cache storage charged per time unit
135
+ * Example: $0.10/GB/hour for maintaining cached contexts
136
+ */
51
137
  OPERATION_CONTEXT_CACHE_STORAGE = 8,
52
- /** OPERATION_PER_CALL - Fixed price per API call */
138
+ /**
139
+ * OPERATION_PER_CALL - Fixed price per API call regardless of tokens
140
+ * Example: $0.00255/call for file search tool
141
+ */
53
142
  OPERATION_PER_CALL = 9,
54
- /** OPERATION_PER_CONTAINER - For containerized tools (e.g., Code Interpreter) */
143
+ /**
144
+ * OPERATION_PER_CONTAINER - Per container/session pricing for isolated environments
145
+ * Example: $0.03/container for Code Interpreter execution
146
+ */
55
147
  OPERATION_PER_CONTAINER = 10,
56
148
  UNRECOGNIZED = -1
57
149
  }
58
150
  export declare function operationFromJSON(object: any): Operation;
59
151
  export declare function operationToJSON(object: Operation): string;
152
+ /** PriceUnit specifies how the price is measured/charged. */
60
153
  export declare enum PriceUnit {
154
+ /** PRICE_UNIT_UNSPECIFIED - Default/unknown unit */
61
155
  PRICE_UNIT_UNSPECIFIED = 0,
156
+ /**
157
+ * PRICE_UNIT_PER_1M_TOKENS - Price per million tokens (most common for LLMs)
158
+ * Example: $2.50 per 1M input tokens
159
+ */
62
160
  PRICE_UNIT_PER_1M_TOKENS = 1,
161
+ /**
162
+ * PRICE_UNIT_PER_IMAGE - Price per generated image
163
+ * Example: DALL-E 3 at $0.040 per 1024x1024 image
164
+ */
63
165
  PRICE_UNIT_PER_IMAGE = 2,
166
+ /**
167
+ * PRICE_UNIT_PER_MINUTE - Price per minute of processing
168
+ * Example: Whisper at $0.006 per minute of audio
169
+ */
64
170
  PRICE_UNIT_PER_MINUTE = 3,
171
+ /**
172
+ * PRICE_UNIT_PER_1M_CHARACTERS - Price per million characters (for text not tokenized)
173
+ * Example: Some translation APIs charge per character
174
+ */
65
175
  PRICE_UNIT_PER_1M_CHARACTERS = 4,
176
+ /**
177
+ * PRICE_UNIT_PER_CALL - Fixed price per API call
178
+ * Example: Moderation at $0.001 per call
179
+ */
66
180
  PRICE_UNIT_PER_CALL = 5,
181
+ /**
182
+ * PRICE_UNIT_PER_GB_DAY - Storage price per GB per day
183
+ * Example: File search storage at $0.20/GB/day
184
+ */
67
185
  PRICE_UNIT_PER_GB_DAY = 6,
186
+ /**
187
+ * PRICE_UNIT_PER_HOUR - Price per hour (training or runtime)
188
+ * Example: Fine-tuning at $3.00/hour for small models
189
+ */
68
190
  PRICE_UNIT_PER_HOUR = 7,
191
+ /**
192
+ * PRICE_UNIT_PER_1K_CALLS - Price per thousand API calls
193
+ * Example: Web search at $2.00 per 1k searches
194
+ */
69
195
  PRICE_UNIT_PER_1K_CALLS = 8,
70
196
  UNRECOGNIZED = -1
71
197
  }
72
198
  export declare function priceUnitFromJSON(object: any): PriceUnit;
73
199
  export declare function priceUnitToJSON(object: PriceUnit): string;
200
+ /**
201
+ * Pricing represents the complete pricing structure for a model or service.
202
+ * A single model may have multiple pricing items for different operations,
203
+ * tiers, and use cases.
204
+ */
74
205
  export interface Pricing {
75
- /** e.g., "USD" */
206
+ /**
207
+ * Currency code for all prices in this message.
208
+ * Examples: "USD", "EUR", "GBP"
209
+ */
76
210
  currency: string;
77
- /** All pricing entries for this model */
211
+ /**
212
+ * List of all pricing entries for this model.
213
+ * Each item represents a specific price point for a particular
214
+ * operation/tier combination.
215
+ * Example: One item for standard input tokens, another for batch input tokens
216
+ */
78
217
  items: PricingItem[];
79
- /** Optional extra info (e.g., links, footnotes) */
218
+ /**
219
+ * Additional metadata as key-value pairs.
220
+ * Common keys:
221
+ * - "footnote": Additional pricing notes (e.g., "[1] Limited availability")
222
+ * - "estimated_cost": Estimated costs for transcription models
223
+ * - "source_url": URL where pricing was sourced from
224
+ * - "last_updated": ISO 8601 timestamp of last update
225
+ */
80
226
  metadata: {
81
227
  [key: string]: string;
82
228
  };
@@ -85,36 +231,88 @@ export interface Pricing_MetadataEntry {
85
231
  key: string;
86
232
  value: string;
87
233
  }
234
+ /**
235
+ * TokenBand represents tiered pricing based on token count thresholds.
236
+ * Some models have different rates based on cumulative token usage.
237
+ */
88
238
  export interface TokenBand {
89
- /** Optional banding for tiered pricing like "<= 200k" vs "> 200k" prompt tokens */
239
+ /**
240
+ * Minimum number of prompt tokens for this pricing tier (inclusive).
241
+ * Example: 0 for the first tier, 200001 for the "over 200k" tier
242
+ * Set to 0 if not applicable or for the lowest tier
243
+ */
90
244
  minPromptTokens: number;
91
- /** inclusive, 0 if unlimited/not applicable */
245
+ /**
246
+ * Maximum number of prompt tokens for this pricing tier (inclusive).
247
+ * Example: 200000 for "up to 200k tokens" tier
248
+ * Set to 0 if unlimited or not applicable
249
+ */
92
250
  maxPromptTokens: number;
93
251
  }
252
+ /**
253
+ * PricingItem represents a specific price point for a model/service.
254
+ * Each item captures one pricing scenario with all relevant qualifiers.
255
+ */
94
256
  export interface PricingItem {
95
- /** e.g., TEXT, IMAGE, AUDIO, TOOL */
257
+ /**
258
+ * The type of AI capability this price applies to.
259
+ * Example: PRICING_CATEGORY_TEXT for GPT-4o chat completion
260
+ */
96
261
  category: PricingCategory;
97
- /** e.g., STANDARD, FLEX, BATCH, PRIORITY */
262
+ /**
263
+ * Service tier affecting price and SLA.
264
+ * Example: PRICING_TIER_BATCH for 50% discounted async processing
265
+ */
98
266
  tier: PricingTier;
99
- /** e.g., INPUT, OUTPUT, TRAINING, PER_CALL */
267
+ /**
268
+ * The specific operation being charged for.
269
+ * Example: OPERATION_INPUT for prompt tokens, OPERATION_OUTPUT for completions
270
+ */
100
271
  operation: Operation;
101
- /** Cost for the specified unit below */
272
+ /**
273
+ * The numeric cost amount.
274
+ * Example: 2.50 for "$2.50 per 1M tokens"
275
+ */
102
276
  price: number;
103
- /** How price is measured (per 1M tokens, per image, etc.) */
277
+ /**
278
+ * The unit that the price applies to.
279
+ * Example: PRICE_UNIT_PER_1M_TOKENS for token-based pricing
280
+ */
104
281
  unit: PriceUnit;
105
- /** Qualifiers/metadata to disambiguate specific variants */
282
+ /**
283
+ * Quality level for image generation.
284
+ * Examples: "standard", "hd" for DALL-E, "low", "medium", "high" for others
285
+ */
106
286
  quality: string;
107
- /** e.g., 1024x1024 */
287
+ /**
288
+ * Image resolution for image generation pricing.
289
+ * Examples: "1024x1024", "1792x1024", "1024x1792"
290
+ */
108
291
  resolution: string;
109
- /** e.g., <=200k vs >200k prompt tokens */
292
+ /**
293
+ * Token count thresholds for tiered pricing.
294
+ * Example: Different rates for prompts over 200k tokens
295
+ */
110
296
  tokenBand: TokenBand | undefined;
111
- /** if outputs include thinking/hidden tokens */
297
+ /**
298
+ * Whether output pricing includes hidden reasoning tokens.
299
+ * Example: true for o1-preview which charges for internal thinking
300
+ */
112
301
  includesThinkingTokens: boolean;
113
- /** e.g., WebSearch, FileSearch, CodeInterpreter */
302
+ /**
303
+ * Name of the tool for PRICING_CATEGORY_TOOL items.
304
+ * Examples: "Web Search", "File Search", "Code Interpreter"
305
+ */
114
306
  toolName: string;
115
- /** e.g., "text", "audio" (for transcription/tts token accounting) */
307
+ /**
308
+ * Token type for multi-modal pricing.
309
+ * Examples: "text" vs "audio" for Whisper transcription models
310
+ */
116
311
  tokenType: string;
117
- /** free-form clarifications */
312
+ /**
313
+ * Additional human-readable notes about this pricing.
314
+ * Example: "Discounted pricing with data sharing enabled"
315
+ */
118
316
  notes: string;
119
317
  }
120
318
  export declare const Pricing: MessageFns<Pricing>;
@@ -17,21 +17,55 @@ exports.priceUnitToJSON = priceUnitToJSON;
17
17
  /* eslint-disable */
18
18
  const wire_1 = require("@bufbuild/protobuf/wire");
19
19
  exports.protobufPackage = "weaveapi.llmx.v1";
20
+ /** PricingCategory defines the type of AI capability being priced. */
20
21
  var PricingCategory;
21
22
  (function (PricingCategory) {
23
+ /** PRICING_CATEGORY_UNSPECIFIED - Default/unknown category */
22
24
  PricingCategory[PricingCategory["PRICING_CATEGORY_UNSPECIFIED"] = 0] = "PRICING_CATEGORY_UNSPECIFIED";
25
+ /**
26
+ * PRICING_CATEGORY_TEXT - Text generation models (GPT-4, Claude, etc.)
27
+ * Example: GPT-4o, GPT-4o-mini for chat/completion
28
+ */
23
29
  PricingCategory[PricingCategory["PRICING_CATEGORY_TEXT"] = 1] = "PRICING_CATEGORY_TEXT";
30
+ /**
31
+ * PRICING_CATEGORY_IMAGE - Image understanding/analysis models
32
+ * Example: GPT-4-vision analyzing uploaded images
33
+ */
24
34
  PricingCategory[PricingCategory["PRICING_CATEGORY_IMAGE"] = 2] = "PRICING_CATEGORY_IMAGE";
35
+ /**
36
+ * PRICING_CATEGORY_AUDIO - Audio models for speech-to-text and text-to-speech
37
+ * Example: Whisper for transcription, TTS models for voice synthesis
38
+ */
25
39
  PricingCategory[PricingCategory["PRICING_CATEGORY_AUDIO"] = 3] = "PRICING_CATEGORY_AUDIO";
40
+ /**
41
+ * PRICING_CATEGORY_EMBEDDING - Embedding/vector models
42
+ * Example: text-embedding-3-large for semantic search
43
+ */
26
44
  PricingCategory[PricingCategory["PRICING_CATEGORY_EMBEDDING"] = 4] = "PRICING_CATEGORY_EMBEDDING";
45
+ /**
46
+ * PRICING_CATEGORY_FINE_TUNING - Fine-tuning costs for training custom models
47
+ * Example: Training GPT-4o-mini-2024-07-18 on custom data
48
+ */
27
49
  PricingCategory[PricingCategory["PRICING_CATEGORY_FINE_TUNING"] = 5] = "PRICING_CATEGORY_FINE_TUNING";
28
- /** PRICING_CATEGORY_TOOL - Built-in or add-on tools (e.g., Web Search, File Search, Code Interpreter) */
50
+ /**
51
+ * PRICING_CATEGORY_TOOL - Built-in or add-on tools and capabilities
52
+ * Example: Web Search ($2/1k calls), Code Interpreter ($0.03/container)
53
+ */
29
54
  PricingCategory[PricingCategory["PRICING_CATEGORY_TOOL"] = 6] = "PRICING_CATEGORY_TOOL";
30
- /** PRICING_CATEGORY_REALTIME - Realtime/streaming modalities */
55
+ /**
56
+ * PRICING_CATEGORY_REALTIME - Realtime/streaming API pricing
57
+ * Example: WebSocket-based continuous interaction models
58
+ */
31
59
  PricingCategory[PricingCategory["PRICING_CATEGORY_REALTIME"] = 7] = "PRICING_CATEGORY_REALTIME";
32
- /** PRICING_CATEGORY_MODERATION - Moderation models */
60
+ /**
61
+ * PRICING_CATEGORY_MODERATION - Content moderation models
62
+ * Example: OpenAI moderation endpoint for content filtering
63
+ */
33
64
  PricingCategory[PricingCategory["PRICING_CATEGORY_MODERATION"] = 8] = "PRICING_CATEGORY_MODERATION";
34
- /** PRICING_CATEGORY_LEGACY - Legacy pricing entries */
65
+ /**
66
+ * PRICING_CATEGORY_LEGACY - Deprecated/legacy models with special pricing
67
+ * Example: GPT-3.5-turbo-0301 (older version)
68
+ */
35
69
  PricingCategory[PricingCategory["PRICING_CATEGORY_LEGACY"] = 9] = "PRICING_CATEGORY_LEGACY";
36
70
  PricingCategory[PricingCategory["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
37
71
  })(PricingCategory || (exports.PricingCategory = PricingCategory = {}));
@@ -100,14 +134,40 @@ function pricingCategoryToJSON(object) {
100
134
  return "UNRECOGNIZED";
101
135
  }
102
136
  }
137
+ /** PricingTier represents different service levels with varying costs and SLAs. */
103
138
  var PricingTier;
104
139
  (function (PricingTier) {
140
+ /** PRICING_TIER_UNSPECIFIED - Default/unknown tier */
105
141
  PricingTier[PricingTier["PRICING_TIER_UNSPECIFIED"] = 0] = "PRICING_TIER_UNSPECIFIED";
142
+ /**
143
+ * PRICING_TIER_FREE - Free tier with usage limits
144
+ * Example: Free API credits for new users
145
+ */
106
146
  PricingTier[PricingTier["PRICING_TIER_FREE"] = 1] = "PRICING_TIER_FREE";
147
+ /**
148
+ * PRICING_TIER_BATCH - Batch processing with 50% discount, 24-hour turnaround
149
+ * Example: GPT-4o batch API at $1.25/1M input tokens (vs $2.50 standard)
150
+ */
107
151
  PricingTier[PricingTier["PRICING_TIER_BATCH"] = 2] = "PRICING_TIER_BATCH";
152
+ /**
153
+ * PRICING_TIER_FLEX - Flexible/on-demand tier (between batch and standard)
154
+ * Example: Variable pricing based on system load
155
+ */
108
156
  PricingTier[PricingTier["PRICING_TIER_FLEX"] = 3] = "PRICING_TIER_FLEX";
157
+ /**
158
+ * PRICING_TIER_STANDARD - Standard/regular pricing tier
159
+ * Example: GPT-4o at $2.50/1M input tokens for real-time API
160
+ */
109
161
  PricingTier[PricingTier["PRICING_TIER_STANDARD"] = 4] = "PRICING_TIER_STANDARD";
162
+ /**
163
+ * PRICING_TIER_PRIORITY - Priority access with higher costs but guaranteed availability
164
+ * Example: Reserved capacity with SLA guarantees
165
+ */
110
166
  PricingTier[PricingTier["PRICING_TIER_PRIORITY"] = 5] = "PRICING_TIER_PRIORITY";
167
+ /**
168
+ * PRICING_TIER_ENTERPRISE - Enterprise/custom pricing with negotiated rates
169
+ * Example: Volume discounts for large organizations
170
+ */
111
171
  PricingTier[PricingTier["PRICING_TIER_ENTERPRISE"] = 6] = "PRICING_TIER_ENTERPRISE";
112
172
  PricingTier[PricingTier["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
113
173
  })(PricingTier || (exports.PricingTier = PricingTier = {}));
@@ -161,28 +221,60 @@ function pricingTierToJSON(object) {
161
221
  return "UNRECOGNIZED";
162
222
  }
163
223
  }
224
+ /** Operation defines the specific type of usage being priced. */
164
225
  var Operation;
165
226
  (function (Operation) {
227
+ /** OPERATION_UNSPECIFIED - Default/unknown operation */
166
228
  Operation[Operation["OPERATION_UNSPECIFIED"] = 0] = "OPERATION_UNSPECIFIED";
167
- /** OPERATION_INPUT - Prompt/input tokens */
229
+ /**
230
+ * OPERATION_INPUT - Input/prompt tokens sent to the model
231
+ * Example: User message in chat, $2.50/1M tokens for GPT-4o
232
+ */
168
233
  Operation[Operation["OPERATION_INPUT"] = 1] = "OPERATION_INPUT";
169
- /** OPERATION_OUTPUT - Completion/output tokens */
234
+ /**
235
+ * OPERATION_OUTPUT - Output/completion tokens generated by the model
236
+ * Example: Model response, $10.00/1M tokens for GPT-4o
237
+ */
170
238
  Operation[Operation["OPERATION_OUTPUT"] = 2] = "OPERATION_OUTPUT";
171
- /** OPERATION_CACHED_INPUT - Discounted cached input */
239
+ /**
240
+ * OPERATION_CACHED_INPUT - Cached input tokens (discounted rate for repeated context)
241
+ * Example: $1.25/1M tokens for GPT-4o cached prompt (50% discount)
242
+ */
172
243
  Operation[Operation["OPERATION_CACHED_INPUT"] = 3] = "OPERATION_CACHED_INPUT";
173
- /** OPERATION_CACHE_READ - Cache read (if priced separately) */
244
+ /**
245
+ * OPERATION_CACHE_READ - Reading from cache (if priced separately from cached input)
246
+ * Example: Anthropic Claude cache read operations
247
+ */
174
248
  Operation[Operation["OPERATION_CACHE_READ"] = 4] = "OPERATION_CACHE_READ";
175
- /** OPERATION_CACHE_WRITE - Cache write (if priced separately) */
249
+ /**
250
+ * OPERATION_CACHE_WRITE - Writing to cache (creating cached context)
251
+ * Example: Anthropic Claude cache creation fee
252
+ */
176
253
  Operation[Operation["OPERATION_CACHE_WRITE"] = 5] = "OPERATION_CACHE_WRITE";
177
- /** OPERATION_TRAINING - Fine-tuning training tokens or hourly training */
254
+ /**
255
+ * OPERATION_TRAINING - Fine-tuning training cost (per token or per hour)
256
+ * Example: $25.00/1M tokens or $3.00/hour for GPT-4o-mini training
257
+ */
178
258
  Operation[Operation["OPERATION_TRAINING"] = 6] = "OPERATION_TRAINING";
179
- /** OPERATION_STORAGE - General storage cost (if applicable) */
259
+ /**
260
+ * OPERATION_STORAGE - General storage costs
261
+ * Example: Vector database storage for embeddings
262
+ */
180
263
  Operation[Operation["OPERATION_STORAGE"] = 7] = "OPERATION_STORAGE";
181
- /** OPERATION_CONTEXT_CACHE_STORAGE - Context cache storage per hour */
264
+ /**
265
+ * OPERATION_CONTEXT_CACHE_STORAGE - Context cache storage charged per time unit
266
+ * Example: $0.10/GB/hour for maintaining cached contexts
267
+ */
182
268
  Operation[Operation["OPERATION_CONTEXT_CACHE_STORAGE"] = 8] = "OPERATION_CONTEXT_CACHE_STORAGE";
183
- /** OPERATION_PER_CALL - Fixed price per API call */
269
+ /**
270
+ * OPERATION_PER_CALL - Fixed price per API call regardless of tokens
271
+ * Example: $0.00255/call for file search tool
272
+ */
184
273
  Operation[Operation["OPERATION_PER_CALL"] = 9] = "OPERATION_PER_CALL";
185
- /** OPERATION_PER_CONTAINER - For containerized tools (e.g., Code Interpreter) */
274
+ /**
275
+ * OPERATION_PER_CONTAINER - Per container/session pricing for isolated environments
276
+ * Example: $0.03/container for Code Interpreter execution
277
+ */
186
278
  Operation[Operation["OPERATION_PER_CONTAINER"] = 10] = "OPERATION_PER_CONTAINER";
187
279
  Operation[Operation["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
188
280
  })(Operation || (exports.Operation = Operation = {}));
@@ -256,16 +348,50 @@ function operationToJSON(object) {
256
348
  return "UNRECOGNIZED";
257
349
  }
258
350
  }
351
+ /** PriceUnit specifies how the price is measured/charged. */
259
352
  var PriceUnit;
260
353
  (function (PriceUnit) {
354
+ /** PRICE_UNIT_UNSPECIFIED - Default/unknown unit */
261
355
  PriceUnit[PriceUnit["PRICE_UNIT_UNSPECIFIED"] = 0] = "PRICE_UNIT_UNSPECIFIED";
356
+ /**
357
+ * PRICE_UNIT_PER_1M_TOKENS - Price per million tokens (most common for LLMs)
358
+ * Example: $2.50 per 1M input tokens
359
+ */
262
360
  PriceUnit[PriceUnit["PRICE_UNIT_PER_1M_TOKENS"] = 1] = "PRICE_UNIT_PER_1M_TOKENS";
361
+ /**
362
+ * PRICE_UNIT_PER_IMAGE - Price per generated image
363
+ * Example: DALL-E 3 at $0.040 per 1024x1024 image
364
+ */
263
365
  PriceUnit[PriceUnit["PRICE_UNIT_PER_IMAGE"] = 2] = "PRICE_UNIT_PER_IMAGE";
366
+ /**
367
+ * PRICE_UNIT_PER_MINUTE - Price per minute of processing
368
+ * Example: Whisper at $0.006 per minute of audio
369
+ */
264
370
  PriceUnit[PriceUnit["PRICE_UNIT_PER_MINUTE"] = 3] = "PRICE_UNIT_PER_MINUTE";
371
+ /**
372
+ * PRICE_UNIT_PER_1M_CHARACTERS - Price per million characters (for text not tokenized)
373
+ * Example: Some translation APIs charge per character
374
+ */
265
375
  PriceUnit[PriceUnit["PRICE_UNIT_PER_1M_CHARACTERS"] = 4] = "PRICE_UNIT_PER_1M_CHARACTERS";
376
+ /**
377
+ * PRICE_UNIT_PER_CALL - Fixed price per API call
378
+ * Example: Moderation at $0.001 per call
379
+ */
266
380
  PriceUnit[PriceUnit["PRICE_UNIT_PER_CALL"] = 5] = "PRICE_UNIT_PER_CALL";
381
+ /**
382
+ * PRICE_UNIT_PER_GB_DAY - Storage price per GB per day
383
+ * Example: File search storage at $0.20/GB/day
384
+ */
267
385
  PriceUnit[PriceUnit["PRICE_UNIT_PER_GB_DAY"] = 6] = "PRICE_UNIT_PER_GB_DAY";
386
+ /**
387
+ * PRICE_UNIT_PER_HOUR - Price per hour (training or runtime)
388
+ * Example: Fine-tuning at $3.00/hour for small models
389
+ */
268
390
  PriceUnit[PriceUnit["PRICE_UNIT_PER_HOUR"] = 7] = "PRICE_UNIT_PER_HOUR";
391
+ /**
392
+ * PRICE_UNIT_PER_1K_CALLS - Price per thousand API calls
393
+ * Example: Web search at $2.00 per 1k searches
394
+ */
269
395
  PriceUnit[PriceUnit["PRICE_UNIT_PER_1K_CALLS"] = 8] = "PRICE_UNIT_PER_1K_CALLS";
270
396
  PriceUnit[PriceUnit["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
271
397
  })(PriceUnit || (exports.PriceUnit = PriceUnit = {}));
@@ -1,14 +1,53 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  export declare const protobufPackage = "weaveapi.llmx.v1";
3
+ /** Provider represents an AI model provider/vendor organization. */
3
4
  export interface Provider {
5
+ /**
6
+ * Unique internal identifier for this provider.
7
+ * Example: "pvd_01234567-89ab-cdef-0123-456789abcdef"
8
+ */
4
9
  id: string;
10
+ /**
11
+ * URL-friendly identifier for routing.
12
+ * Examples: "openai", "anthropic", "google", "meta"
13
+ * Used in paths like /providers/openai
14
+ */
5
15
  slug: string;
16
+ /**
17
+ * Display name of the provider.
18
+ * Examples: "OpenAI", "Anthropic", "Google AI", "Meta AI"
19
+ */
6
20
  name: string;
21
+ /**
22
+ * Description of the provider and their focus.
23
+ * Example: "OpenAI develops general-purpose AI models including GPT-4,
24
+ * DALL-E, and Whisper, focusing on safe and beneficial AI."
25
+ */
7
26
  description: string;
27
+ /**
28
+ * Main website URL.
29
+ * Example: "https://openai.com"
30
+ */
8
31
  websiteUrl: string;
32
+ /**
33
+ * API documentation URL.
34
+ * Example: "https://platform.openai.com/docs"
35
+ */
9
36
  documentationUrl: string;
37
+ /**
38
+ * URL to provider's logo image.
39
+ * Example: "https://assets.example.com/logos/openai.svg"
40
+ */
10
41
  logoUrl: string;
42
+ /**
43
+ * Whether provider is currently operational.
44
+ * Example: false if provider has shut down or paused service
45
+ */
11
46
  isActive: boolean;
47
+ /**
48
+ * Number of models offered by this provider.
49
+ * Example: 25 for a provider with 25 different models
50
+ */
12
51
  modelCount: number;
13
52
  }
14
53
  export declare const Provider: MessageFns<Provider>;