modelsuggest 1.0.2 → 1.0.4
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/README.md +50 -3
- package/package.json +49 -39
package/README.md
CHANGED
|
@@ -1,3 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# modelsuggest
|
|
2
|
+
|
|
3
|
+
A TypeScript library providing AI model names for various providers with full type safety.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install modelsuggest
|
|
9
|
+
# or
|
|
10
|
+
pnpm add modelsuggest
|
|
11
|
+
# or
|
|
12
|
+
yarn add modelsuggest
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
Import models from your preferred provider:
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { Model, model } from "modelsuggest/anannas";
|
|
21
|
+
// or
|
|
22
|
+
import { Model, model } from "modelsuggest/openrouter";
|
|
23
|
+
...
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Example
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import { Model, model } from "modelsuggest/anannas";
|
|
30
|
+
|
|
31
|
+
// Use the type for type-safe model names
|
|
32
|
+
function useModel(modelName: Model) {
|
|
33
|
+
console.log(`Using model: ${modelName}`);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Access all models via the model object
|
|
37
|
+
useModel(model["anthropic/claude-3.5-sonnet"]);
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Available Providers
|
|
41
|
+
|
|
42
|
+
- **[anannas](https://anannas.ai)** - `modelsuggest/anannas`
|
|
43
|
+
- **[openrouter](https://openrouter.ai)** - `modelsuggest/openrouter`
|
|
44
|
+
|
|
45
|
+
## Features
|
|
46
|
+
|
|
47
|
+
- ✅ Full TypeScript support with type-safe model names
|
|
48
|
+
- ✅ Auto-complete for all available models
|
|
49
|
+
- ✅ Lightweight and tree-shakeable
|
|
50
|
+
- ✅ Automatically synced with provider APIs
|
package/package.json
CHANGED
|
@@ -1,39 +1,49 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "modelsuggest",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "A library for providing AI model names for various providers",
|
|
5
|
-
"license": "ISC",
|
|
6
|
-
"author": "SwasthK",
|
|
7
|
-
"type": "commonjs",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"build": "tsup",
|
|
10
|
-
"clean": "rm -rf dist",
|
|
11
|
-
"sync": "tsx src/scripts/index.ts"
|
|
12
|
-
},
|
|
13
|
-
"keywords": [
|
|
14
|
-
"ai",
|
|
15
|
-
"models",
|
|
16
|
-
"openrouter",
|
|
17
|
-
"anannas"
|
|
18
|
-
],
|
|
19
|
-
"files": [
|
|
20
|
-
"dist/anannas",
|
|
21
|
-
"dist/openrouter"
|
|
22
|
-
],
|
|
23
|
-
"exports": {
|
|
24
|
-
"./anannas": {
|
|
25
|
-
"types": "./dist/anannas/index.d.ts",
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "modelsuggest",
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "A library for providing AI model names for various providers",
|
|
5
|
+
"license": "ISC",
|
|
6
|
+
"author": "SwasthK",
|
|
7
|
+
"type": "commonjs",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsup",
|
|
10
|
+
"clean": "rm -rf dist",
|
|
11
|
+
"sync": "tsx src/scripts/index.ts"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"ai",
|
|
15
|
+
"models",
|
|
16
|
+
"openrouter",
|
|
17
|
+
"anannas"
|
|
18
|
+
],
|
|
19
|
+
"files": [
|
|
20
|
+
"dist/anannas",
|
|
21
|
+
"dist/openrouter"
|
|
22
|
+
],
|
|
23
|
+
"exports": {
|
|
24
|
+
"./anannas": {
|
|
25
|
+
"types": "./dist/anannas/index.d.ts",
|
|
26
|
+
"import": "./dist/anannas/index.js",
|
|
27
|
+
"require": "./dist/anannas/index.js",
|
|
28
|
+
"default": "./dist/anannas/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./openrouter": {
|
|
31
|
+
"types": "./dist/openrouter/index.d.ts",
|
|
32
|
+
"import": "./dist/openrouter/index.js",
|
|
33
|
+
"require": "./dist/openrouter/index.js",
|
|
34
|
+
"default": "./dist/openrouter/index.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"typesVersions": {
|
|
38
|
+
"*": {
|
|
39
|
+
"anannas": ["./dist/anannas/index.d.ts"],
|
|
40
|
+
"openrouter": ["./dist/openrouter/index.d.ts"]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^24.10.1",
|
|
45
|
+
"tsup": "^8.5.1",
|
|
46
|
+
"tsx": "^4.7.0",
|
|
47
|
+
"typescript": "^5.9.3"
|
|
48
|
+
}
|
|
49
|
+
}
|