forked from drzo/plugin-openrouter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
186 lines (186 loc) · 7.57 KB
/
Copy pathpackage.json
File metadata and controls
186 lines (186 loc) · 7.57 KB
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
{
"name": "@elizaos/plugin-openrouter-root",
"private": true,
"version": "2.0.0-alpha.1",
"description": "",
"type": "module",
"main": "typescript/dist/index.js",
"types": "typescript/dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./typescript/dist/index.d.ts",
"import": "./typescript/dist/index.js",
"default": "./typescript/dist/index.js"
},
"./rust": {
"import": "./rust/pkg/node/elizaos_plugin_plugin_openrouter.js"
}
},
"files": [
"typescript/dist",
"README.md",
"python",
"rust/src",
"rust/Cargo.toml"
],
"keywords": [],
"author": "elizaOS",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/elizaos-plugins/plugin-openrouter.git"
},
"scripts": {
"build": "bun run build:ts && bun run build:rust && bun run build:python",
"build:ts": "cd typescript && bun run build.ts",
"build:rust": "test -d rust && cd rust && cargo build --release || echo 'Rust build skipped - no rust directory'",
"build:python": "test -n \"$SKIP_PYTHON_BUILD\" && echo 'Python build skipped (SKIP_PYTHON_BUILD set)' || (test -d python && cd python && (timeout 120 python3 -m build 2>/dev/null || timeout 120 pyproject-build 2>/dev/null) || echo 'Python build skipped or timed out')",
"dev": "cd typescript && bun --hot build.ts",
"test": "bun run test:ts && bun run test:rust && bun run test:python",
"test:ts": "cd typescript && vitest run || echo 'TypeScript tests skipped - no tests found'",
"test:rust": "test -d rust && cd rust && cargo test || echo 'Rust tests skipped'",
"test:python": "test -d python && cd python && pytest -p no:anchorpy --asyncio-mode=auto || echo 'Python tests skipped'",
"typecheck": "tsc --noEmit -p typescript/tsconfig.json",
"lint": "bunx @biomejs/biome check --write ./typescript",
"lint:check": "bunx @biomejs/biome check ./typescript",
"lint:rust": "test -d rust && cd rust && cargo clippy --all-targets --fix --allow-dirty --allow-staged -- -D warnings && cargo fmt || echo 'Rust lint skipped'",
"lint:python": "test -d python && cd python && ruff check --fix . && ruff format . || echo 'Python lint skipped'",
"clean": "rm -rf typescript/dist python/dist rust/target .turbo node_modules",
"format": "bunx @biomejs/biome format --write ./typescript",
"format:check": "bunx @biomejs/biome format ./typescript",
"typecheck:python": "test -d python && cd python && mypy . --ignore-missing-imports || echo 'Python typecheck skipped'",
"typecheck:rust": "test -d rust && cd rust && cargo check || echo 'Rust typecheck skipped'"
},
"devDependencies": {
"@biomejs/biome": "^2.3.11",
"@types/bun": "^1.3.5",
"@types/node": "^25.0.3",
"typescript": "^5.9.3"
},
"peerDependencies": {
"@elizaos/core": "2.0.0-alpha.114"
},
"agentConfig": {
"pluginType": "elizaos:plugin:1.0.0",
"pluginParameters": {
"OPENROUTER_API_KEY": {
"type": "string",
"description": "API key used by the OpenRouter plugin for authenticating requests.",
"required": true,
"sensitive": true
},
"OPENROUTER_IMAGE_MODEL": {
"type": "string",
"description": "Overrides the default image description model used by the OpenRouter plugin.",
"required": false,
"sensitive": false
},
"OPENROUTER_BASE_URL": {
"type": "string",
"description": "Base URL for the OpenRouter API endpoints.",
"required": false,
"default": "https://openrouter.ai/api/v1",
"sensitive": false
},
"OPENROUTER_BROWSER_BASE_URL": {
"type": "string",
"description": "Browser-only proxy endpoint base URL for OpenRouter requests (no secrets in the client).",
"required": false,
"sensitive": false
},
"OPENROUTER_SMALL_MODEL": {
"type": "string",
"description": "Overrides the default small language model used for text/object generation.",
"required": false,
"default": "google/gemini-2.0-flash-001",
"sensitive": false
},
"OPENROUTER_LARGE_MODEL": {
"type": "string",
"description": "Overrides the default large language model used for text/object generation.",
"required": false,
"default": "google/gemini-2.5-flash",
"sensitive": false
},
"SMALL_MODEL": {
"type": "string",
"description": "General fallback environment variable for the small model name when OPENROUTER_SMALL_MODEL is not set.",
"required": false,
"default": "google/gemini-2.0-flash-001",
"sensitive": false
},
"LARGE_MODEL": {
"type": "string",
"description": "General fallback environment variable for the large model name when OPENROUTER_LARGE_MODEL is not set.",
"required": false,
"default": "google/gemini-2.5-flash",
"sensitive": false
},
"IMAGE_MODEL": {
"type": "string",
"description": "General fallback environment variable for the image model name when OPENROUTER_IMAGE_MODEL is not set.",
"required": false,
"default": "x-ai/grok-2-vision-1212",
"sensitive": false
},
"OPENROUTER_IMAGE_GENERATION_MODEL": {
"type": "string",
"description": "Overrides the default image generation model used by the OpenRouter plugin.",
"required": false,
"default": "google/gemini-2.5-flash-image-preview",
"sensitive": false
},
"IMAGE_GENERATION_MODEL": {
"type": "string",
"description": "General fallback environment variable for the image generation model name when OPENROUTER_IMAGE_GENERATION_MODEL is not set.",
"required": false,
"default": "google/gemini-2.5-flash-image-preview",
"sensitive": false
},
"OPENROUTER_EMBEDDING_MODEL": {
"type": "string",
"description": "Overrides the default text embedding model used by the OpenRouter plugin.",
"required": false,
"default": "openai/text-embedding-3-small",
"sensitive": false
},
"EMBEDDING_MODEL": {
"type": "string",
"description": "General fallback environment variable for the embedding model name when OPENROUTER_EMBEDDING_MODEL is not set.",
"required": false,
"default": "openai/text-embedding-3-small",
"sensitive": false
},
"OPENROUTER_EMBEDDING_DIMENSIONS": {
"type": "number",
"description": "Number of dimensions for embedding vectors. Supported values: 256, 384, 512, 768, 1024, 1536, 2048, 3072.",
"required": false,
"default": 1536,
"sensitive": false
},
"EMBEDDING_DIMENSIONS": {
"type": "number",
"description": "General fallback environment variable for the embedding dimensions when OPENROUTER_EMBEDDING_DIMENSIONS is not set.",
"required": false,
"default": 1536,
"sensitive": false
},
"OPENROUTER_AUTO_CLEANUP_IMAGES": {
"type": "boolean",
"description": "Whether to automatically cleanup generated images after a short delay.",
"required": false,
"default": false,
"sensitive": false
},
"OPENROUTER_TOOL_EXECUTION_MAX_STEPS": {
"type": "number",
"description": "Maximum number of steps for multi-step tool execution. Allows the AI to generate descriptive text after calling tools in AI SDK v5.",
"required": false,
"default": 15,
"sensitive": false
}
}
},
"gitHead": "05d4ca11d769db8c7f54a722ee24b2ce2b951543"
}