litellm-api 0.0.3 → 1.0.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/components.cjs +157 -0
- package/dist/components.d.mts +291 -0
- package/dist/components.d.mts.map +1 -0
- package/dist/components.mjs +149 -0
- package/dist/index.cjs +417 -822
- package/dist/index.d.ts +677 -8103
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +365 -822
- package/dist/schemas.cjs +232 -0
- package/dist/schemas.d.mts +266 -0
- package/dist/schemas.d.mts.map +1 -0
- package/dist/schemas.mjs +182 -0
- package/dist/types.cjs +1 -0
- package/dist/types.d.mts +333 -0
- package/dist/types.d.mts.map +1 -0
- package/dist/types.mjs +1 -0
- package/package.json +51 -17
- package/.turbo/turbo-build.log +0 -14
- package/CHANGELOG.md +0 -13
- package/README.md +0 -11
- package/dist/index.d.cts +0 -8173
- package/dist/index.d.mts +0 -8173
- package/tsconfig.json +0 -19
package/dist/schemas.mjs
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
const checkoutResponseSchema = z.object({
|
|
5
|
+
"url": z.string().describe("Stripe Checkout URL — redirect the user here")
|
|
6
|
+
});
|
|
7
|
+
const freeTierResponseSchema = z.object({
|
|
8
|
+
"ip_hash": z.string(),
|
|
9
|
+
"requests_today": z.int(),
|
|
10
|
+
"daily_limit": z.int(),
|
|
11
|
+
"remaining": z.int()
|
|
12
|
+
});
|
|
13
|
+
const validationErrorSchema = z.object({
|
|
14
|
+
"loc": z.array(z.union([
|
|
15
|
+
z.string(),
|
|
16
|
+
z.int()
|
|
17
|
+
])),
|
|
18
|
+
"msg": z.string(),
|
|
19
|
+
"type": z.string(),
|
|
20
|
+
"input": z.unknown().optional(),
|
|
21
|
+
"ctx": z.object({}).optional()
|
|
22
|
+
});
|
|
23
|
+
const HTTPValidationErrorSchema = z.object({
|
|
24
|
+
"detail": z.array(validationErrorSchema).optional()
|
|
25
|
+
});
|
|
26
|
+
const modelCatalogEntrySchema = z.object({
|
|
27
|
+
"id": z.string().describe("Canonical model identifier (e.g. 'gpt-4o')"),
|
|
28
|
+
"object": z.string().optional().default("model_catalog.entry"),
|
|
29
|
+
"provider": z.union([
|
|
30
|
+
z.string(),
|
|
31
|
+
z.null()
|
|
32
|
+
]).optional().describe("LiteLLM provider key (e.g. 'openai', 'azure')"),
|
|
33
|
+
"mode": z.union([
|
|
34
|
+
z.string(),
|
|
35
|
+
z.null()
|
|
36
|
+
]).optional().describe("Model mode: chat, embedding, completion, image_generation, etc."),
|
|
37
|
+
"max_input_tokens": z.union([
|
|
38
|
+
z.int(),
|
|
39
|
+
z.null()
|
|
40
|
+
]).optional(),
|
|
41
|
+
"max_output_tokens": z.union([
|
|
42
|
+
z.int(),
|
|
43
|
+
z.null()
|
|
44
|
+
]).optional(),
|
|
45
|
+
"max_tokens": z.union([
|
|
46
|
+
z.int(),
|
|
47
|
+
z.null()
|
|
48
|
+
]).optional().describe("Legacy combined token limit"),
|
|
49
|
+
"input_cost_per_token": z.union([
|
|
50
|
+
z.number(),
|
|
51
|
+
z.null()
|
|
52
|
+
]).optional(),
|
|
53
|
+
"output_cost_per_token": z.union([
|
|
54
|
+
z.number(),
|
|
55
|
+
z.null()
|
|
56
|
+
]).optional(),
|
|
57
|
+
"cache_read_input_token_cost": z.union([
|
|
58
|
+
z.number(),
|
|
59
|
+
z.null()
|
|
60
|
+
]).optional(),
|
|
61
|
+
"input_cost_per_audio_token": z.union([
|
|
62
|
+
z.number(),
|
|
63
|
+
z.null()
|
|
64
|
+
]).optional(),
|
|
65
|
+
"output_cost_per_reasoning_token": z.union([
|
|
66
|
+
z.number(),
|
|
67
|
+
z.null()
|
|
68
|
+
]).optional(),
|
|
69
|
+
"deprecation_date": z.union([
|
|
70
|
+
z.string(),
|
|
71
|
+
z.null()
|
|
72
|
+
]).optional().describe("ISO date when the model is deprecated (YYYY-MM-DD)"),
|
|
73
|
+
"supports_function_calling": z.union([
|
|
74
|
+
z.boolean(),
|
|
75
|
+
z.null()
|
|
76
|
+
]).optional(),
|
|
77
|
+
"supports_parallel_function_calling": z.union([
|
|
78
|
+
z.boolean(),
|
|
79
|
+
z.null()
|
|
80
|
+
]).optional(),
|
|
81
|
+
"supports_vision": z.union([
|
|
82
|
+
z.boolean(),
|
|
83
|
+
z.null()
|
|
84
|
+
]).optional(),
|
|
85
|
+
"supports_audio_input": z.union([
|
|
86
|
+
z.boolean(),
|
|
87
|
+
z.null()
|
|
88
|
+
]).optional(),
|
|
89
|
+
"supports_audio_output": z.union([
|
|
90
|
+
z.boolean(),
|
|
91
|
+
z.null()
|
|
92
|
+
]).optional(),
|
|
93
|
+
"supports_prompt_caching": z.union([
|
|
94
|
+
z.boolean(),
|
|
95
|
+
z.null()
|
|
96
|
+
]).optional(),
|
|
97
|
+
"supports_reasoning": z.union([
|
|
98
|
+
z.boolean(),
|
|
99
|
+
z.null()
|
|
100
|
+
]).optional(),
|
|
101
|
+
"supports_response_schema": z.union([
|
|
102
|
+
z.boolean(),
|
|
103
|
+
z.null()
|
|
104
|
+
]).optional(),
|
|
105
|
+
"supports_system_messages": z.union([
|
|
106
|
+
z.boolean(),
|
|
107
|
+
z.null()
|
|
108
|
+
]).optional(),
|
|
109
|
+
"supports_web_search": z.union([
|
|
110
|
+
z.boolean(),
|
|
111
|
+
z.null()
|
|
112
|
+
]).optional()
|
|
113
|
+
}).catchall(z.unknown()).describe("A single model in the catalog.");
|
|
114
|
+
const modelCatalogListResponseSchema = z.object({
|
|
115
|
+
"object": z.string().optional().default("list"),
|
|
116
|
+
"data": z.array(modelCatalogEntrySchema),
|
|
117
|
+
"total_count": z.int().describe("Total models matching the filters"),
|
|
118
|
+
"has_more": z.boolean(),
|
|
119
|
+
"page": z.int(),
|
|
120
|
+
"page_size": z.int()
|
|
121
|
+
}).describe("Stripe-style list response.");
|
|
122
|
+
const createCheckoutBillingCheckoutPostStatus200Schema = checkoutResponseSchema;
|
|
123
|
+
const createCheckoutBillingCheckoutPostResponseSchema = createCheckoutBillingCheckoutPostStatus200Schema;
|
|
124
|
+
const checkUsageBillingUsageGetStatus200Schema = freeTierResponseSchema;
|
|
125
|
+
const checkUsageBillingUsageGetResponseSchema = checkUsageBillingUsageGetStatus200Schema;
|
|
126
|
+
const listModelCatalogModelCatalogGetQueryProviderSchema = z.union([
|
|
127
|
+
z.string(),
|
|
128
|
+
z.null()
|
|
129
|
+
]).optional().describe("Filter by provider (e.g. 'openai', 'anthropic', 'bedrock'). Case-insensitive.");
|
|
130
|
+
const listModelCatalogModelCatalogGetQueryModeSchema = z.union([
|
|
131
|
+
z.string(),
|
|
132
|
+
z.null()
|
|
133
|
+
]).optional().describe("Filter by mode (e.g. 'chat', 'embedding', 'image_generation').");
|
|
134
|
+
const listModelCatalogModelCatalogGetQueryModelSchema = z.union([
|
|
135
|
+
z.string(),
|
|
136
|
+
z.null()
|
|
137
|
+
]).optional().describe("Filter by model name. Supports substring match or regex (prefix with 're:').");
|
|
138
|
+
const listModelCatalogModelCatalogGetQuerySupportsVisionSchema = z.union([
|
|
139
|
+
z.boolean(),
|
|
140
|
+
z.null()
|
|
141
|
+
]).optional();
|
|
142
|
+
const listModelCatalogModelCatalogGetQuerySupportsFunctionCallingSchema = z.union([
|
|
143
|
+
z.boolean(),
|
|
144
|
+
z.null()
|
|
145
|
+
]).optional();
|
|
146
|
+
const listModelCatalogModelCatalogGetQuerySupportsReasoningSchema = z.union([
|
|
147
|
+
z.boolean(),
|
|
148
|
+
z.null()
|
|
149
|
+
]).optional();
|
|
150
|
+
const listModelCatalogModelCatalogGetQuerySupportsAudioInputSchema = z.union([
|
|
151
|
+
z.boolean(),
|
|
152
|
+
z.null()
|
|
153
|
+
]).optional();
|
|
154
|
+
const listModelCatalogModelCatalogGetQuerySupportsAudioOutputSchema = z.union([
|
|
155
|
+
z.boolean(),
|
|
156
|
+
z.null()
|
|
157
|
+
]).optional();
|
|
158
|
+
const listModelCatalogModelCatalogGetQuerySupportsPromptCachingSchema = z.union([
|
|
159
|
+
z.boolean(),
|
|
160
|
+
z.null()
|
|
161
|
+
]).optional();
|
|
162
|
+
const listModelCatalogModelCatalogGetQuerySupportsResponseSchemaSchema = z.union([
|
|
163
|
+
z.boolean(),
|
|
164
|
+
z.null()
|
|
165
|
+
]).optional();
|
|
166
|
+
const listModelCatalogModelCatalogGetQueryPageSchema = z.int().min(1).optional().default(1).describe("Page number (1-indexed)");
|
|
167
|
+
const listModelCatalogModelCatalogGetQueryPageSizeSchema = z.int().min(1).max(500).optional().default(50).describe("Number of results per page (max 500)");
|
|
168
|
+
const listModelCatalogModelCatalogGetStatus200Schema = modelCatalogListResponseSchema.describe("Stripe-style list response.");
|
|
169
|
+
const listModelCatalogModelCatalogGetStatus422Schema = HTTPValidationErrorSchema;
|
|
170
|
+
const listModelCatalogModelCatalogGetResponseSchema = z.union([
|
|
171
|
+
listModelCatalogModelCatalogGetStatus200Schema,
|
|
172
|
+
listModelCatalogModelCatalogGetStatus422Schema
|
|
173
|
+
]);
|
|
174
|
+
const getModelCatalogEntryModelCatalogModelIdGetPathModelIdSchema = z.string();
|
|
175
|
+
const getModelCatalogEntryModelCatalogModelIdGetStatus200Schema = modelCatalogEntrySchema.describe("A single model in the catalog.");
|
|
176
|
+
const getModelCatalogEntryModelCatalogModelIdGetStatus422Schema = HTTPValidationErrorSchema;
|
|
177
|
+
const getModelCatalogEntryModelCatalogModelIdGetResponseSchema = z.union([
|
|
178
|
+
getModelCatalogEntryModelCatalogModelIdGetStatus200Schema,
|
|
179
|
+
getModelCatalogEntryModelCatalogModelIdGetStatus422Schema
|
|
180
|
+
]);
|
|
181
|
+
|
|
182
|
+
export { HTTPValidationErrorSchema, checkUsageBillingUsageGetResponseSchema, checkUsageBillingUsageGetStatus200Schema, checkoutResponseSchema, createCheckoutBillingCheckoutPostResponseSchema, createCheckoutBillingCheckoutPostStatus200Schema, freeTierResponseSchema, getModelCatalogEntryModelCatalogModelIdGetPathModelIdSchema, getModelCatalogEntryModelCatalogModelIdGetResponseSchema, getModelCatalogEntryModelCatalogModelIdGetStatus200Schema, getModelCatalogEntryModelCatalogModelIdGetStatus422Schema, listModelCatalogModelCatalogGetQueryModeSchema, listModelCatalogModelCatalogGetQueryModelSchema, listModelCatalogModelCatalogGetQueryPageSchema, listModelCatalogModelCatalogGetQueryPageSizeSchema, listModelCatalogModelCatalogGetQueryProviderSchema, listModelCatalogModelCatalogGetQuerySupportsAudioInputSchema, listModelCatalogModelCatalogGetQuerySupportsAudioOutputSchema, listModelCatalogModelCatalogGetQuerySupportsFunctionCallingSchema, listModelCatalogModelCatalogGetQuerySupportsPromptCachingSchema, listModelCatalogModelCatalogGetQuerySupportsReasoningSchema, listModelCatalogModelCatalogGetQuerySupportsResponseSchemaSchema, listModelCatalogModelCatalogGetQuerySupportsVisionSchema, listModelCatalogModelCatalogGetResponseSchema, listModelCatalogModelCatalogGetStatus200Schema, listModelCatalogModelCatalogGetStatus422Schema, modelCatalogEntrySchema, modelCatalogListResponseSchema, validationErrorSchema };
|
package/dist/types.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @type object
|
|
7
|
+
*/
|
|
8
|
+
type CheckoutResponse = {
|
|
9
|
+
/**
|
|
10
|
+
* @description Stripe Checkout URL — redirect the user here
|
|
11
|
+
* @type string
|
|
12
|
+
*/
|
|
13
|
+
url: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @type object
|
|
17
|
+
*/
|
|
18
|
+
type FreeTierResponse = {
|
|
19
|
+
/**
|
|
20
|
+
* @type string
|
|
21
|
+
*/
|
|
22
|
+
ip_hash: string;
|
|
23
|
+
/**
|
|
24
|
+
* @type integer
|
|
25
|
+
*/
|
|
26
|
+
requests_today: number;
|
|
27
|
+
/**
|
|
28
|
+
* @type integer
|
|
29
|
+
*/
|
|
30
|
+
daily_limit: number;
|
|
31
|
+
/**
|
|
32
|
+
* @type integer
|
|
33
|
+
*/
|
|
34
|
+
remaining: number;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* @type object
|
|
38
|
+
*/
|
|
39
|
+
type ValidationError = {
|
|
40
|
+
/**
|
|
41
|
+
* @type array
|
|
42
|
+
*/
|
|
43
|
+
loc: (string | number)[];
|
|
44
|
+
/**
|
|
45
|
+
* @type string
|
|
46
|
+
*/
|
|
47
|
+
msg: string;
|
|
48
|
+
/**
|
|
49
|
+
* @type string
|
|
50
|
+
*/
|
|
51
|
+
type: string;
|
|
52
|
+
/**
|
|
53
|
+
* @type unknown | undefined
|
|
54
|
+
*/
|
|
55
|
+
input?: unknown | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* @type object | undefined
|
|
58
|
+
*/
|
|
59
|
+
ctx?: object | undefined;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* @type object
|
|
63
|
+
*/
|
|
64
|
+
type HTTPValidationError = {
|
|
65
|
+
/**
|
|
66
|
+
* @type array | undefined
|
|
67
|
+
*/
|
|
68
|
+
detail?: ValidationError[] | undefined;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* @description A single model in the catalog.
|
|
72
|
+
* @type object
|
|
73
|
+
*/
|
|
74
|
+
type ModelCatalogEntry = {
|
|
75
|
+
/**
|
|
76
|
+
* @description Canonical model identifier (e.g. \'gpt-4o\')
|
|
77
|
+
* @type string
|
|
78
|
+
*/
|
|
79
|
+
id: string;
|
|
80
|
+
/**
|
|
81
|
+
* @default "model_catalog.entry"
|
|
82
|
+
* @type string | undefined
|
|
83
|
+
*/
|
|
84
|
+
object?: string | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* @description LiteLLM provider key (e.g. \'openai\', \'azure\')
|
|
87
|
+
*/
|
|
88
|
+
provider?: (string | null) | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* @description Model mode: chat, embedding, completion, image_generation, etc.
|
|
91
|
+
*/
|
|
92
|
+
mode?: (string | null) | undefined;
|
|
93
|
+
max_input_tokens?: (number | null) | undefined;
|
|
94
|
+
max_output_tokens?: (number | null) | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* @description Legacy combined token limit
|
|
97
|
+
*/
|
|
98
|
+
max_tokens?: (number | null) | undefined;
|
|
99
|
+
input_cost_per_token?: (number | null) | undefined;
|
|
100
|
+
output_cost_per_token?: (number | null) | undefined;
|
|
101
|
+
cache_read_input_token_cost?: (number | null) | undefined;
|
|
102
|
+
input_cost_per_audio_token?: (number | null) | undefined;
|
|
103
|
+
output_cost_per_reasoning_token?: (number | null) | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* @description ISO date when the model is deprecated (YYYY-MM-DD)
|
|
106
|
+
*/
|
|
107
|
+
deprecation_date?: (string | null) | undefined;
|
|
108
|
+
supports_function_calling?: (boolean | null) | undefined;
|
|
109
|
+
supports_parallel_function_calling?: (boolean | null) | undefined;
|
|
110
|
+
supports_vision?: (boolean | null) | undefined;
|
|
111
|
+
supports_audio_input?: (boolean | null) | undefined;
|
|
112
|
+
supports_audio_output?: (boolean | null) | undefined;
|
|
113
|
+
supports_prompt_caching?: (boolean | null) | undefined;
|
|
114
|
+
supports_reasoning?: (boolean | null) | undefined;
|
|
115
|
+
supports_response_schema?: (boolean | null) | undefined;
|
|
116
|
+
supports_system_messages?: (boolean | null) | undefined;
|
|
117
|
+
supports_web_search?: (boolean | null) | undefined;
|
|
118
|
+
[key: string]: unknown;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* @description Stripe-style list response.
|
|
122
|
+
* @type object
|
|
123
|
+
*/
|
|
124
|
+
type ModelCatalogListResponse = {
|
|
125
|
+
/**
|
|
126
|
+
* @default "list"
|
|
127
|
+
* @type string | undefined
|
|
128
|
+
*/
|
|
129
|
+
object?: string | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* @type array
|
|
132
|
+
*/
|
|
133
|
+
data: ModelCatalogEntry[];
|
|
134
|
+
/**
|
|
135
|
+
* @description Total models matching the filters
|
|
136
|
+
* @type integer
|
|
137
|
+
*/
|
|
138
|
+
total_count: number;
|
|
139
|
+
/**
|
|
140
|
+
* @type boolean
|
|
141
|
+
*/
|
|
142
|
+
has_more: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* @type integer
|
|
145
|
+
*/
|
|
146
|
+
page: number;
|
|
147
|
+
/**
|
|
148
|
+
* @type integer
|
|
149
|
+
*/
|
|
150
|
+
page_size: number;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* @type object
|
|
154
|
+
*/
|
|
155
|
+
type CreateCheckoutBillingCheckoutPostStatus200 = CheckoutResponse;
|
|
156
|
+
/**
|
|
157
|
+
* @type object
|
|
158
|
+
*/
|
|
159
|
+
type CreateCheckoutBillingCheckoutPostRequestConfig = {
|
|
160
|
+
data?: never | undefined;
|
|
161
|
+
pathParams?: never | undefined;
|
|
162
|
+
queryParams?: never | undefined;
|
|
163
|
+
headerParams?: never | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* @type string
|
|
166
|
+
*/
|
|
167
|
+
url: "/billing/checkout";
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* @type object
|
|
171
|
+
*/
|
|
172
|
+
type CreateCheckoutBillingCheckoutPostResponses = {
|
|
173
|
+
"200": CreateCheckoutBillingCheckoutPostStatus200;
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* @description Union of all possible responses
|
|
177
|
+
*/
|
|
178
|
+
type CreateCheckoutBillingCheckoutPostResponse = CreateCheckoutBillingCheckoutPostStatus200;
|
|
179
|
+
/**
|
|
180
|
+
* @type object
|
|
181
|
+
*/
|
|
182
|
+
type CheckUsageBillingUsageGetStatus200 = FreeTierResponse;
|
|
183
|
+
/**
|
|
184
|
+
* @type object
|
|
185
|
+
*/
|
|
186
|
+
type CheckUsageBillingUsageGetRequestConfig = {
|
|
187
|
+
data?: never | undefined;
|
|
188
|
+
pathParams?: never | undefined;
|
|
189
|
+
queryParams?: never | undefined;
|
|
190
|
+
headerParams?: never | undefined;
|
|
191
|
+
/**
|
|
192
|
+
* @type string
|
|
193
|
+
*/
|
|
194
|
+
url: "/billing/usage";
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* @type object
|
|
198
|
+
*/
|
|
199
|
+
type CheckUsageBillingUsageGetResponses = {
|
|
200
|
+
"200": CheckUsageBillingUsageGetStatus200;
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* @description Union of all possible responses
|
|
204
|
+
*/
|
|
205
|
+
type CheckUsageBillingUsageGetResponse = CheckUsageBillingUsageGetStatus200;
|
|
206
|
+
/**
|
|
207
|
+
* @description Filter by provider (e.g. \'openai\', \'anthropic\', \'bedrock\'). Case-insensitive.
|
|
208
|
+
*/
|
|
209
|
+
type ListModelCatalogModelCatalogGetQueryProvider = (string | null) | undefined;
|
|
210
|
+
/**
|
|
211
|
+
* @description Filter by mode (e.g. \'chat\', \'embedding\', \'image_generation\').
|
|
212
|
+
*/
|
|
213
|
+
type ListModelCatalogModelCatalogGetQueryMode = (string | null) | undefined;
|
|
214
|
+
/**
|
|
215
|
+
* @description Filter by model name. Supports substring match or regex (prefix with \'re:\').
|
|
216
|
+
*/
|
|
217
|
+
type ListModelCatalogModelCatalogGetQueryModel = (string | null) | undefined;
|
|
218
|
+
type ListModelCatalogModelCatalogGetQuerySupportsVision = (boolean | null) | undefined;
|
|
219
|
+
type ListModelCatalogModelCatalogGetQuerySupportsFunctionCalling = (boolean | null) | undefined;
|
|
220
|
+
type ListModelCatalogModelCatalogGetQuerySupportsReasoning = (boolean | null) | undefined;
|
|
221
|
+
type ListModelCatalogModelCatalogGetQuerySupportsAudioInput = (boolean | null) | undefined;
|
|
222
|
+
type ListModelCatalogModelCatalogGetQuerySupportsAudioOutput = (boolean | null) | undefined;
|
|
223
|
+
type ListModelCatalogModelCatalogGetQuerySupportsPromptCaching = (boolean | null) | undefined;
|
|
224
|
+
type ListModelCatalogModelCatalogGetQuerySupportsResponseSchema = (boolean | null) | undefined;
|
|
225
|
+
/**
|
|
226
|
+
* @description Page number (1-indexed)
|
|
227
|
+
* @minLength 1
|
|
228
|
+
* @default 1
|
|
229
|
+
* @type integer | undefined
|
|
230
|
+
*/
|
|
231
|
+
type ListModelCatalogModelCatalogGetQueryPage = number | undefined;
|
|
232
|
+
/**
|
|
233
|
+
* @description Number of results per page (max 500)
|
|
234
|
+
* @minLength 1
|
|
235
|
+
* @maxLength 500
|
|
236
|
+
* @default 50
|
|
237
|
+
* @type integer | undefined
|
|
238
|
+
*/
|
|
239
|
+
type ListModelCatalogModelCatalogGetQueryPageSize = number | undefined;
|
|
240
|
+
/**
|
|
241
|
+
* @description Stripe-style list response.
|
|
242
|
+
* @type object
|
|
243
|
+
*/
|
|
244
|
+
type ListModelCatalogModelCatalogGetStatus200 = ModelCatalogListResponse;
|
|
245
|
+
/**
|
|
246
|
+
* @type object
|
|
247
|
+
*/
|
|
248
|
+
type ListModelCatalogModelCatalogGetStatus422 = HTTPValidationError;
|
|
249
|
+
/**
|
|
250
|
+
* @type object
|
|
251
|
+
*/
|
|
252
|
+
type ListModelCatalogModelCatalogGetRequestConfig = {
|
|
253
|
+
data?: never | undefined;
|
|
254
|
+
pathParams?: never | undefined;
|
|
255
|
+
/**
|
|
256
|
+
* @type object | undefined
|
|
257
|
+
*/
|
|
258
|
+
queryParams?: {
|
|
259
|
+
provider?: ListModelCatalogModelCatalogGetQueryProvider | undefined;
|
|
260
|
+
mode?: ListModelCatalogModelCatalogGetQueryMode | undefined;
|
|
261
|
+
model?: ListModelCatalogModelCatalogGetQueryModel | undefined;
|
|
262
|
+
supports_vision?: ListModelCatalogModelCatalogGetQuerySupportsVision | undefined;
|
|
263
|
+
supports_function_calling?: ListModelCatalogModelCatalogGetQuerySupportsFunctionCalling | undefined;
|
|
264
|
+
supports_reasoning?: ListModelCatalogModelCatalogGetQuerySupportsReasoning | undefined;
|
|
265
|
+
supports_audio_input?: ListModelCatalogModelCatalogGetQuerySupportsAudioInput | undefined;
|
|
266
|
+
supports_audio_output?: ListModelCatalogModelCatalogGetQuerySupportsAudioOutput | undefined;
|
|
267
|
+
supports_prompt_caching?: ListModelCatalogModelCatalogGetQuerySupportsPromptCaching | undefined;
|
|
268
|
+
supports_response_schema?: ListModelCatalogModelCatalogGetQuerySupportsResponseSchema | undefined;
|
|
269
|
+
page?: ListModelCatalogModelCatalogGetQueryPage | undefined;
|
|
270
|
+
page_size?: ListModelCatalogModelCatalogGetQueryPageSize | undefined;
|
|
271
|
+
} | undefined;
|
|
272
|
+
headerParams?: never | undefined;
|
|
273
|
+
/**
|
|
274
|
+
* @type string
|
|
275
|
+
*/
|
|
276
|
+
url: "/model_catalog";
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* @type object
|
|
280
|
+
*/
|
|
281
|
+
type ListModelCatalogModelCatalogGetResponses = {
|
|
282
|
+
"200": ListModelCatalogModelCatalogGetStatus200;
|
|
283
|
+
"422": ListModelCatalogModelCatalogGetStatus422;
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* @description Union of all possible responses
|
|
287
|
+
*/
|
|
288
|
+
type ListModelCatalogModelCatalogGetResponse = (ListModelCatalogModelCatalogGetStatus200 | ListModelCatalogModelCatalogGetStatus422);
|
|
289
|
+
/**
|
|
290
|
+
* @type string
|
|
291
|
+
*/
|
|
292
|
+
type GetModelCatalogEntryModelCatalogModelIdGetPathModelId = string;
|
|
293
|
+
/**
|
|
294
|
+
* @description A single model in the catalog.
|
|
295
|
+
* @type object
|
|
296
|
+
*/
|
|
297
|
+
type GetModelCatalogEntryModelCatalogModelIdGetStatus200 = ModelCatalogEntry;
|
|
298
|
+
/**
|
|
299
|
+
* @type object
|
|
300
|
+
*/
|
|
301
|
+
type GetModelCatalogEntryModelCatalogModelIdGetStatus422 = HTTPValidationError;
|
|
302
|
+
/**
|
|
303
|
+
* @type object
|
|
304
|
+
*/
|
|
305
|
+
type GetModelCatalogEntryModelCatalogModelIdGetRequestConfig = {
|
|
306
|
+
data?: never | undefined;
|
|
307
|
+
/**
|
|
308
|
+
* @type object
|
|
309
|
+
*/
|
|
310
|
+
pathParams: {
|
|
311
|
+
model_id: GetModelCatalogEntryModelCatalogModelIdGetPathModelId;
|
|
312
|
+
};
|
|
313
|
+
queryParams?: never | undefined;
|
|
314
|
+
headerParams?: never | undefined;
|
|
315
|
+
/**
|
|
316
|
+
* @type string
|
|
317
|
+
*/
|
|
318
|
+
url: `/model_catalog/${string}`;
|
|
319
|
+
};
|
|
320
|
+
/**
|
|
321
|
+
* @type object
|
|
322
|
+
*/
|
|
323
|
+
type GetModelCatalogEntryModelCatalogModelIdGetResponses = {
|
|
324
|
+
"200": GetModelCatalogEntryModelCatalogModelIdGetStatus200;
|
|
325
|
+
"422": GetModelCatalogEntryModelCatalogModelIdGetStatus422;
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
* @description Union of all possible responses
|
|
329
|
+
*/
|
|
330
|
+
type GetModelCatalogEntryModelCatalogModelIdGetResponse = (GetModelCatalogEntryModelCatalogModelIdGetStatus200 | GetModelCatalogEntryModelCatalogModelIdGetStatus422);
|
|
331
|
+
|
|
332
|
+
export type { CheckUsageBillingUsageGetRequestConfig, CheckUsageBillingUsageGetResponse, CheckUsageBillingUsageGetResponses, CheckUsageBillingUsageGetStatus200, CheckoutResponse, CreateCheckoutBillingCheckoutPostRequestConfig, CreateCheckoutBillingCheckoutPostResponse, CreateCheckoutBillingCheckoutPostResponses, CreateCheckoutBillingCheckoutPostStatus200, FreeTierResponse, GetModelCatalogEntryModelCatalogModelIdGetPathModelId, GetModelCatalogEntryModelCatalogModelIdGetRequestConfig, GetModelCatalogEntryModelCatalogModelIdGetResponse, GetModelCatalogEntryModelCatalogModelIdGetResponses, GetModelCatalogEntryModelCatalogModelIdGetStatus200, GetModelCatalogEntryModelCatalogModelIdGetStatus422, HTTPValidationError, ListModelCatalogModelCatalogGetQueryMode, ListModelCatalogModelCatalogGetQueryModel, ListModelCatalogModelCatalogGetQueryPage, ListModelCatalogModelCatalogGetQueryPageSize, ListModelCatalogModelCatalogGetQueryProvider, ListModelCatalogModelCatalogGetQuerySupportsAudioInput, ListModelCatalogModelCatalogGetQuerySupportsAudioOutput, ListModelCatalogModelCatalogGetQuerySupportsFunctionCalling, ListModelCatalogModelCatalogGetQuerySupportsPromptCaching, ListModelCatalogModelCatalogGetQuerySupportsReasoning, ListModelCatalogModelCatalogGetQuerySupportsResponseSchema, ListModelCatalogModelCatalogGetQuerySupportsVision, ListModelCatalogModelCatalogGetRequestConfig, ListModelCatalogModelCatalogGetResponse, ListModelCatalogModelCatalogGetResponses, ListModelCatalogModelCatalogGetStatus200, ListModelCatalogModelCatalogGetStatus422, ModelCatalogEntry, ModelCatalogListResponse, ValidationError };
|
|
333
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.mts","sources":["../src/generated/types.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,gBAAgB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,gBAAgB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,eAAe;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,mBAAmB;AACxB;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA,KAAK,iBAAiB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,wBAAwB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,iBAAiB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,0CAA0C,GAAG,gBAAgB;AAClE;AACA;AACA;AACA,KAAK,8CAA8C;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,0CAA0C;AAC/C,WAAW,0CAA0C;AACrD;AACA;AACA;AACA;AACA,KAAK,yCAAyC,GAAG,0CAA0C;AAC3F;AACA;AACA;AACA,KAAK,kCAAkC,GAAG,gBAAgB;AAC1D;AACA;AACA;AACA,KAAK,sCAAsC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kCAAkC;AACvC,WAAW,kCAAkC;AAC7C;AACA;AACA;AACA;AACA,KAAK,iCAAiC,GAAG,kCAAkC;AAC3E;AACA;AACA;AACA,KAAK,4CAA4C;AACjD;AACA;AACA;AACA,KAAK,wCAAwC;AAC7C;AACA;AACA;AACA,KAAK,yCAAyC;AAC9C,KAAK,kDAAkD;AACvD,KAAK,2DAA2D;AAChE,KAAK,qDAAqD;AAC1D,KAAK,sDAAsD;AAC3D,KAAK,uDAAuD;AAC5D,KAAK,yDAAyD;AAC9D,KAAK,0DAA0D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,wCAAwC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,4CAA4C;AACjD;AACA;AACA;AACA;AACA,KAAK,wCAAwC,GAAG,wBAAwB;AACxE;AACA;AACA;AACA,KAAK,wCAAwC,GAAG,mBAAmB;AACnE;AACA;AACA;AACA,KAAK,4CAA4C;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,eAAe,wCAAwC;AACvD,gBAAgB,yCAAyC;AACzD,0BAA0B,kDAAkD;AAC5E,oCAAoC,2DAA2D;AAC/F,6BAA6B,qDAAqD;AAClF,+BAA+B,sDAAsD;AACrF,gCAAgC,uDAAuD;AACvF,kCAAkC,yDAAyD;AAC3F,mCAAmC,0DAA0D;AAC7F,eAAe,wCAAwC;AACvD,oBAAoB,4CAA4C;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,wCAAwC;AAC7C,WAAW,wCAAwC;AACnD,WAAW,wCAAwC;AACnD;AACA;AACA;AACA;AACA,KAAK,uCAAuC,IAAI,wCAAwC,GAAG,wCAAwC;AACnI;AACA;AACA;AACA,KAAK,qDAAqD;AAC1D;AACA;AACA;AACA;AACA,KAAK,mDAAmD,GAAG,iBAAiB;AAC5E;AACA;AACA;AACA,KAAK,mDAAmD,GAAG,mBAAmB;AAC9E;AACA;AACA;AACA,KAAK,uDAAuD;AAC5D;AACA;AACA;AACA;AACA;AACA,kBAAkB,qDAAqD;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,mDAAmD;AACxD,WAAW,mDAAmD;AAC9D,WAAW,mDAAmD;AAC9D;AACA;AACA;AACA;AACA,KAAK,kDAAkD,IAAI,mDAAmD,GAAG,mDAAmD;;;;","names":[]}
|
package/dist/types.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/package.json
CHANGED
|
@@ -1,36 +1,70 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "litellm-api",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "LiteLLM auto-generated type-safe API client",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"author": "SferaDev",
|
|
6
7
|
"license": "ISC",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/SferaDev/SferaDev.git"
|
|
11
|
+
},
|
|
7
12
|
"bugs": {
|
|
8
|
-
"url": "https://github.com/SferaDev/
|
|
13
|
+
"url": "https://github.com/SferaDev/SferaDev/issues"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/SferaDev/SferaDev#readme",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"zod": "4.4.3"
|
|
9
18
|
},
|
|
10
|
-
"
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@kubb/cli": "5.0.0-beta.10",
|
|
21
|
+
"kubb": "5.0.0-beta.10",
|
|
22
|
+
"@types/node": "25.9.2",
|
|
23
|
+
"bunchee": "6.11.0",
|
|
24
|
+
"openapi3-ts": "4.6.0",
|
|
25
|
+
"rimraf": "6.1.3",
|
|
26
|
+
"typescript": "6.0.3",
|
|
27
|
+
"@sferadev/openapi-utils": "0.0.1",
|
|
28
|
+
"@sferadev/tsconfig": "0.0.0"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist"
|
|
32
|
+
],
|
|
11
33
|
"main": "dist/index.cjs",
|
|
12
34
|
"module": "dist/index.mjs",
|
|
13
|
-
"
|
|
35
|
+
"types": "dist/index.d.ts",
|
|
36
|
+
"sideEffects": false,
|
|
14
37
|
"exports": {
|
|
15
38
|
"./package.json": "./package.json",
|
|
16
39
|
".": {
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
40
|
+
"types": "./dist/index.d.ts",
|
|
41
|
+
"import": "./dist/index.mjs",
|
|
42
|
+
"require": "./dist/index.cjs"
|
|
43
|
+
},
|
|
44
|
+
"./types": {
|
|
45
|
+
"types": "./dist/types.d.mts",
|
|
46
|
+
"import": "./dist/types.mjs",
|
|
47
|
+
"require": "./dist/types.cjs"
|
|
48
|
+
},
|
|
49
|
+
"./schemas": {
|
|
50
|
+
"types": "./dist/schemas.d.mts",
|
|
51
|
+
"import": "./dist/schemas.mjs",
|
|
52
|
+
"require": "./dist/schemas.cjs"
|
|
53
|
+
},
|
|
54
|
+
"./components": {
|
|
55
|
+
"types": "./dist/components.d.mts",
|
|
56
|
+
"import": "./dist/components.mjs",
|
|
57
|
+
"require": "./dist/components.cjs"
|
|
25
58
|
}
|
|
26
59
|
},
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"access": "public",
|
|
62
|
+
"provenance": true
|
|
30
63
|
},
|
|
31
64
|
"scripts": {
|
|
32
65
|
"tsc": "tsc --noEmit",
|
|
33
|
-
"build": "
|
|
34
|
-
"generate": "
|
|
66
|
+
"build": "bunchee",
|
|
67
|
+
"generate": "rimraf ./src/generated && kubb generate",
|
|
68
|
+
"is-tree-shakable": "is-tree-shakable"
|
|
35
69
|
}
|
|
36
70
|
}
|
package/.turbo/turbo-build.log
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> litellm-api@0.0.3 build /home/runner/work/openapi-clients/openapi-clients/packages/litellm-api
|
|
3
|
-
> unbuild
|
|
4
|
-
|
|
5
|
-
[info] Automatically detected entries: src/index [esm] [cjs] [dts]
|
|
6
|
-
[info] Building litellm-api
|
|
7
|
-
[info] Cleaning dist directory: `./dist`
|
|
8
|
-
[success] Build succeeded for litellm-api
|
|
9
|
-
[log] dist/index.cjs (total size: 37.2 kB, chunk size: 37.2 kB, exports: LiteLLMApi)
|
|
10
|
-
|
|
11
|
-
[log] dist/index.mjs (total size: 37.2 kB, chunk size: 37.2 kB, exports: LiteLLMApi)
|
|
12
|
-
|
|
13
|
-
Σ Total dist size (byte size): 1.64 MB
|
|
14
|
-
[log]
|
package/CHANGELOG.md
DELETED
package/README.md
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# LiteLLM API JavaScript SDK
|
|
2
|
-
|
|
3
|
-
Unofficial LiteLLM API JavaScript SDK built from the OpenAPI specification and with TypeScript types.
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
const litellm = new LiteLLMApi({ baseUrl, token });
|
|
7
|
-
|
|
8
|
-
const assistants = await litellm.request('GET /assistants', {});
|
|
9
|
-
|
|
10
|
-
const models = await litellm.api.modelManagement.modelListModelsGet({ queryParams: { team_id } });
|
|
11
|
-
```
|