fix: require client secrets and sanitize uploaded images

This commit is contained in:
vasily committed 2026-10-16 14:24:02 +08:00
1 parent 1f43b2d065
commit a07c178fda
7 files changed
+78 -24

No files matched your search

+2 -1
View File
@@ -4,7 +4,7 @@ An asynchronous proxy for image generation through Google Gemini or OpenRouter.
## Start locally
Requirements: Python 3.12 or newer.
Requirements: Python 3.12 or newer. Uploaded images are decoded and re-encoded with Pillow; only JPEG, PNG, and WebP are accepted.
```sh
python -m venv .venv
@@ -63,6 +63,7 @@ The built-in `nano-banana` alias defaults to Gemini 2.5 Flash Image. Set `GOOGLE
| `DB_PATH` | `./data/proxy.db` | SQLite database location. |
| `MAX_UPLOAD_BYTES` | `52428800` | Aggregate raw image upload limit. |
| `MAX_IMAGES` | `8` | Maximum reference image count. |
| `MAX_IMAGE_PIXELS` | `25000000` | Maximum width × height for each uploaded image. |
| `HTTP_TIMEOUT_SECONDS` | `300` | Overall upstream request timeout. |
| `CONNECT_TIMEOUT_SECONDS` | `15` | Upstream connect timeout. |
| `GOOGLE_MODEL_NANO_BANANA` | `gemini-2.5-flash-image` | Native Google alias target. |