update core config docs

This commit is contained in:
Shroominic
2025-09-04 15:29:06 +01:00
parent fa4b78abec
commit 124fbedf2a
2 changed files with 12 additions and 15 deletions
+3 -6
View File
@@ -10,8 +10,6 @@ Routstr Core is configured through environment variables. This guide covers all
|----------|-------------|---------|----------|
| `UPSTREAM_BASE_URL` | Base URL of the OpenAI-compatible API to proxy | - | ✅ |
| `UPSTREAM_API_KEY` | API key for the upstream service | - | ❌ |
| `CHAT_COMPLETIONS_API_VERSION` | Append `api-version` to `/chat/completions` (Azure OpenAI) | - | ❌ |
| `DATABASE_URL` | SQLite database connection string | `sqlite+aiosqlite:///keys.db` | ❌ |
| `ADMIN_PASSWORD` | Password for admin dashboard access | - | ⚠️ |
### Node Information
@@ -56,13 +54,12 @@ Routstr Core is configured through environment variables. This guide covers all
| `LOG_LEVEL` | Logging level (DEBUG, INFO, WARNING, ERROR) | `INFO` | ❌ |
| `ENABLE_CONSOLE_LOGGING` | Enable console log output | `true` | ❌ |
### Model Management
### Other
| Variable | Description | Default | Required |
|----------|-------------|---------|----------|
| `MODELS_PATH` | Path to custom models.json file | `models.json` | ❌ |
| `BASE_URL` | Base URL for fetching model info | `https://openrouter.ai/api/v1` | ❌ |
| `SOURCE` | Filter models by source provider | - | ❌ |
| `CHAT_COMPLETIONS_API_VERSION` | Append `api-version` to `/chat/completions` (Azure OpenAI) | - | ❌ |
| `DATABASE_URL` | SQLite database connection string | `sqlite+aiosqlite:///keys.db` | ❌ |
## Configuration Examples
+9 -9
View File
@@ -10,15 +10,6 @@ Routstr maintains full compatibility with the OpenAI API, meaning:
- Only the base URL and API key need to change
- All parameters and responses match OpenAI's format
### Azure OpenAI compatibility
To use Azure OpenAI through Routstr with minimal changes:
- Set `UPSTREAM_BASE_URL` to your Azure deployments URL, for example: `https://<resource>.openai.azure.com/openai/deployments/<deployment>`
- Set `CHAT_COMPLETIONS_API_VERSION=2024-05-01-preview`
When this env var is set, Routstr automatically appends `api-version=2024-05-01-preview` to all upstream `/chat/completions` requests.
## Basic Setup
### Python
@@ -325,6 +316,15 @@ client = OpenAI(
)
```
### Azure OpenAI compatibility
To use Azure OpenAI through Routstr with minimal changes:
- Set `UPSTREAM_BASE_URL` to your Azure deployments URL, for example: `https://<resource>.openai.azure.com/openai/deployments/<deployment>`
- Set `CHAT_COMPLETIONS_API_VERSION=2024-05-01-preview`
When this env var is set, Routstr automatically appends `api-version=2024-05-01-preview` to all upstream `/chat/completions` requests.
### Async Operations
For high-performance applications: