@layer-ai/sdk 0.1.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/LICENSE +21 -0
- package/README.md +288 -0
- package/dist/client.d.ts +19 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +59 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +3 -0
- package/dist/config/loader.d.ts +7 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +21 -0
- package/dist/config/parser.d.ts +5 -0
- package/dist/config/parser.d.ts.map +1 -0
- package/dist/config/parser.js +12 -0
- package/dist/config/validator.d.ts +3 -0
- package/dist/config/validator.d.ts.map +1 -0
- package/dist/config/validator.js +36 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/resources/gates.d.ts +51 -0
- package/dist/resources/gates.d.ts.map +1 -0
- package/dist/resources/gates.js +83 -0
- package/dist/resources/keys.d.ts +30 -0
- package/dist/resources/keys.d.ts.map +1 -0
- package/dist/resources/keys.js +46 -0
- package/dist/resources/logs.d.ts +8 -0
- package/dist/resources/logs.d.ts.map +1 -0
- package/dist/resources/logs.js +20 -0
- package/dist/types/api.d.ts +35 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/api.js +1 -0
- package/dist/types/config.d.ts +13 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +1 -0
- package/dist/types/gates.d.ts +26 -0
- package/dist/types/gates.d.ts.map +1 -0
- package/dist/types/gates.js +3 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +9 -0
- package/dist/types/keys.d.ts +11 -0
- package/dist/types/keys.d.ts.map +1 -0
- package/dist/types/keys.js +1 -0
- package/dist/types/logs.d.ts +21 -0
- package/dist/types/logs.d.ts.map +1 -0
- package/dist/types/logs.js +1 -0
- package/dist/types/model-registry.d.ts +395 -0
- package/dist/types/model-registry.d.ts.map +1 -0
- package/dist/types/model-registry.js +338 -0
- package/dist/types/models.d.ts +76 -0
- package/dist/types/models.d.ts.map +1 -0
- package/dist/types/models.js +7 -0
- package/dist/types/smart-routing.d.ts +6 -0
- package/dist/types/smart-routing.d.ts.map +1 -0
- package/dist/types/smart-routing.js +1 -0
- package/dist/types.d.ts +28 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Layer } from '../client.js';
|
|
2
|
+
import type { ApiKey, CreateKeyRequest, CreateKeyResponse } from '../types/index.js';
|
|
3
|
+
export declare class KeysResource {
|
|
4
|
+
private client;
|
|
5
|
+
constructor(client: Layer);
|
|
6
|
+
/**
|
|
7
|
+
* Create a new API key.
|
|
8
|
+
*
|
|
9
|
+
* Requires `adminMode: true` in Layer constructor.
|
|
10
|
+
*
|
|
11
|
+
* @throws Error if adminMode is not enabled
|
|
12
|
+
* @see https://docs.uselayer.ai/sdk/admin-mode
|
|
13
|
+
*/
|
|
14
|
+
create(data: CreateKeyRequest): Promise<CreateKeyResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* List all API keys.
|
|
17
|
+
* No admin mode required.
|
|
18
|
+
*/
|
|
19
|
+
list(): Promise<ApiKey[]>;
|
|
20
|
+
/**
|
|
21
|
+
* Delete an existint key.
|
|
22
|
+
*
|
|
23
|
+
* Requires `adminMode: true` in Layer constructor.
|
|
24
|
+
*
|
|
25
|
+
* @throws Error if adminMode is not enabled
|
|
26
|
+
* @see https://docs.uselayer.ai/sdk/admin-mode
|
|
27
|
+
*/
|
|
28
|
+
delete(id: string): Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/resources/keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAErF,qBAAa,YAAY;IACX,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,KAAK;IAEjC;;;;;;;OAOG;IACG,MAAM,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAShE;;;OAGG;IACG,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAO9B;;;;;;;MAOE;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAOxC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export class KeysResource {
|
|
2
|
+
constructor(client) {
|
|
3
|
+
this.client = client;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Create a new API key.
|
|
7
|
+
*
|
|
8
|
+
* Requires `adminMode: true` in Layer constructor.
|
|
9
|
+
*
|
|
10
|
+
* @throws Error if adminMode is not enabled
|
|
11
|
+
* @see https://docs.uselayer.ai/sdk/admin-mode
|
|
12
|
+
*/
|
|
13
|
+
async create(data) {
|
|
14
|
+
this.client.checkAdminMode();
|
|
15
|
+
return this.client.request({
|
|
16
|
+
method: 'POST',
|
|
17
|
+
path: '/v1/keys',
|
|
18
|
+
body: data,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* List all API keys.
|
|
23
|
+
* No admin mode required.
|
|
24
|
+
*/
|
|
25
|
+
async list() {
|
|
26
|
+
return this.client.request({
|
|
27
|
+
method: 'GET',
|
|
28
|
+
path: '/v1/keys',
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Delete an existint key.
|
|
33
|
+
*
|
|
34
|
+
* Requires `adminMode: true` in Layer constructor.
|
|
35
|
+
*
|
|
36
|
+
* @throws Error if adminMode is not enabled
|
|
37
|
+
* @see https://docs.uselayer.ai/sdk/admin-mode
|
|
38
|
+
*/
|
|
39
|
+
async delete(id) {
|
|
40
|
+
this.client.checkAdminMode();
|
|
41
|
+
await this.client.request({
|
|
42
|
+
method: 'DELETE',
|
|
43
|
+
path: `/v1/keys/${id}`,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Layer } from '../client.js';
|
|
2
|
+
import type { Log, ListLogOptions } from '../types/index.js';
|
|
3
|
+
export declare class LogsResource {
|
|
4
|
+
private client;
|
|
5
|
+
constructor(client: Layer);
|
|
6
|
+
list(options?: ListLogOptions): Promise<Log[]>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=logs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../src/resources/logs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAG7D,qBAAa,YAAY;IACX,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,KAAK;IAE3B,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;CAcrD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export class LogsResource {
|
|
2
|
+
constructor(client) {
|
|
3
|
+
this.client = client;
|
|
4
|
+
}
|
|
5
|
+
async list(options) {
|
|
6
|
+
const params = new URLSearchParams();
|
|
7
|
+
if (options?.limit)
|
|
8
|
+
params.set('limit', options.limit.toString());
|
|
9
|
+
if (options?.gate)
|
|
10
|
+
params.set('gate', options.gate);
|
|
11
|
+
if (options?.offset)
|
|
12
|
+
params.set('offset', options.offset.toString());
|
|
13
|
+
const query = params.toString();
|
|
14
|
+
const path = query ? `/v1/logs?${query}` : '/v1/logs';
|
|
15
|
+
return this.client.request({
|
|
16
|
+
method: 'GET',
|
|
17
|
+
path
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface Message {
|
|
2
|
+
role: 'system' | 'user' | 'assistant';
|
|
3
|
+
content: string;
|
|
4
|
+
}
|
|
5
|
+
export interface BaseCompletionParams {
|
|
6
|
+
model: string;
|
|
7
|
+
messages: Message[];
|
|
8
|
+
temperature?: number;
|
|
9
|
+
maxTokens?: number;
|
|
10
|
+
topP?: number;
|
|
11
|
+
systemPrompt?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CompletionRequest {
|
|
14
|
+
gate: string;
|
|
15
|
+
messages: Message[];
|
|
16
|
+
model?: string;
|
|
17
|
+
temperature?: number;
|
|
18
|
+
maxTokens?: number;
|
|
19
|
+
topP?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface CompletionResponse {
|
|
22
|
+
content: string;
|
|
23
|
+
model: string;
|
|
24
|
+
usage: {
|
|
25
|
+
promptTokens: number;
|
|
26
|
+
completionTokens: number;
|
|
27
|
+
totalTokens: number;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface ErrorResponse {
|
|
31
|
+
error: string;
|
|
32
|
+
message: string;
|
|
33
|
+
details?: any;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;CACjB;AAGD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAGD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE;QACL,YAAY,EAAE,MAAM,CAAC;QACrB,gBAAgB,EAAE,MAAM,CAAC;QACzB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAA;CACF;AAGD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,GAAG,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { GateBase } from './models.js';
|
|
2
|
+
/**
|
|
3
|
+
* config for a single gate in layer.config.yaml
|
|
4
|
+
* same format we have for what we have in the schema
|
|
5
|
+
*/
|
|
6
|
+
export type GateConfig = GateBase;
|
|
7
|
+
/**
|
|
8
|
+
* the complete layer.config.yaml file structurepad
|
|
9
|
+
*/
|
|
10
|
+
export interface LayerConfigFile {
|
|
11
|
+
gates: GateConfig[];
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type GateBase } from "./models.js";
|
|
2
|
+
import { MODEL_REGISTRY, type SupportedModel, type Provider } from "./model-registry.js";
|
|
3
|
+
export { MODEL_REGISTRY };
|
|
4
|
+
export type { SupportedModel, Provider };
|
|
5
|
+
/**
|
|
6
|
+
* Gate creation request
|
|
7
|
+
* Uses all fields from GateBase (name and model required, rest optional)
|
|
8
|
+
*/
|
|
9
|
+
export type CreateGateRequest = GateBase;
|
|
10
|
+
/**
|
|
11
|
+
* Gate update request
|
|
12
|
+
* All fields optional for partial updates (except can't change name)
|
|
13
|
+
*/
|
|
14
|
+
export type UpdateGateRequest = Partial<GateBase>;
|
|
15
|
+
export interface GateWithAnalytics {
|
|
16
|
+
id: string;
|
|
17
|
+
userId: string;
|
|
18
|
+
name: string;
|
|
19
|
+
model: SupportedModel;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
updatedAt: Date;
|
|
22
|
+
requestCount: number;
|
|
23
|
+
totalCost: number;
|
|
24
|
+
successRate: number;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=gates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gates.d.ts","sourceRoot":"","sources":["../../src/types/gates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAGzF,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC;AAEzC;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAEzC;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAGlD,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,cAAc,CAAC;IACtB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAC,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './models.js';
|
|
2
|
+
export * from './model-registry.js';
|
|
3
|
+
export * from './gates.js';
|
|
4
|
+
export * from './api.js';
|
|
5
|
+
export * from './keys.js';
|
|
6
|
+
export * from './logs.js';
|
|
7
|
+
export * from './smart-routing.js';
|
|
8
|
+
export * from './config.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Re-export all types from different files
|
|
2
|
+
export * from './models.js';
|
|
3
|
+
export * from './model-registry.js';
|
|
4
|
+
export * from './gates.js';
|
|
5
|
+
export * from './api.js';
|
|
6
|
+
export * from './keys.js';
|
|
7
|
+
export * from './logs.js';
|
|
8
|
+
export * from './smart-routing.js';
|
|
9
|
+
export * from './config.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/types/keys.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;CACd;AAGD,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,IAAI,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface Log {
|
|
2
|
+
id: string;
|
|
3
|
+
userId: string;
|
|
4
|
+
gateId: string | null;
|
|
5
|
+
gateName: string | null;
|
|
6
|
+
modelRequested: string;
|
|
7
|
+
modelUsed: string;
|
|
8
|
+
promptTokens: number;
|
|
9
|
+
completionTokens: number;
|
|
10
|
+
costUsd: number;
|
|
11
|
+
latencyMs: number;
|
|
12
|
+
success: number;
|
|
13
|
+
errorMessage: string | null;
|
|
14
|
+
loggedAt: Date;
|
|
15
|
+
}
|
|
16
|
+
export interface ListLogOptions {
|
|
17
|
+
limit?: number;
|
|
18
|
+
gate?: string;
|
|
19
|
+
offset?: number;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=logs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../src/types/logs.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,IAAI,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
export interface ModelEntry {
|
|
2
|
+
provider: string;
|
|
3
|
+
displayName: string;
|
|
4
|
+
pricing: {
|
|
5
|
+
input: number;
|
|
6
|
+
output: number;
|
|
7
|
+
};
|
|
8
|
+
benchmarks?: {
|
|
9
|
+
intelligence?: number;
|
|
10
|
+
coding?: number;
|
|
11
|
+
math?: number;
|
|
12
|
+
mmluPro?: number;
|
|
13
|
+
gpqa?: number;
|
|
14
|
+
};
|
|
15
|
+
performance?: {
|
|
16
|
+
outputTokenPerSecond?: number;
|
|
17
|
+
timeTofirstToken?: number;
|
|
18
|
+
intelligenceScore?: number;
|
|
19
|
+
};
|
|
20
|
+
context?: {
|
|
21
|
+
window?: number;
|
|
22
|
+
input: {
|
|
23
|
+
text: boolean;
|
|
24
|
+
image: boolean;
|
|
25
|
+
audio: boolean;
|
|
26
|
+
video: boolean;
|
|
27
|
+
};
|
|
28
|
+
output: {
|
|
29
|
+
text: boolean;
|
|
30
|
+
image: boolean;
|
|
31
|
+
audio: boolean;
|
|
32
|
+
video: boolean;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
isAvailable?: boolean;
|
|
36
|
+
lastUpdated?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare const MODEL_REGISTRY: {
|
|
39
|
+
readonly 'gpt-4o': {
|
|
40
|
+
readonly provider: "openai";
|
|
41
|
+
readonly displayName: "GPT-4o (Nov '24)";
|
|
42
|
+
readonly pricing: {
|
|
43
|
+
readonly input: 0.0025;
|
|
44
|
+
readonly output: 0.01;
|
|
45
|
+
};
|
|
46
|
+
readonly benchmarks: {
|
|
47
|
+
readonly intelligence: 27;
|
|
48
|
+
readonly coding: 24;
|
|
49
|
+
readonly math: 6;
|
|
50
|
+
readonly mmluPro: 0.748;
|
|
51
|
+
readonly gpqa: 0.543;
|
|
52
|
+
};
|
|
53
|
+
readonly performance: {
|
|
54
|
+
readonly outputTokenPerSecond: 137.258;
|
|
55
|
+
readonly timeTofirstToken: 0.531;
|
|
56
|
+
readonly intelligenceScore: 27;
|
|
57
|
+
};
|
|
58
|
+
readonly context: {
|
|
59
|
+
readonly window: 128000;
|
|
60
|
+
readonly input: {
|
|
61
|
+
readonly text: true;
|
|
62
|
+
readonly image: true;
|
|
63
|
+
readonly audio: false;
|
|
64
|
+
readonly video: false;
|
|
65
|
+
};
|
|
66
|
+
readonly output: {
|
|
67
|
+
readonly text: true;
|
|
68
|
+
readonly image: false;
|
|
69
|
+
readonly audio: false;
|
|
70
|
+
readonly video: false;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
readonly lastUpdated: "2025-11-27";
|
|
74
|
+
};
|
|
75
|
+
readonly 'gpt-4o-mini': {
|
|
76
|
+
readonly provider: "openai";
|
|
77
|
+
readonly displayName: "GPT-4o mini";
|
|
78
|
+
readonly pricing: {
|
|
79
|
+
readonly input: 0.00015;
|
|
80
|
+
readonly output: 0.0006;
|
|
81
|
+
};
|
|
82
|
+
readonly benchmarks: {
|
|
83
|
+
readonly intelligence: 21.2;
|
|
84
|
+
readonly math: 14.7;
|
|
85
|
+
readonly mmluPro: 0.648;
|
|
86
|
+
readonly gpqa: 0.426;
|
|
87
|
+
};
|
|
88
|
+
readonly performance: {
|
|
89
|
+
readonly outputTokenPerSecond: 49.306;
|
|
90
|
+
readonly timeTofirstToken: 0.503;
|
|
91
|
+
readonly intelligenceScore: 21.2;
|
|
92
|
+
};
|
|
93
|
+
readonly context: {
|
|
94
|
+
readonly window: 128000;
|
|
95
|
+
readonly input: {
|
|
96
|
+
readonly text: true;
|
|
97
|
+
readonly image: true;
|
|
98
|
+
readonly audio: false;
|
|
99
|
+
readonly video: false;
|
|
100
|
+
};
|
|
101
|
+
readonly output: {
|
|
102
|
+
readonly text: true;
|
|
103
|
+
readonly image: false;
|
|
104
|
+
readonly audio: false;
|
|
105
|
+
readonly video: false;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
readonly lastUpdated: "2025-11-27";
|
|
109
|
+
};
|
|
110
|
+
readonly 'claude-haiku-4-5-20251001': {
|
|
111
|
+
readonly provider: "anthropic";
|
|
112
|
+
readonly displayName: "Claude 4.5 Haiku (Non-reasoning)";
|
|
113
|
+
readonly pricing: {
|
|
114
|
+
readonly input: 0.001;
|
|
115
|
+
readonly output: 0.005;
|
|
116
|
+
};
|
|
117
|
+
readonly benchmarks: {
|
|
118
|
+
readonly intelligence: 41.7;
|
|
119
|
+
readonly coding: 37;
|
|
120
|
+
readonly math: 39;
|
|
121
|
+
readonly mmluPro: 0.8;
|
|
122
|
+
readonly gpqa: 0.646;
|
|
123
|
+
};
|
|
124
|
+
readonly performance: {
|
|
125
|
+
readonly outputTokenPerSecond: 100.11;
|
|
126
|
+
readonly timeTofirstToken: 1.035;
|
|
127
|
+
readonly intelligenceScore: 41.7;
|
|
128
|
+
};
|
|
129
|
+
readonly context: {
|
|
130
|
+
readonly window: 200000;
|
|
131
|
+
readonly input: {
|
|
132
|
+
readonly text: true;
|
|
133
|
+
readonly image: true;
|
|
134
|
+
readonly audio: false;
|
|
135
|
+
readonly video: false;
|
|
136
|
+
};
|
|
137
|
+
readonly output: {
|
|
138
|
+
readonly text: true;
|
|
139
|
+
readonly image: false;
|
|
140
|
+
readonly audio: false;
|
|
141
|
+
readonly video: false;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
readonly lastUpdated: "2025-11-27";
|
|
145
|
+
};
|
|
146
|
+
readonly 'claude-opus-4-1-20250805': {
|
|
147
|
+
readonly provider: "anthropic";
|
|
148
|
+
readonly displayName: "Claude 4.1 Opus (Non-reasoning)";
|
|
149
|
+
readonly pricing: {
|
|
150
|
+
readonly input: 0.015;
|
|
151
|
+
readonly output: 0.075;
|
|
152
|
+
};
|
|
153
|
+
readonly benchmarks: {
|
|
154
|
+
readonly intelligence: 44.6;
|
|
155
|
+
};
|
|
156
|
+
readonly performance: {
|
|
157
|
+
readonly outputTokenPerSecond: 39.947;
|
|
158
|
+
readonly timeTofirstToken: 1.445;
|
|
159
|
+
readonly intelligenceScore: 44.6;
|
|
160
|
+
};
|
|
161
|
+
readonly context: {
|
|
162
|
+
readonly window: 200000;
|
|
163
|
+
readonly input: {
|
|
164
|
+
readonly text: true;
|
|
165
|
+
readonly image: true;
|
|
166
|
+
readonly audio: false;
|
|
167
|
+
readonly video: false;
|
|
168
|
+
};
|
|
169
|
+
readonly output: {
|
|
170
|
+
readonly text: true;
|
|
171
|
+
readonly image: false;
|
|
172
|
+
readonly audio: false;
|
|
173
|
+
readonly video: false;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
readonly lastUpdated: "2025-11-27";
|
|
177
|
+
};
|
|
178
|
+
readonly 'claude-sonnet-4-5-20250929': {
|
|
179
|
+
readonly provider: "anthropic";
|
|
180
|
+
readonly displayName: "Claude 4.5 Sonnet (Non-reasoning)";
|
|
181
|
+
readonly pricing: {
|
|
182
|
+
readonly input: 0.003;
|
|
183
|
+
readonly output: 0.015;
|
|
184
|
+
};
|
|
185
|
+
readonly benchmarks: {
|
|
186
|
+
readonly intelligence: 49.6;
|
|
187
|
+
readonly coding: 42.9;
|
|
188
|
+
readonly math: 37;
|
|
189
|
+
readonly mmluPro: 0.86;
|
|
190
|
+
readonly gpqa: 0.727;
|
|
191
|
+
};
|
|
192
|
+
readonly performance: {
|
|
193
|
+
readonly outputTokenPerSecond: 70.948;
|
|
194
|
+
readonly timeTofirstToken: 2.006;
|
|
195
|
+
readonly intelligenceScore: 49.6;
|
|
196
|
+
};
|
|
197
|
+
readonly context: {
|
|
198
|
+
readonly window: 1000000;
|
|
199
|
+
readonly input: {
|
|
200
|
+
readonly text: true;
|
|
201
|
+
readonly image: true;
|
|
202
|
+
readonly audio: false;
|
|
203
|
+
readonly video: false;
|
|
204
|
+
};
|
|
205
|
+
readonly output: {
|
|
206
|
+
readonly text: true;
|
|
207
|
+
readonly image: false;
|
|
208
|
+
readonly audio: false;
|
|
209
|
+
readonly video: false;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
readonly lastUpdated: "2025-11-27";
|
|
213
|
+
};
|
|
214
|
+
readonly 'claude-3-5-haiku-20241022': {
|
|
215
|
+
readonly provider: "anthropic";
|
|
216
|
+
readonly displayName: "Claude 3.5 Haiku";
|
|
217
|
+
readonly pricing: {
|
|
218
|
+
readonly input: 0.0008;
|
|
219
|
+
readonly output: 0.004;
|
|
220
|
+
};
|
|
221
|
+
readonly benchmarks: {
|
|
222
|
+
readonly intelligence: 20.2;
|
|
223
|
+
readonly mmluPro: 0.634;
|
|
224
|
+
readonly gpqa: 0.408;
|
|
225
|
+
};
|
|
226
|
+
readonly performance: {
|
|
227
|
+
readonly outputTokenPerSecond: 47.501;
|
|
228
|
+
readonly timeTofirstToken: 0.713;
|
|
229
|
+
readonly intelligenceScore: 20.2;
|
|
230
|
+
};
|
|
231
|
+
readonly context: {
|
|
232
|
+
readonly window: 200000;
|
|
233
|
+
readonly input: {
|
|
234
|
+
readonly text: true;
|
|
235
|
+
readonly image: true;
|
|
236
|
+
readonly audio: false;
|
|
237
|
+
readonly video: false;
|
|
238
|
+
};
|
|
239
|
+
readonly output: {
|
|
240
|
+
readonly text: true;
|
|
241
|
+
readonly image: false;
|
|
242
|
+
readonly audio: false;
|
|
243
|
+
readonly video: false;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
readonly lastUpdated: "2025-11-27";
|
|
247
|
+
};
|
|
248
|
+
readonly 'claude-3-7-sonnet-20250219': {
|
|
249
|
+
readonly provider: "anthropic";
|
|
250
|
+
readonly displayName: "Claude 3.7 Sonnet (Non-reasoning)";
|
|
251
|
+
readonly pricing: {
|
|
252
|
+
readonly input: 0.003;
|
|
253
|
+
readonly output: 0.015;
|
|
254
|
+
};
|
|
255
|
+
readonly benchmarks: {
|
|
256
|
+
readonly intelligence: 41.1;
|
|
257
|
+
readonly coding: 32.3;
|
|
258
|
+
readonly math: 21;
|
|
259
|
+
readonly mmluPro: 0.803;
|
|
260
|
+
readonly gpqa: 0.656;
|
|
261
|
+
};
|
|
262
|
+
readonly performance: {
|
|
263
|
+
readonly outputTokenPerSecond: 56.392;
|
|
264
|
+
readonly timeTofirstToken: 0.551;
|
|
265
|
+
readonly intelligenceScore: 41.1;
|
|
266
|
+
};
|
|
267
|
+
readonly context: {
|
|
268
|
+
readonly window: 200000;
|
|
269
|
+
readonly input: {
|
|
270
|
+
readonly text: true;
|
|
271
|
+
readonly image: true;
|
|
272
|
+
readonly audio: false;
|
|
273
|
+
readonly video: false;
|
|
274
|
+
};
|
|
275
|
+
readonly output: {
|
|
276
|
+
readonly text: true;
|
|
277
|
+
readonly image: false;
|
|
278
|
+
readonly audio: false;
|
|
279
|
+
readonly video: false;
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
readonly lastUpdated: "2025-11-27";
|
|
283
|
+
};
|
|
284
|
+
readonly 'gemini-2.5-pro': {
|
|
285
|
+
readonly provider: "google";
|
|
286
|
+
readonly displayName: "Gemini 2.5 Pro";
|
|
287
|
+
readonly pricing: {
|
|
288
|
+
readonly input: 0.00125;
|
|
289
|
+
readonly output: 0.01;
|
|
290
|
+
};
|
|
291
|
+
readonly benchmarks: {
|
|
292
|
+
readonly intelligence: 59.6;
|
|
293
|
+
readonly coding: 49.3;
|
|
294
|
+
readonly math: 87.7;
|
|
295
|
+
readonly mmluPro: 0.862;
|
|
296
|
+
readonly gpqa: 0.844;
|
|
297
|
+
};
|
|
298
|
+
readonly performance: {
|
|
299
|
+
readonly outputTokenPerSecond: 42.557;
|
|
300
|
+
readonly timeTofirstToken: 15.534;
|
|
301
|
+
readonly intelligenceScore: 59.6;
|
|
302
|
+
};
|
|
303
|
+
readonly context: {
|
|
304
|
+
readonly window: 1048576;
|
|
305
|
+
readonly input: {
|
|
306
|
+
readonly text: true;
|
|
307
|
+
readonly image: true;
|
|
308
|
+
readonly audio: false;
|
|
309
|
+
readonly video: false;
|
|
310
|
+
};
|
|
311
|
+
readonly output: {
|
|
312
|
+
readonly text: true;
|
|
313
|
+
readonly image: false;
|
|
314
|
+
readonly audio: false;
|
|
315
|
+
readonly video: false;
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
readonly lastUpdated: "2025-11-27";
|
|
319
|
+
};
|
|
320
|
+
readonly 'gemini-2.0-flash': {
|
|
321
|
+
readonly provider: "google";
|
|
322
|
+
readonly displayName: "Gemini 2.0 Flash (Feb '25)";
|
|
323
|
+
readonly pricing: {
|
|
324
|
+
readonly input: 0.0001;
|
|
325
|
+
readonly output: 0.0004;
|
|
326
|
+
};
|
|
327
|
+
readonly benchmarks: {
|
|
328
|
+
readonly intelligence: 33.6;
|
|
329
|
+
readonly coding: 23.4;
|
|
330
|
+
readonly math: 21.7;
|
|
331
|
+
readonly mmluPro: 0.779;
|
|
332
|
+
readonly gpqa: 0.623;
|
|
333
|
+
};
|
|
334
|
+
readonly performance: {
|
|
335
|
+
readonly outputTokenPerSecond: 161.857;
|
|
336
|
+
readonly timeTofirstToken: 0.375;
|
|
337
|
+
readonly intelligenceScore: 33.6;
|
|
338
|
+
};
|
|
339
|
+
readonly context: {
|
|
340
|
+
readonly window: 1048576;
|
|
341
|
+
readonly input: {
|
|
342
|
+
readonly text: true;
|
|
343
|
+
readonly image: true;
|
|
344
|
+
readonly audio: false;
|
|
345
|
+
readonly video: false;
|
|
346
|
+
};
|
|
347
|
+
readonly output: {
|
|
348
|
+
readonly text: true;
|
|
349
|
+
readonly image: false;
|
|
350
|
+
readonly audio: false;
|
|
351
|
+
readonly video: false;
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
readonly lastUpdated: "2025-11-27";
|
|
355
|
+
};
|
|
356
|
+
readonly 'gemini-2.5-flash': {
|
|
357
|
+
readonly provider: "google";
|
|
358
|
+
readonly displayName: "Gemini 2.5 Flash (Non-reasoning)";
|
|
359
|
+
readonly pricing: {
|
|
360
|
+
readonly input: 0.0003;
|
|
361
|
+
readonly output: 0.0025;
|
|
362
|
+
};
|
|
363
|
+
readonly benchmarks: {
|
|
364
|
+
readonly intelligence: 40.4;
|
|
365
|
+
readonly coding: 30;
|
|
366
|
+
readonly math: 60.3;
|
|
367
|
+
readonly mmluPro: 0.809;
|
|
368
|
+
readonly gpqa: 0.683;
|
|
369
|
+
};
|
|
370
|
+
readonly performance: {
|
|
371
|
+
readonly outputTokenPerSecond: 230.517;
|
|
372
|
+
readonly timeTofirstToken: 0.401;
|
|
373
|
+
readonly intelligenceScore: 40.4;
|
|
374
|
+
};
|
|
375
|
+
readonly context: {
|
|
376
|
+
readonly window: 1048576;
|
|
377
|
+
readonly input: {
|
|
378
|
+
readonly text: true;
|
|
379
|
+
readonly image: true;
|
|
380
|
+
readonly audio: false;
|
|
381
|
+
readonly video: false;
|
|
382
|
+
};
|
|
383
|
+
readonly output: {
|
|
384
|
+
readonly text: true;
|
|
385
|
+
readonly image: false;
|
|
386
|
+
readonly audio: false;
|
|
387
|
+
readonly video: false;
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
readonly lastUpdated: "2025-11-27";
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
export type SupportedModel = keyof typeof MODEL_REGISTRY;
|
|
394
|
+
export type Provider = typeof MODEL_REGISTRY[SupportedModel]['provider'];
|
|
395
|
+
//# sourceMappingURL=model-registry.d.ts.map
|