@elizaos/plugin-openrouter 2.0.0-alpha.1 → 2.0.0-alpha.11
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/browser/index.browser.js +2 -467
- package/dist/browser/index.browser.js.map +4 -13
- package/dist/cjs/index.node.cjs +21 -471
- package/dist/cjs/index.node.cjs.map +4 -13
- package/dist/node/index.node.js +2 -467
- package/dist/node/index.node.js.map +4 -13
- package/package.json +206 -190
package/package.json
CHANGED
|
@@ -1,192 +1,208 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
2
|
+
"name": "@elizaos/plugin-openrouter",
|
|
3
|
+
"version": "2.0.0-alpha.11",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/node/index.node.js",
|
|
6
|
+
"module": "dist/node/index.node.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/elizaos-plugins/plugin-openrouter.git"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
"./package.json": "./package.json",
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"browser": {
|
|
17
|
+
"types": "./dist/browser/index.d.ts",
|
|
18
|
+
"import": "./dist/browser/index.browser.js",
|
|
19
|
+
"default": "./dist/browser/index.browser.js"
|
|
20
|
+
},
|
|
21
|
+
"node": {
|
|
22
|
+
"types": "./dist/node/index.d.ts",
|
|
23
|
+
"import": "./dist/node/index.node.js",
|
|
24
|
+
"default": "./dist/node/index.node.js"
|
|
25
|
+
},
|
|
26
|
+
"bun": {
|
|
27
|
+
"types": "./dist/node/index.d.ts",
|
|
28
|
+
"default": "./dist/node/index.node.js"
|
|
29
|
+
},
|
|
30
|
+
"require": "./dist/cjs/index.node.cjs",
|
|
31
|
+
"default": "./dist/node/index.node.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist"
|
|
36
|
+
],
|
|
37
|
+
"sideEffects": false,
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@ai-sdk/openai": "^3.0.9",
|
|
40
|
+
"@ai-sdk/ui-utils": "^1.2.8",
|
|
41
|
+
"@openrouter/ai-sdk-provider": "^1.2.0",
|
|
42
|
+
"ai": "^6.0.30",
|
|
43
|
+
"undici": "^7.16.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@biomejs/biome": "^2.3.11",
|
|
47
|
+
"@types/bun": "^1.3.5",
|
|
48
|
+
"@types/json-schema": "^7.0.15",
|
|
49
|
+
"@types/node": "^25.0.3",
|
|
50
|
+
"dotenv": "^17.2.3",
|
|
51
|
+
"typescript": "^5.9.3",
|
|
52
|
+
"@elizaos/core": "2.0.0-alpha.98",
|
|
53
|
+
"@elizaos/plugin-sql": "2.0.0-alpha.17",
|
|
54
|
+
"vitest": "^4.0.0"
|
|
55
|
+
},
|
|
56
|
+
"scripts": {
|
|
57
|
+
"dev": "bun --hot build.ts",
|
|
58
|
+
"lint": "bunx @biomejs/biome check --write --unsafe .",
|
|
59
|
+
"clean": "rm -rf dist .turbo node_modules .turbo-tsconfig.json tsconfig.tsbuildinfo",
|
|
60
|
+
"format": "bunx @biomejs/biome format --write .",
|
|
61
|
+
"format:check": "bunx @biomejs/biome format .",
|
|
62
|
+
"typecheck": "tsc --noEmit --noCheck -p tsconfig.json",
|
|
63
|
+
"test": "vitest run",
|
|
64
|
+
"test:unit": "vitest run __tests__/",
|
|
65
|
+
"test:watch": "vitest",
|
|
66
|
+
"lint:check": "bunx @biomejs/biome check .",
|
|
67
|
+
"build": "bun run build.ts",
|
|
68
|
+
"build:ts": "bun run build.ts"
|
|
69
|
+
},
|
|
70
|
+
"publishConfig": {
|
|
71
|
+
"access": "public"
|
|
72
|
+
},
|
|
73
|
+
"agentConfig": {
|
|
74
|
+
"pluginType": "elizaos:plugin:1.0.0",
|
|
75
|
+
"pluginParameters": {
|
|
76
|
+
"OPENROUTER_API_KEY": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"description": "API key used by the OpenRouter plugin for authenticating requests.",
|
|
79
|
+
"required": true,
|
|
80
|
+
"sensitive": true
|
|
81
|
+
},
|
|
82
|
+
"OPENROUTER_IMAGE_MODEL": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"description": "Overrides the default image description model used by the OpenRouter plugin.",
|
|
85
|
+
"required": false,
|
|
86
|
+
"sensitive": false
|
|
87
|
+
},
|
|
88
|
+
"OPENROUTER_BASE_URL": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"description": "Base URL for the OpenRouter API endpoints.",
|
|
91
|
+
"required": false,
|
|
92
|
+
"default": "https://openrouter.ai/api/v1",
|
|
93
|
+
"sensitive": false
|
|
94
|
+
},
|
|
95
|
+
"OPENROUTER_BROWSER_BASE_URL": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"description": "Browser-only proxy endpoint base URL for OpenRouter requests (no secrets in the client).",
|
|
98
|
+
"required": false,
|
|
99
|
+
"sensitive": false
|
|
100
|
+
},
|
|
101
|
+
"OPENROUTER_SMALL_MODEL": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"description": "Overrides the default small language model used for text/object generation.",
|
|
104
|
+
"required": false,
|
|
105
|
+
"default": "google/gemini-2.0-flash-001",
|
|
106
|
+
"sensitive": false
|
|
107
|
+
},
|
|
108
|
+
"OPENROUTER_LARGE_MODEL": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"description": "Overrides the default large language model used for text/object generation.",
|
|
111
|
+
"required": false,
|
|
112
|
+
"default": "google/gemini-2.5-flash",
|
|
113
|
+
"sensitive": false
|
|
114
|
+
},
|
|
115
|
+
"SMALL_MODEL": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"description": "General fallback environment variable for the small model name when OPENROUTER_SMALL_MODEL is not set.",
|
|
118
|
+
"required": false,
|
|
119
|
+
"default": "google/gemini-2.0-flash-001",
|
|
120
|
+
"sensitive": false
|
|
121
|
+
},
|
|
122
|
+
"LARGE_MODEL": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"description": "General fallback environment variable for the large model name when OPENROUTER_LARGE_MODEL is not set.",
|
|
125
|
+
"required": false,
|
|
126
|
+
"default": "google/gemini-2.5-flash",
|
|
127
|
+
"sensitive": false
|
|
128
|
+
},
|
|
129
|
+
"IMAGE_MODEL": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"description": "General fallback environment variable for the image model name when OPENROUTER_IMAGE_MODEL is not set.",
|
|
132
|
+
"required": false,
|
|
133
|
+
"default": "x-ai/grok-2-vision-1212",
|
|
134
|
+
"sensitive": false
|
|
135
|
+
},
|
|
136
|
+
"OPENROUTER_IMAGE_GENERATION_MODEL": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"description": "Overrides the default image generation model used by the OpenRouter plugin.",
|
|
139
|
+
"required": false,
|
|
140
|
+
"default": "google/gemini-2.5-flash-image-preview",
|
|
141
|
+
"sensitive": false
|
|
142
|
+
},
|
|
143
|
+
"IMAGE_GENERATION_MODEL": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"description": "General fallback environment variable for the image generation model name when OPENROUTER_IMAGE_GENERATION_MODEL is not set.",
|
|
146
|
+
"required": false,
|
|
147
|
+
"default": "google/gemini-2.5-flash-image-preview",
|
|
148
|
+
"sensitive": false
|
|
149
|
+
},
|
|
150
|
+
"OPENROUTER_EMBEDDING_MODEL": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"description": "Overrides the default text embedding model used by the OpenRouter plugin.",
|
|
153
|
+
"required": false,
|
|
154
|
+
"default": "openai/text-embedding-3-small",
|
|
155
|
+
"sensitive": false
|
|
156
|
+
},
|
|
157
|
+
"EMBEDDING_MODEL": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"description": "General fallback environment variable for the embedding model name when OPENROUTER_EMBEDDING_MODEL is not set.",
|
|
160
|
+
"required": false,
|
|
161
|
+
"default": "openai/text-embedding-3-small",
|
|
162
|
+
"sensitive": false
|
|
163
|
+
},
|
|
164
|
+
"OPENROUTER_EMBEDDING_DIMENSIONS": {
|
|
165
|
+
"type": "number",
|
|
166
|
+
"description": "Number of dimensions for embedding vectors. Supported values: 256, 384, 512, 768, 1024, 1536, 2048, 3072.",
|
|
167
|
+
"required": false,
|
|
168
|
+
"default": 1536,
|
|
169
|
+
"sensitive": false
|
|
170
|
+
},
|
|
171
|
+
"EMBEDDING_DIMENSIONS": {
|
|
172
|
+
"type": "number",
|
|
173
|
+
"description": "General fallback environment variable for the embedding dimensions when OPENROUTER_EMBEDDING_DIMENSIONS is not set.",
|
|
174
|
+
"required": false,
|
|
175
|
+
"default": 1536,
|
|
176
|
+
"sensitive": false
|
|
177
|
+
},
|
|
178
|
+
"OPENROUTER_AUTO_CLEANUP_IMAGES": {
|
|
179
|
+
"type": "boolean",
|
|
180
|
+
"description": "Whether to automatically cleanup generated images after a short delay.",
|
|
181
|
+
"required": false,
|
|
182
|
+
"default": false,
|
|
183
|
+
"sensitive": false
|
|
184
|
+
},
|
|
185
|
+
"OPENROUTER_TOOL_EXECUTION_MAX_STEPS": {
|
|
186
|
+
"type": "number",
|
|
187
|
+
"description": "Maximum number of steps for multi-step tool execution. Allows the AI to generate descriptive text after calling tools in AI SDK v5.",
|
|
188
|
+
"required": false,
|
|
189
|
+
"default": 15,
|
|
190
|
+
"sensitive": false
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"milady": {
|
|
195
|
+
"platforms": [
|
|
196
|
+
"browser",
|
|
197
|
+
"node"
|
|
198
|
+
],
|
|
199
|
+
"runtime": "both",
|
|
200
|
+
"platformDetails": {
|
|
201
|
+
"browser": "Browser-compatible build available via exports.browser",
|
|
202
|
+
"node": "Node.js build available via exports.node"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"peerDependencies": {
|
|
206
|
+
"@elizaos/core": ">=2.0.0-alpha.98 <3.0.0"
|
|
207
|
+
}
|
|
192
208
|
}
|