@elizaos/plugin-openrouter 1.5.14 → 1.5.17

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 CHANGED
@@ -23,13 +23,17 @@ The plugin requires the OpenRouter API key and can be configured via environment
23
23
  "OPENROUTER_SMALL_MODEL": "google/gemini-flash", // Optional: Overrides default small model
24
24
  "OPENROUTER_LARGE_MODEL": "google/gemini-pro", // Optional: Overrides default large model
25
25
  "OPENROUTER_IMAGE_MODEL": "x-ai/grok-2-vision-1212", // Optional: Overrides default image model
26
- "OPENROUTER_IMAGE_GENERATION_MODEL": "google/gemini-2.5-flash-image-preview", // Optional: Overrides default image generation model
26
+ "OPENROUTER_IMAGE_GENERATION_MODEL": "google/gemini-2.5-flash-image-preview", // Optional: Overrides default image generation model
27
+ "OPENROUTER_EMBEDDING_MODEL": "openai/text-embedding-3-small", // Optional: Overrides default embedding model
28
+ "OPENROUTER_EMBEDDING_DIMENSIONS": "1536", // Optional: Sets embedding vector dimensions (256, 384, 512, 768, 1024, 1536, 2048, 3072)
27
29
  "OPENROUTER_BROWSER_BASE_URL": "https://your-proxy.example.com/openrouter"
28
30
  // Fallbacks if specific OPENROUTER models are not set
29
31
  "SMALL_MODEL": "google/gemini-flash",
30
32
  "LARGE_MODEL": "google/gemini-pro",
31
33
  "IMAGE_MODEL": "x-ai/grok-2-vision-1212",
32
- "IMAGE_GENERATION_MODEL": "google/gemini-2.5-flash-image-preview"
34
+ "IMAGE_GENERATION_MODEL": "google/gemini-2.5-flash-image-preview",
35
+ "EMBEDDING_MODEL": "openai/text-embedding-3-small",
36
+ "EMBEDDING_DIMENSIONS": "1536"
33
37
  }
34
38
  ```
35
39
 
@@ -43,6 +47,8 @@ OPENROUTER_SMALL_MODEL=google/gemini-flash
43
47
  OPENROUTER_LARGE_MODEL=google/gemini-pro
44
48
  OPENROUTER_IMAGE_MODEL=x-ai/grok-2-vision-1212
45
49
  OPENROUTER_IMAGE_GENERATION_MODEL=google/gemini-2.5-flash-image-preview
50
+ OPENROUTER_EMBEDDING_MODEL=openai/text-embedding-3-small
51
+ OPENROUTER_EMBEDDING_DIMENSIONS=1536
46
52
  # Browser proxy (frontend builds only)
47
53
  OPENROUTER_BROWSER_BASE_URL=https://your-proxy.example.com/openrouter
48
54
  # Fallbacks if specific OPENROUTER models are not set
@@ -50,6 +56,8 @@ SMALL_MODEL=google/gemini-flash
50
56
  LARGE_MODEL=google/gemini-pro
51
57
  IMAGE_MODEL=x-ai/grok-2-vision-1212
52
58
  IMAGE_GENERATION_MODEL=google/gemini-2.5-flash-image-preview
59
+ EMBEDDING_MODEL=openai/text-embedding-3-small
60
+ EMBEDDING_DIMENSIONS=1536
53
61
  ```
54
62
 
55
63
  ### Configuration Options
@@ -89,11 +97,15 @@ app.listen(3000);
89
97
  - `OPENROUTER_LARGE_MODEL`: Specific model to use for `TEXT_LARGE` and `OBJECT_LARGE`. Overrides `LARGE_MODEL` if set.
90
98
  - `OPENROUTER_IMAGE_MODEL`: Specific model to use for `IMAGE_DESCRIPTION`. Overrides `IMAGE_MODEL` if set.
91
99
  - `OPENROUTER_IMAGE_GENERATION_MODEL`: Specific model to use for `IMAGE` generation. Overrides `IMAGE_GENERATION_MODEL` if set.
100
+ - `OPENROUTER_EMBEDDING_MODEL`: Specific model to use for `TEXT_EMBEDDING`. Overrides `EMBEDDING_MODEL` if set.
101
+ - `OPENROUTER_EMBEDDING_DIMENSIONS`: Number of dimensions for embedding vectors. Supported values: 256, 384, 512, 768, 1024, 1536, 2048, 3072. Defaults to 1536.
92
102
  - `OPENROUTER_AUTO_CLEANUP_IMAGES`: Whether to automatically delete generated images after 30 seconds (default: "false"). Set to "true" to enable auto-cleanup.
93
103
  - `SMALL_MODEL`: Fallback model for small tasks (default: "google/gemini-2.0-flash-001"). Used if `OPENROUTER_SMALL_MODEL` is not set.
94
104
  - `LARGE_MODEL`: Fallback model for large tasks (default: "openai/gpt-4.1-nano"). Used if `OPENROUTER_LARGE_MODEL` is not set.
95
105
  - `IMAGE_MODEL`: Fallback model for image analysis (default: "x-ai/grok-2-vision-1212"). Used if `OPENROUTER_IMAGE_MODEL` is not set.
96
106
  - `IMAGE_GENERATION_MODEL`: Fallback model for image generation (default: "google/gemini-2.5-flash-image-preview"). Used if `OPENROUTER_IMAGE_GENERATION_MODEL` is not set.
107
+ - `EMBEDDING_MODEL`: Fallback model for text embeddings (default: "openai/text-embedding-3-small"). Used if `OPENROUTER_EMBEDDING_MODEL` is not set.
108
+ - `EMBEDDING_DIMENSIONS`: Fallback dimension setting for embeddings (default: "1536"). Used if `OPENROUTER_EMBEDDING_DIMENSIONS` is not set.
97
109
 
98
110
  ## Provided Models
99
111
 
@@ -105,5 +117,6 @@ The plugin currently provides these model types:
105
117
  - `OBJECT_LARGE`: Generates structured JSON objects based on a prompt, using the configured large model.
106
118
  - `IMAGE_DESCRIPTION`: Analyzes images and provides descriptive text and titles, using the configured image model.
107
119
  - `IMAGE`: Generates images from text prompts using the configured image generation model (e.g., Gemini 2.5 Flash Image Preview).
120
+ - `TEXT_EMBEDDING`: Generates vector embeddings for text input, supporting configurable dimensions from 256 to 3072, using the configured embedding model.
108
121
 
109
- _Note: Features like Audio Transcription and Embeddings are not currently implemented in this specific OpenRouter plugin._
122
+ _Note: Audio Transcription is not currently implemented in this specific OpenRouter plugin._