unified-ai-router 3.1.8 → 3.2.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/.env.example +0 -1
- package/package.json +1 -5
- package/readme.md +4 -4
package/.env.example
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unified-ai-router",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "A unified interface for multiple LLM providers with automatic fallback. This project includes an OpenAI-compatible server and a deployable Telegram bot with a Mini App interface. It supports major providers like OpenAI, Google, Grok, and more, ensuring reliability and flexibility for your AI applications.",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "mlibre",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"grok",
|
|
36
36
|
"openrouter",
|
|
37
37
|
"cohere",
|
|
38
|
-
"vercel",
|
|
39
38
|
"cerebras"
|
|
40
39
|
],
|
|
41
40
|
"dependencies": {
|
|
@@ -47,8 +46,5 @@
|
|
|
47
46
|
"openai": "^5.23.0",
|
|
48
47
|
"pino": "^9.9.0",
|
|
49
48
|
"pino-pretty": "^13.1.1"
|
|
50
|
-
},
|
|
51
|
-
"devDependencies": {
|
|
52
|
-
"vercel": "^45.0.9"
|
|
53
49
|
}
|
|
54
50
|
}
|
package/readme.md
CHANGED
|
@@ -81,15 +81,15 @@ console.log(response);
|
|
|
81
81
|
The OpenAI-compatible server provides a drop-in replacement for the OpenAI API. It routes requests through the unified router with fallback logic, ensuring high availability.
|
|
82
82
|
The server uses the provider configurations defined in [provider.js](provider.js) file, and requires API keys set in a `.env` file.
|
|
83
83
|
|
|
84
|
-
1.
|
|
85
|
-
|
|
86
|
-
2. Copy the example environment file:
|
|
84
|
+
1. Copy the example environment file:
|
|
87
85
|
|
|
88
86
|
```bash
|
|
89
87
|
cp .env.example .env
|
|
90
88
|
```
|
|
91
89
|
|
|
92
|
-
|
|
90
|
+
2. Edit `.env` and add your API keys for the desired providers (see [🔑 API Keys](#-api-keys) for sources).
|
|
91
|
+
|
|
92
|
+
3. Configure your providers in `provider.js`. Add new provider or modify existing ones with the appropriate `name`, `apiKey` (referencing the corresponding env variable), `model`, and `apiUrl` for the providers you want to use.
|
|
93
93
|
|
|
94
94
|
To start the server locally, run:
|
|
95
95
|
|