iaurora 1.0.29 → 1.0.30

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 CHANGED
@@ -123,7 +123,7 @@
123
123
  # =============================================================================
124
124
 
125
125
  # External model metadata registry. Leave empty to disable upstream fetch.
126
- # MODEL_LIST_URL=https://auroraix.github.io/aurora/models.json
126
+ # MODEL_LIST_URL=https://aurorallm.github.io/aurora/assets/models.json
127
127
 
128
128
  # Local model registry snapshot and user pricing overrides
129
129
  # MODEL_LIST_LOCAL_PATH=data/models.local.json
@@ -377,7 +377,7 @@
377
377
  # OPENROUTER_API_KEY=sk-or-...
378
378
  # OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
379
379
  # OPENROUTER_MODELS=openai/gpt-oss-120b,anthropic/claude-sonnet-4
380
- # OPENROUTER_SITE_URL=https://github.com/auroraix/aurora
380
+ # OPENROUTER_SITE_URL=https://github.com/aurorallm/aurora
381
381
  # OPENROUTER_APP_NAME=Aurora Gateway
382
382
 
383
383
  # Z.ai
package/README.md CHANGED
@@ -7,56 +7,80 @@
7
7
  <p align="center">
8
8
  <a href="LICENSE"><img src="https://img.shields.io/github/license/aurorallm/aurora" alt="License" height="20"></a>
9
9
  <a href="https://www.npmjs.com/package/iaurora"><img src="https://img.shields.io/npm/v/iaurora" alt="npm" height="20"></a>
10
- <a href="https://goreportcard.com/report/github.com/aurorallm/aurora"><img src="https://goreportcard.com/badge/github.com/aurorallm/aurora" alt="Go Report Card" height="20"></a>
11
10
  <a href="https://codecov.io/gh/aurorallm/aurora"><img src="https://codecov.io/gh/aurorallm/aurora/branch/main/graph/badge.svg" alt="codecov" height="20"></a>
12
11
  <a href="https://github.com/aurorallm/aurora"><img src="https://img.shields.io/github/stars/aurorallm/aurora" alt="GitHub Stars" height="20"></a>
13
12
  <a href="https://discord.gg/YJPrfR9uh"><img src="https://dcbadge.limes.pink/api/server/https://discord.gg/YJPrfR9uh?style=flat" alt="Discord" height="20"></a>
14
13
  <img src="https://img.shields.io/docker/pulls/aurorahq/aurora" alt="Docker Pulls" height="20">
15
- <a href="https://artifacthub.io/packages/search?repo=aurora-gateway"><img src="https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/aurora-gateway" alt="Artifact Hub" height="20"></a>
14
+ <a href="https://artifacthub.io/packages/search?repo=aurora-gateway"><img src="https://artifacthub.io/badge/repository/aurora-gateway" alt="Artifact Hub" height="20"></a>
16
15
  </p>
17
16
 
18
17
  <p align="center"><b>Open-source LLM gateway (OSS edition). One API for every AI provider.</b></p>
19
18
 
20
- <p align="center">Self-hosted. No vendor lock-in. 30+ LLM providers supported.</p>
19
+ <p align="center">Self-hosted. No vendor lock-in. 14 provider types, 30+ LLM providers supported.</p>
21
20
 
22
21
  <a href="https://raw.githubusercontent.com/aurorallm/aurora/main/docs/assets/dashboard-overview.png">
23
22
  <img src="https://raw.githubusercontent.com/aurorallm/aurora/main/docs/assets/dashboard-overview.png" alt="Aurora open-source AI gateway admin dashboard showing provider stats and usage metrics" width="100%">
24
23
  </a>
25
24
 
26
- ## Quick Start
25
+ ---
27
26
 
28
- Start routing AI traffic in 60 seconds.
27
+ ## Quick Start
29
28
 
30
- <img src="https://raw.githubusercontent.com/aurorallm/aurora/main/docs/assets/install.gif" alt="Install demo" style="max-width:100%;border-radius:12px;margin:12px 0;">
29
+ Start routing AI traffic in 60 seconds using any of these deployment methods:
31
30
 
32
- **1. Install Aurora Gateway**
31
+ ### CLI (npm)
33
32
 
34
33
  ```bash
35
34
  npm install -g iaurora
36
- # or
37
- docker run --rm -p 8080:8080 \
38
- -e AURORA_MASTER_KEY="your-key" \
35
+ mkdir my-gateway && cd my-gateway
36
+ aurora init # creates config.yaml, .env, data/
37
+ ```
38
+
39
+ **Option A — via `.env` file** (recommended):
40
+
41
+ ```env
42
+ AURORA_MASTER_KEY=your-secure-key
43
+ GROQ_API_KEY=gsk_...
44
+ ```
45
+
46
+ ```bash
47
+ aurora
48
+ ```
49
+
50
+ **Option B — via inline env vars** (no `.env` needed):
51
+
52
+ ```bash
53
+ # Linux / macOS
54
+ AURORA_MASTER_KEY=your-secure-key GROQ_API_KEY=gsk_... aurora
55
+
56
+ # Windows PowerShell
57
+ $env:AURORA_MASTER_KEY="your-secure-key"; $env:GROQ_API_KEY="gsk_..."; aurora
58
+
59
+ # Windows CMD
60
+ set AURORA_MASTER_KEY=your-secure-key && set GROQ_API_KEY=gsk_... && aurora
61
+ ```
62
+
63
+ ### Docker
64
+
65
+ ```bash
66
+ docker run -d --name aurora -p 8080:8080 \
67
+ -e AURORA_MASTER_KEY="your-secure-key" \
39
68
  -e GROQ_API_KEY="gsk_..." \
40
- # optional: add more providers or configure storage
41
- # -e OPENAI_API_KEY="sk-..." \
42
- # -e ANTHROPIC_API_KEY="sk-ant-..." \
43
- # -e GEMINI_API_KEY="..." \
44
- # -e STORAGE_TYPE=sqlite # sqlite (default), postgresql, mongodb
45
- # -e PORT=8080 # change listening port
46
- # -e LOG_LEVEL=info # debug, info, warn, error
47
- # -e LOG_FORMAT=text # text or json
48
69
  aurorahq/aurora
49
70
  ```
50
71
 
51
- **2. Init and start**
72
+ ### Kubernetes (Helm)
52
73
 
53
74
  ```bash
54
- mkdir my-gateway && cd my-gateway
55
- aurora init # scaffolds config.yaml, .env, data/
56
- aurora # starts gateway on port 8080
75
+ helm install aurora ./helm \
76
+ --namespace aurora --create-namespace \
77
+ --set auth.masterKey="your-secure-key" \
78
+ --set providers.groq.apiKey="gsk_..." \
79
+ --set providers.groq.enabled=true \
80
+ --set redis.enabled=false
57
81
  ```
58
82
 
59
- **3. Make your first request**
83
+ ### Test your gateway
60
84
 
61
85
  ```bash
62
86
  curl http://localhost:8080/v1/chat/completions \
@@ -65,12 +89,31 @@ curl http://localhost:8080/v1/chat/completions \
65
89
  -d '{"model":"groq/llama-3.3-70b-versatile","messages":[{"role":"user","content":"Hello!"}]}'
66
90
  ```
67
91
 
68
- The dashboard is at `http://localhost:8080/admin/dashboard`.
92
+ Dashboard: `http://localhost:8080/admin/dashboard`
69
93
 
70
94
  **Setup guides:** [npm](https://www.npmjs.com/package/iaurora) · [Docker](https://hub.docker.com/r/aurorahq/aurora) · [Helm/Kubernetes](https://github.com/aurorallm/aurora/tree/main/helm) · [Source](https://github.com/aurorallm/aurora)
71
95
 
72
96
  ---
73
97
 
98
+ ## Enterprise Deployments
99
+
100
+ Aurora supports enterprise-grade deployments for teams running production AI systems at scale.
101
+ In addition to private networking, custom security controls, and governance, **Aurora Enterprise** unlocks advanced capabilities including SSO, RBAC, tenant isolation, budget enforcement, compliance workflows, and production support.
102
+
103
+ The Enterprise edition is a separate distribution with a signed license.
104
+
105
+ <a href="https://raw.githubusercontent.com/aurorallm/aurora/main/docs/assets/comparison.png">
106
+ <img src="https://raw.githubusercontent.com/aurorallm/aurora/main/docs/assets/comparison.png" alt="OSS vs Enterprise comparison" width="100%" style="border-radius:12px;margin:16px 0;">
107
+ </a>
108
+
109
+ <div align="center">
110
+ <a href="mailto:team.auroragate@gmail.com?subject=Aurora%20Enterprise%20Inquiry" style="display:block;margin-top:5px;">
111
+ <img src="https://img.shields.io/badge/Email%20Us-Enterprise-5865F2?style=for-the-badge&logo=gmail&logoColor=white" alt="Email Aurora Enterprise" width="200"/>
112
+ </a>
113
+ </div>
114
+
115
+ ---
116
+
74
117
  ## Kubernetes (Helm)
75
118
 
76
119
  Deploy on any Kubernetes cluster with the [Helm chart](https://github.com/aurorallm/aurora/tree/main/helm).
@@ -99,89 +142,85 @@ helm upgrade --install aurora ./helm \
99
142
  --set redis.enabled=true
100
143
  ```
101
144
 
102
- **Full Helm documentation:** [helm/README.md](https://github.com/aurorallm/aurora/tree/main/helm/README.md)
145
+ **Full Helm docs:** [helm/README.md](./helm/README.md)
103
146
 
104
147
  ---
105
148
 
106
- ## Enterprise Deployments
149
+ ## Providers
107
150
 
108
- Aurora supports enterprise-grade deployments for teams running production AI systems at scale.
109
- In addition to private networking, custom security controls, and governance, **Aurora Enterprise** unlocks advanced capabilities including SSO, RBAC, tenant isolation, budget enforcement, compliance workflows, and production support.
151
+ Providers are **auto-discovered from environment variables**. Set any provider's `_API_KEY` and restart — the provider and its default models appear automatically.
110
152
 
111
- The Enterprise edition is a separate distribution with a signed license.
153
+ > **Security note for public docs:** The env var names listed below are documentation references. Actual secrets go into your **`.env` file** (in `.gitignore`) or your **deployment secrets manager** — never commit them.
112
154
 
113
- <a href="https://raw.githubusercontent.com/aurorallm/aurora/main/docs/assets/comparison.png">
114
- <img src="https://raw.githubusercontent.com/aurorallm/aurora/main/docs/assets/comparison.png" alt="OSS vs Enterprise comparison" width="100%" style="border-radius:12px;margin:16px 0;">
115
- </a>
155
+ ### All supported providers
116
156
 
117
- <div align="center">
118
- <a href="mailto:team.auroragate@gmail.com?subject=Aurora%20Enterprise%20Inquiry" style="display:block;margin-top:5px;">
119
- <img src="https://img.shields.io/badge/Email%20Us-Enterprise-5865F2?style=for-the-badge&logo=gmail&logoColor=white" alt="Email Aurora Enterprise" width="200"/>
120
- </a>
121
- </div>
157
+ | Provider | Env var | Default base URL | Requires base URL | API key required | Default models |
158
+ |----------|---------|-----------------|-------------------|-----------------|----------------|
159
+ | OpenAI | `OPENAI_API_KEY` | `https://api.openai.com/v1` | No | Yes | `gpt-4o`, `gpt-4o-mini` |
160
+ | Anthropic | `ANTHROPIC_API_KEY` | `https://api.anthropic.com/v1` | No | Yes | `claude-sonnet-4`, `claude-opus-4` |
161
+ | Google Gemini | `GEMINI_API_KEY` | `https://generativelanguage.googleapis.com/v1beta/openai` | No | Yes | `gemini-2.5-pro`, `gemini-2.5-flash` |
162
+ | Groq | `GROQ_API_KEY` | `https://api.groq.com/openai/v1` | No | Yes | `llama-3.3-70b`, `qwen3-32b`, `whisper` |
163
+ | DeepSeek | `DEEPSEEK_API_KEY` | `https://api.deepseek.com` | No | Yes | `deepseek-chat`, `deepseek-reasoner` |
164
+ | OpenRouter | `OPENROUTER_API_KEY` | `https://openrouter.ai/api/v1` | No | Yes | 300+ models |
165
+ | xAI (Grok) | `XAI_API_KEY` | `https://api.x.ai/v1` | No | Yes | `grok-3`, `grok-3-mini` |
166
+ | Z.ai | `ZAI_API_KEY` | `https://api.z.ai/api/paas/v4` | No | Yes | `glm-4.5` |
167
+ | MiniMax | `MINIMAX_API_KEY` | `https://api.minimax.io/v1` | No | Yes | `minimax-m1` |
168
+ | Azure OpenAI | `AZURE_API_KEY` | — | **Yes** | Yes | Your deployments |
169
+ | Oracle | `ORACLE_API_KEY` | — | **Yes** | Yes | `cohere.command-r-plus` |
170
+ | Ollama | `OLLAMA_API_KEY` | `http://localhost:11434/v1` | No | **No** (optional) | Any local model |
171
+ | vLLM | `VLLM_API_KEY` | `http://localhost:8000/v1` | No | **No** (optional) | Any served model |
172
+ | Jina (reranker) | `JINA_API_KEY` | — | **Yes** | Yes | `jina-embeddings-v3` |
122
173
 
123
- ---
174
+ ### Per-provider extras
124
175
 
176
+ Every provider supports `*_MODELS` to override auto-discovered models:
125
177
 
126
- ## Repository Structure
178
+ ```env
179
+ OPENAI_MODELS=gpt-4o,gpt-4o-mini,gpt-4-turbo
180
+ ```
127
181
 
128
- ```text
129
- aurora/
130
- ├── apps/ # Application entrypoints
131
- │ └── aurora/ # Main gateway binary
132
- ├── internal/ # Internal packages
133
- │ ├── api/ # HTTP handlers, middleware
134
- │ ├── config/ # Configuration loading and validation
135
- │ ├── providers/ # Provider implementations (OpenAI, Anthropic, etc.)
136
- │ ├── storage/ # SQLite, PostgreSQL, MongoDB backends
137
- │ ├── guardrails/ # Content safety filters
138
- │ ├── cache/ # Exact and semantic caching
139
- │ └── analytics/ # Usage tracking and metrics
140
- ├── dashboard-ui/ # React admin dashboard frontend
141
- ├── configs/ # Configuration profiles and examples
142
- ├── docs/ # Documentation and assets
143
- ├── scripts/ # Build and release scripts
144
- ├── test/ # Test suites
145
- └── helm/ # Kubernetes Helm charts
182
+ OpenRouter extras:
183
+
184
+ ```env
185
+ OPENROUTER_SITE_URL=https://github.com/aurorallm/aurora
186
+ OPENROUTER_APP_NAME=Aurora Gateway
146
187
  ```
147
188
 
148
- ---
189
+ Azure requires API version:
149
190
 
150
- ## Providers
191
+ ```env
192
+ AZURE_API_VERSION=2024-10-21
193
+ ```
151
194
 
152
- Providers are **auto-discovered from environment variables**. Set any of these keys in your `.env` and restart — the provider and its models appear automatically.
195
+ ### Custom base URL
153
196
 
154
- | Provider | Env var | Default models |
155
- |----------|---------|----------------|
156
- | OpenAI | `OPENAI_API_KEY` | `gpt-4o`, `gpt-4o-mini` |
157
- | Anthropic | `ANTHROPIC_API_KEY` | `claude-sonnet-4`, `claude-opus-4` |
158
- | Google Gemini | `GEMINI_API_KEY` | `gemini-2.5-pro`, `gemini-2.5-flash` |
159
- | Groq | `GROQ_API_KEY` | `llama-3.3-70b`, `qwen3-32b`, `whisper` |
160
- | DeepSeek | `DEEPSEEK_API_KEY` | `deepseek-chat`, `deepseek-reasoner` |
161
- | OpenRouter | `OPENROUTER_API_KEY` | 300+ models |
162
- | xAI | `XAI_API_KEY` | `grok-3`, `grok-3-mini` |
163
- | Z.ai | `ZAI_API_KEY` | `glm-4.5` |
164
- | MiniMax | `MINIMAX_API_KEY` | `minimax-m1` |
165
- | Azure OpenAI | `AZURE_API_KEY` + `AZURE_BASE_URL` | Your deployments |
166
- | Oracle | `ORACLE_API_KEY` + `ORACLE_BASE_URL` | `cohere.command-r-plus` |
167
- | Ollama | `OLLAMA_BASE_URL` | Any local model |
168
- | vLLM | `VLLM_BASE_URL` | Any served model |
197
+ Override any provider's endpoint:
169
198
 
170
- **Custom base URL?** Set `OPENAI_BASE_URL`, `GROQ_BASE_URL`, etc. in `.env`.
199
+ ```env
200
+ OPENAI_BASE_URL=https://my-corp-openai-proxy.example.com/v1
201
+ ```
171
202
 
172
- **Multiple instances of the same provider?** Use suffix notation: `OPENAI_EAST_API_KEY`, `OPENAI_WEST_API_KEY`, etc.
203
+ ### Multiple instances of the same provider
204
+
205
+ Use suffix notation (underscores become hyphens in the provider name):
206
+
207
+ ```env
208
+ OPENAI_EAST_API_KEY=sk-... # → provider: openai-east
209
+ OPENAI_WEST_API_KEY=sk-... # → provider: openai-west
210
+ JINA_API_KEY1=... # → provider: jina-1
211
+ ```
173
212
 
174
213
  ---
175
214
 
176
215
  ## Configuration
177
216
 
178
- The gateway loads settings in this order (later wins):
217
+ The gateway loads settings in this priority order (later wins):
179
218
 
180
219
  ```
181
- code defaults → config.yaml → .env / env vars
220
+ code defaults → config.yaml → .env / environment variables
182
221
  ```
183
222
 
184
- Generated by `aurora init`, every section is documented inline:
223
+ Generated by `aurora init`, every section of `config.yaml` is documented inline:
185
224
 
186
225
  | Section | What it controls |
187
226
  |---------|-----------------|
@@ -199,6 +238,294 @@ Generated by `aurora init`, every section is documented inline:
199
238
  | `fallback` | Provider failover rules |
200
239
  | `resilience` | Retry + circuit breaker |
201
240
 
241
+ > The tables below document every supported env var for reference. In practice you configure these in your **`.env` file** (CLI deployments), **`-e` flags** (Docker), or **`--set` values** (Helm). Never commit secrets to version control.
242
+
243
+ ### Essential `.env` variables
244
+
245
+ Minimal set to get the gateway running:
246
+
247
+ ```env
248
+ # ── REQUIRED ──────────────────────────────────────────────
249
+ AURORA_MASTER_KEY=replace-with-secure-random-key
250
+
251
+ # ── AT LEAST ONE PROVIDER ────────────────────────────────
252
+ OPENAI_API_KEY=sk-...
253
+ # or: GROQ_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY, etc.
254
+
255
+ # ── OPTIONAL BUT RECOMMENDED ─────────────────────────────
256
+ PORT=8080 # Listening port (default: 8080)
257
+ STORAGE_TYPE=sqlite # sqlite (default), postgresql, mongodb
258
+ LOG_LEVEL=info # debug, info, warn, error
259
+ LOG_FORMAT=text # text or json
260
+ ```
261
+
262
+ ### Configuring the same variable across all deployment methods
263
+
264
+ Each env var below works in all three deploy modes — here is an example:
265
+
266
+ | Variable | `.env` file | Docker `-e` flag | Helm `--set` value |
267
+ |----------|-------------|------------------|---------------------|
268
+ | `PORT` | `PORT=9090` | `-e PORT=9090` | `--set server.port=9090` |
269
+ | `AURORA_MASTER_KEY` | `AURORA_MASTER_KEY=...` | `-e AURORA_MASTER_KEY=...` | `--set auth.masterKey=...` |
270
+ | `OPENAI_API_KEY` | `OPENAI_API_KEY=sk-...` | `-e OPENAI_API_KEY=sk-...` | `--set providers.openai.apiKey=...` |
271
+ | `STORAGE_TYPE` | `STORAGE_TYPE=postgresql` | `-e STORAGE_TYPE=postgresql` | `--set storage.type=postgresql` |
272
+ | `REDIS_URL` | `REDIS_URL=redis://...` | `-e REDIS_URL=redis://...` | `--set cache.redis.url=...` |
273
+
274
+ ---
275
+
276
+ ### Complete env var reference
277
+
278
+ All configurable environment variables, organized by subsystem:
279
+
280
+ #### Server & Security
281
+
282
+ | Env var | Default | Description |
283
+ |---------|---------|-------------|
284
+ | `PORT` | `8080` | HTTP listening port |
285
+ | `BASE_PATH` | `/` | URL path prefix to mount under |
286
+ | `AURORA_MASTER_KEY` | `""` | Master API key for auth |
287
+ | `BODY_SIZE_LIMIT` | `10M` | Max request body size (e.g. `10M`, `1G`, `500K`) |
288
+ | `SWAGGER_ENABLED` | `false` | Enable Swagger UI at `/swagger/index.html` |
289
+ | `PPROF_ENABLED` | `false` | Enable pprof at `/debug/pprof/` |
290
+ | `ENABLE_PASSTHROUGH_ROUTES` | `true` | Provider-native passthrough at `/p/{provider}` |
291
+ | `ALLOW_PASSTHROUGH_V1_ALIAS` | `true` | Allow `/p/{provider}/v1/...` alias routes |
292
+ | `ENABLED_PASSTHROUGH_PROVIDERS` | `openai,anthropic,openrouter,zai,vllm` | Provider types for passthrough |
293
+ | `ENABLE_ANTHROPIC_INGRESS` | `false` | Expose `/v1/messages` for native Anthropic clients |
294
+ | `DISABLE_REQUEST_LOGGING` | `false` | Turn off request logging |
295
+ | `DISABLE_REQUEST_BODY_SNAPSHOT` | `false` | Don't snapshot request bodies |
296
+ | `DISABLE_PASSTHROUGH_SEMANTIC_ENRICHMENT` | `false` | Disable semantic enrichment on passthrough |
297
+
298
+ #### HTTP Client & Proxy
299
+
300
+ | Env var | Default | Description |
301
+ |---------|---------|-------------|
302
+ | `HTTP_TIMEOUT` | `600` | Upstream request timeout (seconds) |
303
+ | `HTTP_RESPONSE_HEADER_TIMEOUT` | `600` | Timeout for upstream response headers (seconds) |
304
+ | `HTTP_PROXY` | — | HTTP proxy URL for upstream calls |
305
+ | `HTTPS_PROXY` | — | HTTPS proxy URL |
306
+ | `NO_PROXY` | — | Hosts to exclude from proxy |
307
+
308
+ #### Storage
309
+
310
+ | Env var | Default | Description |
311
+ |---------|---------|-------------|
312
+ | `STORAGE_TYPE` | `sqlite` | Backend: `sqlite`, `postgresql`, or `mongodb` |
313
+ | `SQLITE_PATH` | `data/aurora-oss.db` | SQLite database file path |
314
+ | `POSTGRES_URL` | — | PostgreSQL connection string |
315
+ | `POSTGRES_MAX_CONNS` | `10` | PostgreSQL connection pool max |
316
+ | `MONGODB_URL` | — | MongoDB connection string |
317
+ | `MONGODB_DATABASE` | `aurora` | MongoDB database name |
318
+
319
+ #### Model Registry
320
+
321
+ | Env var | Default | Description |
322
+ |---------|---------|-------------|
323
+ | `MODEL_LIST_URL` | `https://aurorallm.github.io/aurora/assets/models.json` | External model metadata registry (empty = disabled) |
324
+ | `MODEL_LIST_LOCAL_PATH` | `data/models.local.json` | Local model registry snapshot path |
325
+ | `MODEL_LIST_USER_OVERRIDES_PATH` | `data/user_pricing.yaml` | User pricing override file |
326
+ | `MODELS_ENABLED_BY_DEFAULT` | `true` | Default enabled state for provider models |
327
+ | `MODEL_OVERRIDES_ENABLED` | `true` | Allow per-model overrides (dashboard editing) |
328
+ | `KEEP_ONLY_ALIASES_AT_MODELS_ENDPOINT` | `false` | Hide provider models from `GET /v1/models`, show only aliases |
329
+ | `CONFIGURED_PROVIDER_MODELS_MODE` | `fallback` | `fallback` or `allowlist` — how configured model lists affect inventory |
330
+
331
+ #### Caching
332
+
333
+ **Model cache:**
334
+
335
+ | Env var | Default | Description |
336
+ |---------|---------|-------------|
337
+ | `CACHE_REFRESH_INTERVAL` | `3600` | Model registry cache refresh (seconds) |
338
+ | `AURORA_CACHE_DIR` | `.cache` | Local filesystem cache directory |
339
+ | `REDIS_URL` | — | Redis connection URL (enables Redis-backed model cache) |
340
+ | `REDIS_KEY_MODELS` | `aurora:models` | Redis key for model cache |
341
+ | `REDIS_TTL_MODELS` | `86400` | Redis model cache TTL (seconds) |
342
+
343
+ **Response cache (exact match):**
344
+
345
+ | Env var | Default | Description |
346
+ |---------|---------|-------------|
347
+ | `RESPONSE_CACHE_SIMPLE_ENABLED` | `false` | Enable Redis exact-response cache |
348
+ | `REDIS_KEY_RESPONSES` | `aurora:response:` | Redis key prefix for responses |
349
+ | `REDIS_TTL_RESPONSES` | `3600` | Response cache TTL (seconds) |
350
+
351
+ **Semantic cache (vector similarity):**
352
+
353
+ | Env var | Default | Description |
354
+ |---------|---------|-------------|
355
+ | `SEMANTIC_CACHE_ENABLED` | `false` | Enable semantic cache |
356
+ | `SEMANTIC_CACHE_THRESHOLD` | `0.92` | Similarity threshold (0-1) |
357
+ | `SEMANTIC_CACHE_PROMPT_SIMILARITY` | `0.90` | Prompt similarity threshold (0-1) |
358
+ | `SEMANTIC_CACHE_TTL` | `3600` | Entry TTL (seconds) |
359
+ | `SEMANTIC_CACHE_MAX_CONV_MESSAGES` | `3` | Recent conversation messages to embed |
360
+ | `SEMANTIC_CACHE_EXCLUDE_SYSTEM_PROMPT` | `false` | Exclude system prompt from cache key |
361
+ | `SEMANTIC_CACHE_EMBEDDER_PROVIDER` | `openai` | Embedder provider name |
362
+ | `SEMANTIC_CACHE_EMBEDDER_MODEL` | `text-embedding-3-small` | Embedder model |
363
+ | `SEMANTIC_CACHE_VECTOR_STORE_TYPE` | `qdrant` | Backend: `qdrant`, `pgvector`, `pinecone`, `weaviate` |
364
+ | `SEMANTIC_CACHE_QDRANT_URL` | `http://localhost:6333` | Qdrant URL |
365
+ | `SEMANTIC_CACHE_QDRANT_COLLECTION` | `aurora_semantic` | Qdrant collection name |
366
+ | `SEMANTIC_CACHE_QDRANT_API_KEY` | — | Qdrant API key |
367
+ | `SEMANTIC_CACHE_PGVECTOR_URL` | — | pgvector connection string |
368
+ | `SEMANTIC_CACHE_PGVECTOR_TABLE` | `aurora_semantic_cache` | pgvector table name |
369
+ | `SEMANTIC_CACHE_PGVECTOR_DIMENSION` | `1536` | pgvector embedding dimension |
370
+ | `SEMANTIC_CACHE_PINECONE_HOST` | — | Pinecone host URL |
371
+ | `SEMANTIC_CACHE_PINECONE_API_KEY` | — | Pinecone API key |
372
+ | `SEMANTIC_CACHE_PINECONE_NAMESPACE` | — | Pinecone namespace |
373
+ | `SEMANTIC_CACHE_PINECONE_DIMENSION` | `1536` | Pinecone embedding dimension |
374
+ | `SEMANTIC_CACHE_WEAVIATE_URL` | — | Weaviate URL |
375
+ | `SEMANTIC_CACHE_WEAVIATE_CLASS` | `AuroraSemanticCache` | Weaviate class name |
376
+ | `SEMANTIC_CACHE_WEAVIATE_API_KEY` | — | Weaviate API key |
377
+
378
+ #### Audit Logging
379
+
380
+ | Env var | Default | Description |
381
+ |---------|---------|-------------|
382
+ | `LOGGING_ENABLED` | `false` | Enable audit log to storage |
383
+ | `LOGGING_LOG_BODIES` | `true` | Log request/response bodies (may contain PII) |
384
+ | `LOGGING_LOG_HEADERS` | `true` | Log headers (sensitive headers redacted) |
385
+ | `LOGGING_ONLY_MODEL_INTERACTIONS` | `true` | Skip health/metrics/admin endpoints |
386
+ | `LOGGING_BUFFER_SIZE` | `1000` | In-memory queue capacity |
387
+ | `LOGGING_FLUSH_INTERVAL` | `5` | Flush interval (seconds) |
388
+ | `LOGGING_RETENTION_DAYS` | `30` | Auto-delete after N days (0 = forever) |
389
+
390
+ #### Usage Tracking
391
+
392
+ | Env var | Default | Description |
393
+ |---------|---------|-------------|
394
+ | `USAGE_ENABLED` | `true` | Enable token usage tracking |
395
+ | `USAGE_PRICING_RECALCULATION_ENABLED` | `true` | Allow admin pricing recalculation |
396
+ | `ENFORCE_RETURNING_USAGE_DATA` | `true` | Add `stream_options.include_usage=true` to streaming requests |
397
+ | `USAGE_BUFFER_SIZE` | `1000` | In-memory queue capacity |
398
+ | `USAGE_FLUSH_INTERVAL` | `5` | Flush interval (seconds) |
399
+ | `USAGE_RETENTION_DAYS` | `90` | Auto-delete after N days (0 = forever) |
400
+
401
+ #### Guardrails
402
+
403
+ | Env var | Default | Description |
404
+ |---------|---------|-------------|
405
+ | `GUARDRAILS_ENABLED` | `false` | Enable content safety filters globally |
406
+ | `ENABLE_GUARDRAILS_FOR_BATCH_PROCESSING` | `false` | Apply guardrails to `/v1/batches` items |
407
+
408
+ #### Metrics
409
+
410
+ | Env var | Default | Description |
411
+ |---------|---------|-------------|
412
+ | `METRICS_ENABLED` | `false` | Enable Prometheus `/metrics` endpoint |
413
+ | `METRICS_ENDPOINT` | `/metrics` | Metrics endpoint path |
414
+
415
+ #### Token Saver (output compression)
416
+
417
+ | Env var | Default | Description |
418
+ |---------|---------|-------------|
419
+ | `TOKEN_SAVER_ENABLED` | `false` | Enable caveman-style output compression |
420
+ | `TOKEN_SAVER_ENDPOINTS` | `chat_completions` | Endpoints to apply it to |
421
+ | `TOKEN_SAVER_APPLY_STREAMING` | `true` | Apply to streaming responses |
422
+ | `TOKEN_SAVER_OUTPUT_ENABLED` | `false` | Enable output style/profile |
423
+ | `TOKEN_SAVER_OUTPUT_PROFILE` | `concise` | Output profile name |
424
+ | `TOKEN_SAVER_MODELS_INCLUDE` | — | Models to include (comma-separated) |
425
+ | `TOKEN_SAVER_MODELS_EXCLUDE` | — | Models to exclude |
426
+ | `TOKEN_SAVER_PROVIDERS_INCLUDE` | — | Providers to include |
427
+ | `TOKEN_SAVER_PROVIDERS_EXCLUDE` | — | Providers to exclude |
428
+ | `TOKEN_SAVER_ON_ERROR` | `allow` | Behavior on error: `allow` or `block` |
429
+ | `TOKEN_SAVER_EMIT_HEADERS` | `true` | Emit token-saver headers in response |
430
+ | `TOKEN_SAVER_AUDIT_ENABLED` | `true` | Log token-saver actions |
431
+
432
+ #### Resilience (retry + circuit breaker)
433
+
434
+ | Env var | Default | Description |
435
+ |---------|---------|-------------|
436
+ | `RETRY_MAX_RETRIES` | `3` | Upstream retry count |
437
+ | `RETRY_INITIAL_BACKOFF` | `1s` | Initial backoff duration |
438
+ | `RETRY_MAX_BACKOFF` | `30s` | Maximum backoff duration |
439
+ | `RETRY_BACKOFF_FACTOR` | `2.0` | Exponential backoff multiplier |
440
+ | `RETRY_JITTER_FACTOR` | `0.1` | Random jitter fraction |
441
+ | `CIRCUIT_BREAKER_FAILURE_THRESHOLD` | `5` | Failures before circuit opens |
442
+ | `CIRCUIT_BREAKER_SUCCESS_THRESHOLD` | `2` | Successes before circuit closes |
443
+ | `CIRCUIT_BREAKER_TIMEOUT` | `30s` | Time before half-open retry |
444
+
445
+ #### Fallback
446
+
447
+ | Env var | Default | Description |
448
+ |---------|---------|-------------|
449
+ | `FEATURE_FALLBACK_MODE` | `manual` | Fallback mode: `auto`, `manual`, or `off` |
450
+ | `FALLBACK_MANUAL_RULES_PATH` | — | Path to manual fallback rules JSON |
451
+
452
+ #### Admin & Features
453
+
454
+ | Env var | Default | Description |
455
+ |---------|---------|-------------|
456
+ | `ADMIN_ENDPOINTS_ENABLED` | `true` | Enable `/admin/api/v1/*` REST endpoints |
457
+ | `ADMIN_UI_ENABLED` | `true` | Enable `/admin/dashboard` UI |
458
+ | `COMBOS_ENABLED` | `true` | Enable combo model calls |
459
+ | `CLI_TOOLS_ENABLED` | `true` | Enable CLI tools integration |
460
+ | `CLI_TOOLS_APPLY_ENABLED` | `false` | Allow admin/API to apply tool changes |
461
+ | `WORKFLOW_REFRESH_INTERVAL` | `1m` | Workflow refresh interval from storage |
462
+ | `EDITION` | — | Edition identifier (Enterprise use) |
463
+
464
+ #### Config file path
465
+
466
+ | Env var | Default | Description |
467
+ |---------|---------|-------------|
468
+ | `AURORA_CONFIG_PATH` | `configs/config.yaml` | Override path to config YAML |
469
+
470
+ ---
471
+
472
+ ### Quick config profiles
473
+
474
+ Aurora ships pre-built config profiles in `configs/editions/`:
475
+
476
+ | Profile | File | Use case |
477
+ |---------|------|----------|
478
+ | OSS | `oss.env.example` | Minimal local — SQLite, no Redis |
479
+ | OSS Local Power | `oss.local-power.env.example` | SQLite + Redis exact cache |
480
+ | OSS Team | `oss.team.env.example` | Postgres + Redis + Qdrant — full team deployment |
481
+
482
+ ```bash
483
+ export AURORA_CONFIG_PATH=configs/editions/oss.team.example.yaml
484
+ ```
485
+
486
+ ---
487
+
488
+ ## CLI Reference
489
+
490
+ The `aurora` CLI is installed via `npm install -g iaurora`.
491
+
492
+ | Command | Description |
493
+ |---------|-------------|
494
+ | `aurora init` | Scaffolds `config.yaml`, `.env`, `data/` in the current directory |
495
+ | `aurora` | Starts the gateway server (default port 8080) |
496
+ | `aurora --help` | Show all CLI options |
497
+
498
+ `aurora init` generates:
499
+ - **`config.yaml`** — Full gateway configuration with inline docs for every section
500
+ - **`.env`** — Environment file for secrets and runtime overrides (based on `.env.template`)
501
+ - **`data/`** — Directory for SQLite database and local model cache
502
+
503
+ The gateway merges `config.yaml` + `.env`/env vars at startup. Use `config.yaml` for structure and `.env` for secrets/keys.
504
+
505
+ ---
506
+
507
+ ## Repository Structure
508
+
509
+ ```text
510
+ aurora/
511
+ ├── apps/ # Application entrypoints
512
+ │ └── aurora/ # Main gateway binary
513
+ ├── internal/ # Internal packages
514
+ │ ├── api/ # HTTP handlers, middleware
515
+ │ ├── config/ # Configuration loading and validation
516
+ │ ├── providers/ # Provider implementations (OpenAI, Anthropic, etc.)
517
+ │ ├── storage/ # SQLite, PostgreSQL, MongoDB backends
518
+ │ ├── guardrails/ # Content safety filters
519
+ │ ├── cache/ # Exact and semantic caching
520
+ │ └── analytics/ # Usage tracking and metrics
521
+ ├── dashboard-ui/ # React admin dashboard frontend
522
+ ├── configs/ # Configuration profiles and examples
523
+ ├── docs/ # Documentation and assets
524
+ ├── scripts/ # Build and release scripts
525
+ ├── test/ # Test suites
526
+ └── helm/ # Kubernetes Helm charts
527
+ ```
528
+
202
529
  ---
203
530
 
204
531
  ## Documentation
@@ -227,6 +554,6 @@ We welcome contributions of all kinds! Check out the repository to get started:
227
554
 
228
555
  ## License
229
556
 
230
- This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.
557
+ This project is licensed under the Apache 2.0 License see the [LICENSE](LICENSE) file for details.
231
558
 
232
559
  Built with ❤️ by the Aurora team.
package/bin/aurora.exe CHANGED
Binary file
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.29",
2
+ "version": "1.0.30",
3
3
  "author": "Aurora Gateway",
4
4
  "license": "Apache-2.0",
5
5
  "files": [