weave-typescript 0.20.0 → 0.21.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.
@@ -0,0 +1,105 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { ProviderKind } from "../../provider/v1/provider.pb";
3
+ export declare const protobufPackage = "weaveapi.model.v1";
4
+ /** ModelPrimaryType identifies the primary output modality for a model. */
5
+ export declare enum ModelPrimaryType {
6
+ MODEL_PRIMARY_TYPE_UNSPECIFIED = 0,
7
+ MODEL_PRIMARY_TYPE_CHAT = 1,
8
+ MODEL_PRIMARY_TYPE_IMAGE_GENERATION = 2,
9
+ MODEL_PRIMARY_TYPE_EMBEDDING = 3,
10
+ MODEL_PRIMARY_TYPE_AUDIO = 4,
11
+ MODEL_PRIMARY_TYPE_VIDEO = 5,
12
+ MODEL_PRIMARY_TYPE_TEXT = 6,
13
+ UNRECOGNIZED = -1
14
+ }
15
+ export declare function modelPrimaryTypeFromJSON(object: any): ModelPrimaryType;
16
+ export declare function modelPrimaryTypeToJSON(object: ModelPrimaryType): string;
17
+ /** ModelCapability describes one normalized capability or input mode. */
18
+ export declare enum ModelCapability {
19
+ MODEL_CAPABILITY_UNSPECIFIED = 0,
20
+ MODEL_CAPABILITY_TOOLS = 1,
21
+ MODEL_CAPABILITY_IMAGE_INPUT = 2,
22
+ MODEL_CAPABILITY_PDF_INPUT = 3,
23
+ MODEL_CAPABILITY_DOC_INPUT = 4,
24
+ MODEL_CAPABILITY_CACHE_CONTROL = 5,
25
+ MODEL_CAPABILITY_THINKING = 6,
26
+ MODEL_CAPABILITY_STREAMING = 7,
27
+ MODEL_CAPABILITY_MIME_TYPE = 8,
28
+ UNRECOGNIZED = -1
29
+ }
30
+ export declare function modelCapabilityFromJSON(object: any): ModelCapability;
31
+ export declare function modelCapabilityToJSON(object: ModelCapability): string;
32
+ /** Model is one provider-scoped model record in the normalized catalog. */
33
+ export interface Model {
34
+ modelId: string;
35
+ displayName: string;
36
+ providerKind: ProviderKind;
37
+ primaryType: ModelPrimaryType;
38
+ capabilities: ModelCapability[];
39
+ maxInputTokens: number;
40
+ maxOutputTokens: number;
41
+ pricing: ModelPricing | undefined;
42
+ params: ModelParam[];
43
+ catalogUpdatedAt: Date | undefined;
44
+ }
45
+ /** ModelPricing captures normalized pricing metadata for one model. */
46
+ export interface ModelPricing {
47
+ inputTokenPricePerMillion: number;
48
+ outputTokenPricePerMillion: number;
49
+ cacheReadInputTokenPricePerMillion: number;
50
+ cacheWriteInputTokenPricePerMillion: number;
51
+ batchInputTokenPricePerMillion: number;
52
+ batchOutputTokenPricePerMillion: number;
53
+ imageGenerationPrices: ImageGenerationPrice[];
54
+ additionalUnitPrices: AdditionalUnitPrice[];
55
+ currency: string;
56
+ }
57
+ /** ImageGenerationPrice captures one image-generation price variant. */
58
+ export interface ImageGenerationPrice {
59
+ quality: string;
60
+ size: string;
61
+ price: number;
62
+ }
63
+ /** AdditionalUnitPrice captures one non-token price entry. */
64
+ export interface AdditionalUnitPrice {
65
+ unit: string;
66
+ price: number;
67
+ }
68
+ /** ModelParam describes one supported model parameter constraint. */
69
+ export interface ModelParam {
70
+ key: string;
71
+ type: string;
72
+ defaultValue: any | undefined;
73
+ minValue: any | undefined;
74
+ maxValue: any | undefined;
75
+ allowedValues: any[];
76
+ }
77
+ /** CatalogProvider identifies one configured provider visible in the catalog. */
78
+ export interface CatalogProvider {
79
+ providerKind: ProviderKind;
80
+ }
81
+ export declare const Model: MessageFns<Model>;
82
+ export declare const ModelPricing: MessageFns<ModelPricing>;
83
+ export declare const ImageGenerationPrice: MessageFns<ImageGenerationPrice>;
84
+ export declare const AdditionalUnitPrice: MessageFns<AdditionalUnitPrice>;
85
+ export declare const ModelParam: MessageFns<ModelParam>;
86
+ export declare const CatalogProvider: MessageFns<CatalogProvider>;
87
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
88
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
89
+ [K in keyof T]?: DeepPartial<T[K]>;
90
+ } : Partial<T>;
91
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
92
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
93
+ [K in keyof P]: Exact<P[K], I[K]>;
94
+ } & {
95
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
96
+ };
97
+ export interface MessageFns<T> {
98
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
99
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
100
+ fromJSON(object: any): T;
101
+ toJSON(message: T): unknown;
102
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
103
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
104
+ }
105
+ export {};