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.
- 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
|
@@ -7,16 +7,27 @@ export declare enum CapabilityType {
|
|
|
7
7
|
CAPABILITY_TYPE_TEXT = 1,
|
|
8
8
|
/** CAPABILITY_TYPE_STRUCTURED_RESPONSE - Structured output (JSON, XML, etc.) */
|
|
9
9
|
CAPABILITY_TYPE_STRUCTURED_RESPONSE = 2,
|
|
10
|
+
/** CAPABILITY_TYPE_STREAMING - Server-sent or websocket streaming of partial outputs */
|
|
10
11
|
CAPABILITY_TYPE_STREAMING = 3,
|
|
12
|
+
/** CAPABILITY_TYPE_FUNCTION_CALLING - Tool/function calling with schemaed arguments */
|
|
11
13
|
CAPABILITY_TYPE_FUNCTION_CALLING = 4,
|
|
14
|
+
/** CAPABILITY_TYPE_VISION - Image understanding and/or generation */
|
|
12
15
|
CAPABILITY_TYPE_VISION = 5,
|
|
16
|
+
/** CAPABILITY_TYPE_TOOL_USE - General tool use beyond plain function calls */
|
|
13
17
|
CAPABILITY_TYPE_TOOL_USE = 6,
|
|
18
|
+
/** CAPABILITY_TYPE_SYSTEM_PROMPT - System messages/prompt steering support */
|
|
14
19
|
CAPABILITY_TYPE_SYSTEM_PROMPT = 7,
|
|
20
|
+
/** CAPABILITY_TYPE_CACHING - Prompt/context caching capabilities */
|
|
15
21
|
CAPABILITY_TYPE_CACHING = 8,
|
|
22
|
+
/** CAPABILITY_TYPE_REASONING - Advanced reasoning controls/strategies */
|
|
16
23
|
CAPABILITY_TYPE_REASONING = 9,
|
|
24
|
+
/** CAPABILITY_TYPE_AUDIO - Audio STT/TTS support */
|
|
17
25
|
CAPABILITY_TYPE_AUDIO = 10,
|
|
26
|
+
/** CAPABILITY_TYPE_VIDEO - Video analysis/generation support */
|
|
18
27
|
CAPABILITY_TYPE_VIDEO = 11,
|
|
28
|
+
/** CAPABILITY_TYPE_EMBEDDINGS - Vector embedding generation */
|
|
19
29
|
CAPABILITY_TYPE_EMBEDDINGS = 12,
|
|
30
|
+
/** CAPABILITY_TYPE_FINE_TUNING - Custom model training/fine-tuning */
|
|
20
31
|
CAPABILITY_TYPE_FINE_TUNING = 13,
|
|
21
32
|
UNRECOGNIZED = -1
|
|
22
33
|
}
|
|
@@ -248,33 +259,116 @@ export interface Text {
|
|
|
248
259
|
}
|
|
249
260
|
/** Structured response capability configuration */
|
|
250
261
|
export interface StructuredResponse {
|
|
262
|
+
/**
|
|
263
|
+
* Optional guidance to include in the system prompt to elicit structured output
|
|
264
|
+
* Example: "Always return valid JSON matching the provided schema"
|
|
265
|
+
*/
|
|
251
266
|
systemPromptHint: string;
|
|
267
|
+
/**
|
|
268
|
+
* Supported output formats for structured responses
|
|
269
|
+
* Examples: [DATA_FORMAT_JSON, DATA_FORMAT_YAML]
|
|
270
|
+
*/
|
|
252
271
|
supportedFormats: DataFormat[];
|
|
272
|
+
/**
|
|
273
|
+
* Maximum allowed nesting depth for JSON schema objects/arrays
|
|
274
|
+
* Example: 5 for moderately complex schemas
|
|
275
|
+
*/
|
|
253
276
|
maxSchemaDepth: number;
|
|
277
|
+
/**
|
|
278
|
+
* Whether structured output requires tool/function use (vs. direct generation)
|
|
279
|
+
* Example: true for providers that only return JSON via tool calls
|
|
280
|
+
*/
|
|
254
281
|
requiresToolUse: boolean;
|
|
282
|
+
/**
|
|
283
|
+
* Whether the model must be in a special "JSON mode" to honor schemas
|
|
284
|
+
* Example: true for models that enforce strict JSON output when enabled
|
|
285
|
+
*/
|
|
255
286
|
requiresJsonMode: boolean;
|
|
287
|
+
/**
|
|
288
|
+
* Maximum number of top-level properties in object schemas
|
|
289
|
+
* Example: 50
|
|
290
|
+
*/
|
|
256
291
|
maxProperties: number;
|
|
292
|
+
/**
|
|
293
|
+
* JSON Schema primitive/types supported by the model
|
|
294
|
+
* Examples: [JSON_SCHEMA_TYPE_OBJECT, JSON_SCHEMA_TYPE_ARRAY, JSON_SCHEMA_TYPE_STRING]
|
|
295
|
+
*/
|
|
257
296
|
supportedTypes: JsonSchemaType[];
|
|
258
|
-
/**
|
|
297
|
+
/**
|
|
298
|
+
* Can stream structured responses (not just generate them)
|
|
299
|
+
* Example: true if partial JSON chunks are streamed
|
|
300
|
+
*/
|
|
259
301
|
supportsStreaming: boolean;
|
|
260
302
|
}
|
|
261
303
|
/** Streaming capability configuration */
|
|
262
304
|
export interface Streaming {
|
|
305
|
+
/**
|
|
306
|
+
* Delimiter used between streamed chunks, if any
|
|
307
|
+
* Example: "\n\n" for event-stream boundaries
|
|
308
|
+
*/
|
|
263
309
|
chunkDelimiter: string;
|
|
310
|
+
/**
|
|
311
|
+
* Preferred buffer size used by the provider when batching output
|
|
312
|
+
* Example: 1024 (bytes)
|
|
313
|
+
*/
|
|
264
314
|
bufferSize: number;
|
|
315
|
+
/**
|
|
316
|
+
* Whether Server-Sent Events (SSE) is supported
|
|
317
|
+
* Example: true if provider uses text/event-stream
|
|
318
|
+
*/
|
|
265
319
|
supportsSse: boolean;
|
|
320
|
+
/**
|
|
321
|
+
* Whether token usage info can be emitted incrementally during streaming
|
|
322
|
+
* Example: true if usage deltas are included in stream
|
|
323
|
+
*/
|
|
266
324
|
supportsUsage: boolean;
|
|
325
|
+
/**
|
|
326
|
+
* Typical size of individual streamed chunks in bytes
|
|
327
|
+
* Example: 256
|
|
328
|
+
*/
|
|
267
329
|
avgChunkSizeBytes: number;
|
|
330
|
+
/**
|
|
331
|
+
* Maximum delay between streamed chunks in milliseconds
|
|
332
|
+
* Example: 200
|
|
333
|
+
*/
|
|
268
334
|
maxChunkDelayMs: number;
|
|
269
335
|
}
|
|
270
336
|
/** Function calling capability configuration */
|
|
271
337
|
export interface FunctionCalling {
|
|
338
|
+
/**
|
|
339
|
+
* Maximum number of functions that can be registered per request
|
|
340
|
+
* Example: 128
|
|
341
|
+
*/
|
|
272
342
|
maxFunctions: number;
|
|
343
|
+
/**
|
|
344
|
+
* Maximum number of tool/function calls that may be executed in parallel
|
|
345
|
+
* Example: 5
|
|
346
|
+
*/
|
|
273
347
|
maxParallelCalls: number;
|
|
348
|
+
/**
|
|
349
|
+
* Whether the model can plan and invoke multiple tools concurrently
|
|
350
|
+
* Example: true for models with parallel tool-use orchestration
|
|
351
|
+
*/
|
|
274
352
|
supportsParallel: boolean;
|
|
353
|
+
/**
|
|
354
|
+
* Whether requests must use a special "tool" role or channel for calls
|
|
355
|
+
* Example: true if provider requires tool role messages
|
|
356
|
+
*/
|
|
275
357
|
requiresToolRole: boolean;
|
|
358
|
+
/**
|
|
359
|
+
* Whether intermediate tool call tokens/results are streamable
|
|
360
|
+
* Example: true if tool call arguments/results are streamed as they are produced
|
|
361
|
+
*/
|
|
276
362
|
supportsStreaming: boolean;
|
|
363
|
+
/**
|
|
364
|
+
* JSON schema types supported for function parameters
|
|
365
|
+
* Examples: [JSON_SCHEMA_TYPE_OBJECT, JSON_SCHEMA_TYPE_ARRAY, JSON_SCHEMA_TYPE_STRING]
|
|
366
|
+
*/
|
|
277
367
|
supportedParameterTypes: JsonSchemaType[];
|
|
368
|
+
/**
|
|
369
|
+
* Maximum nesting depth allowed for function/tool call plans
|
|
370
|
+
* Example: 3 for limited recursion
|
|
371
|
+
*/
|
|
278
372
|
maxNestingDepth: number;
|
|
279
373
|
}
|
|
280
374
|
/** Vision capability configuration */
|
|
@@ -329,34 +423,114 @@ export interface Vision {
|
|
|
329
423
|
}
|
|
330
424
|
/** Tool use capability configuration */
|
|
331
425
|
export interface ToolUse {
|
|
426
|
+
/**
|
|
427
|
+
* Maximum number of tools that can be registered or considered
|
|
428
|
+
* Example: 64
|
|
429
|
+
*/
|
|
332
430
|
maxTools: number;
|
|
431
|
+
/**
|
|
432
|
+
* Whether the model can chain tool invocations one after another
|
|
433
|
+
* Example: true for stepwise tool planning
|
|
434
|
+
*/
|
|
333
435
|
supportsSequential: boolean;
|
|
436
|
+
/**
|
|
437
|
+
* Whether the model can invoke multiple tools concurrently
|
|
438
|
+
* Example: true for parallelized tool execution
|
|
439
|
+
*/
|
|
334
440
|
supportsParallel: boolean;
|
|
441
|
+
/**
|
|
442
|
+
* Maximum number of tool-use rounds allowed in a single request
|
|
443
|
+
* Example: 10
|
|
444
|
+
*/
|
|
335
445
|
maxToolRounds: number;
|
|
446
|
+
/**
|
|
447
|
+
* Types of tools supported by the provider/model
|
|
448
|
+
* Examples: [TOOL_TYPE_FUNCTION, TOOL_TYPE_RETRIEVAL]
|
|
449
|
+
*/
|
|
336
450
|
supportedToolTypes: ToolType[];
|
|
337
451
|
}
|
|
338
452
|
/** System prompt capability configuration */
|
|
339
453
|
export interface SystemPrompt {
|
|
454
|
+
/**
|
|
455
|
+
* Maximum allowed length of system prompt content (characters or tokens)
|
|
456
|
+
* Example: 8000 (characters)
|
|
457
|
+
*/
|
|
340
458
|
maxLength: number;
|
|
459
|
+
/**
|
|
460
|
+
* Whether multiple system prompts (or segments) can be supplied
|
|
461
|
+
* Example: true if the provider supports multiple system messages
|
|
462
|
+
*/
|
|
341
463
|
supportsMultiple: boolean;
|
|
464
|
+
/**
|
|
465
|
+
* Whether system prompts can be cached for re-use
|
|
466
|
+
* Example: true if provider supports prompt caching hints
|
|
467
|
+
*/
|
|
342
468
|
supportsCaching: boolean;
|
|
469
|
+
/**
|
|
470
|
+
* Preferred/required format for system prompts (plain, markdown, etc.)
|
|
471
|
+
* Example: DATA_FORMAT_MARKDOWN
|
|
472
|
+
*/
|
|
343
473
|
format: DataFormat;
|
|
344
474
|
}
|
|
345
475
|
/** Caching capability configuration */
|
|
346
476
|
export interface Caching {
|
|
477
|
+
/**
|
|
478
|
+
* Strategy used to compute cache keys for requests/responses
|
|
479
|
+
* Examples: CACHE_STRATEGY_HASH, CACHE_STRATEGY_SEMANTIC
|
|
480
|
+
*/
|
|
347
481
|
cacheKeyStrategy: CacheStrategy;
|
|
482
|
+
/**
|
|
483
|
+
* Maximum total cache capacity (bytes)
|
|
484
|
+
* Example: 1073741824 for 1GB
|
|
485
|
+
*/
|
|
348
486
|
maxCacheSizeBytes: number;
|
|
487
|
+
/**
|
|
488
|
+
* Default time-to-live for cache entries (seconds)
|
|
489
|
+
* Example: 3600 for 1 hour
|
|
490
|
+
*/
|
|
349
491
|
cacheTtlSeconds: number;
|
|
492
|
+
/**
|
|
493
|
+
* Whether the model/provider supports caching of conversation context
|
|
494
|
+
* Example: true for context window reuse
|
|
495
|
+
*/
|
|
350
496
|
supportsContextCaching: boolean;
|
|
497
|
+
/**
|
|
498
|
+
* Whether the model/provider supports caching of prompts/prefixes
|
|
499
|
+
* Example: true for prefix caching/token reuse
|
|
500
|
+
*/
|
|
351
501
|
supportsPromptCaching: boolean;
|
|
502
|
+
/**
|
|
503
|
+
* Minimum number of tokens required for an entry to be cacheable
|
|
504
|
+
* Example: 128
|
|
505
|
+
*/
|
|
352
506
|
minCacheableTokens: number;
|
|
353
507
|
}
|
|
354
508
|
/** Reasoning capability configuration */
|
|
355
509
|
export interface Reasoning {
|
|
510
|
+
/**
|
|
511
|
+
* Whether the model can produce hidden chain-of-thought/assistant reasoning
|
|
512
|
+
* Example: true for models supporting private CoT traces
|
|
513
|
+
*/
|
|
356
514
|
supportsChainOfThought: boolean;
|
|
515
|
+
/**
|
|
516
|
+
* Whether the model can expose discrete step indices or markers
|
|
517
|
+
* Example: true for models that number reasoning steps
|
|
518
|
+
*/
|
|
357
519
|
supportsStepTracking: boolean;
|
|
520
|
+
/**
|
|
521
|
+
* Maximum number of internal reasoning steps supported
|
|
522
|
+
* Example: 64
|
|
523
|
+
*/
|
|
358
524
|
maxReasoningSteps: number;
|
|
525
|
+
/**
|
|
526
|
+
* Whether the model can revise earlier steps based on later insights
|
|
527
|
+
* Example: true for self-correction/self-reflection
|
|
528
|
+
*/
|
|
359
529
|
supportsSelfCorrection: boolean;
|
|
530
|
+
/**
|
|
531
|
+
* Supported high-level reasoning strategies
|
|
532
|
+
* Examples: [REASONING_STRATEGY_STEP_BY_STEP, REASONING_STRATEGY_SELF_CONSISTENCY]
|
|
533
|
+
*/
|
|
360
534
|
reasoningStrategies: ReasoningStrategy[];
|
|
361
535
|
}
|
|
362
536
|
/** Audio capability configuration */
|
|
@@ -441,19 +615,63 @@ export interface Video {
|
|
|
441
615
|
}
|
|
442
616
|
/** Embeddings capability configuration */
|
|
443
617
|
export interface Embeddings {
|
|
618
|
+
/**
|
|
619
|
+
* Dimensionality of the vector space produced by the model
|
|
620
|
+
* Example: 1536
|
|
621
|
+
*/
|
|
444
622
|
embeddingDimensions: number;
|
|
623
|
+
/**
|
|
624
|
+
* Maximum number of tokens accepted per input item
|
|
625
|
+
* Example: 8192
|
|
626
|
+
*/
|
|
445
627
|
maxInputTokens: number;
|
|
628
|
+
/**
|
|
629
|
+
* Whether the API supports batching multiple inputs in one call
|
|
630
|
+
* Example: true
|
|
631
|
+
*/
|
|
446
632
|
supportsBatch: boolean;
|
|
633
|
+
/**
|
|
634
|
+
* Maximum number of items allowed per batch
|
|
635
|
+
* Example: 128
|
|
636
|
+
*/
|
|
447
637
|
maxBatchSize: number;
|
|
638
|
+
/**
|
|
639
|
+
* Supported similarity/distance metrics for index/search
|
|
640
|
+
* Examples: [DISTANCE_METRIC_COSINE, DISTANCE_METRIC_DOT_PRODUCT]
|
|
641
|
+
*/
|
|
448
642
|
distanceMetrics: DistanceMetric[];
|
|
449
643
|
}
|
|
450
644
|
/** Fine-tuning capability configuration */
|
|
451
645
|
export interface FineTuning {
|
|
646
|
+
/**
|
|
647
|
+
* Minimum number of training examples required to start fine-tuning
|
|
648
|
+
* Example: 50
|
|
649
|
+
*/
|
|
452
650
|
minExamples: number;
|
|
651
|
+
/**
|
|
652
|
+
* Maximum number of training examples supported in a single job
|
|
653
|
+
* Example: 500000
|
|
654
|
+
*/
|
|
453
655
|
maxExamples: number;
|
|
656
|
+
/**
|
|
657
|
+
* Supported dataset/file formats for fine-tuning
|
|
658
|
+
* Examples: [DATA_FORMAT_JSONL, DATA_FORMAT_CSV]
|
|
659
|
+
*/
|
|
454
660
|
supportedFormats: DataFormat[];
|
|
661
|
+
/**
|
|
662
|
+
* Maximum size of individual training files (MB)
|
|
663
|
+
* Example: 512
|
|
664
|
+
*/
|
|
455
665
|
maxFileSizeMb: number;
|
|
666
|
+
/**
|
|
667
|
+
* Whether a separate validation set can be provided
|
|
668
|
+
* Example: true
|
|
669
|
+
*/
|
|
456
670
|
supportsValidationSet: boolean;
|
|
671
|
+
/**
|
|
672
|
+
* Hyperparameters that can be configured for training
|
|
673
|
+
* Examples: [HYPERPARAMETER_LEARNING_RATE, HYPERPARAMETER_EPOCHS]
|
|
674
|
+
*/
|
|
457
675
|
hyperparameters: Hyperparameter[];
|
|
458
676
|
}
|
|
459
677
|
export declare const Capability: MessageFns<Capability>;
|
|
@@ -41,16 +41,27 @@ var CapabilityType;
|
|
|
41
41
|
CapabilityType[CapabilityType["CAPABILITY_TYPE_TEXT"] = 1] = "CAPABILITY_TYPE_TEXT";
|
|
42
42
|
/** CAPABILITY_TYPE_STRUCTURED_RESPONSE - Structured output (JSON, XML, etc.) */
|
|
43
43
|
CapabilityType[CapabilityType["CAPABILITY_TYPE_STRUCTURED_RESPONSE"] = 2] = "CAPABILITY_TYPE_STRUCTURED_RESPONSE";
|
|
44
|
+
/** CAPABILITY_TYPE_STREAMING - Server-sent or websocket streaming of partial outputs */
|
|
44
45
|
CapabilityType[CapabilityType["CAPABILITY_TYPE_STREAMING"] = 3] = "CAPABILITY_TYPE_STREAMING";
|
|
46
|
+
/** CAPABILITY_TYPE_FUNCTION_CALLING - Tool/function calling with schemaed arguments */
|
|
45
47
|
CapabilityType[CapabilityType["CAPABILITY_TYPE_FUNCTION_CALLING"] = 4] = "CAPABILITY_TYPE_FUNCTION_CALLING";
|
|
48
|
+
/** CAPABILITY_TYPE_VISION - Image understanding and/or generation */
|
|
46
49
|
CapabilityType[CapabilityType["CAPABILITY_TYPE_VISION"] = 5] = "CAPABILITY_TYPE_VISION";
|
|
50
|
+
/** CAPABILITY_TYPE_TOOL_USE - General tool use beyond plain function calls */
|
|
47
51
|
CapabilityType[CapabilityType["CAPABILITY_TYPE_TOOL_USE"] = 6] = "CAPABILITY_TYPE_TOOL_USE";
|
|
52
|
+
/** CAPABILITY_TYPE_SYSTEM_PROMPT - System messages/prompt steering support */
|
|
48
53
|
CapabilityType[CapabilityType["CAPABILITY_TYPE_SYSTEM_PROMPT"] = 7] = "CAPABILITY_TYPE_SYSTEM_PROMPT";
|
|
54
|
+
/** CAPABILITY_TYPE_CACHING - Prompt/context caching capabilities */
|
|
49
55
|
CapabilityType[CapabilityType["CAPABILITY_TYPE_CACHING"] = 8] = "CAPABILITY_TYPE_CACHING";
|
|
56
|
+
/** CAPABILITY_TYPE_REASONING - Advanced reasoning controls/strategies */
|
|
50
57
|
CapabilityType[CapabilityType["CAPABILITY_TYPE_REASONING"] = 9] = "CAPABILITY_TYPE_REASONING";
|
|
58
|
+
/** CAPABILITY_TYPE_AUDIO - Audio STT/TTS support */
|
|
51
59
|
CapabilityType[CapabilityType["CAPABILITY_TYPE_AUDIO"] = 10] = "CAPABILITY_TYPE_AUDIO";
|
|
60
|
+
/** CAPABILITY_TYPE_VIDEO - Video analysis/generation support */
|
|
52
61
|
CapabilityType[CapabilityType["CAPABILITY_TYPE_VIDEO"] = 11] = "CAPABILITY_TYPE_VIDEO";
|
|
62
|
+
/** CAPABILITY_TYPE_EMBEDDINGS - Vector embedding generation */
|
|
53
63
|
CapabilityType[CapabilityType["CAPABILITY_TYPE_EMBEDDINGS"] = 12] = "CAPABILITY_TYPE_EMBEDDINGS";
|
|
64
|
+
/** CAPABILITY_TYPE_FINE_TUNING - Custom model training/fine-tuning */
|
|
54
65
|
CapabilityType[CapabilityType["CAPABILITY_TYPE_FINE_TUNING"] = 13] = "CAPABILITY_TYPE_FINE_TUNING";
|
|
55
66
|
CapabilityType[CapabilityType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
56
67
|
})(CapabilityType || (exports.CapabilityType = CapabilityType = {}));
|