Commit Graph

30 Commits

Author SHA1 Message Date
renjue 3c2285922e Fix CI go test by committing embed placeholder for web/dist.
CI / docker (push) Failing after 2m2s
Keep a minimal dist/index.html in version control so go:embed succeeds
when CI checks out without a frontend build; ignore other dist artifacts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 21:13:39 +08:00
renjue a831012c48 Add Gitea CI, align Docker for multi-arch, and drop legacy YAML config.
CI / docker (push) Failing after 1m35s
Introduce Gitea Actions workflow and CI-aligned Dockerfile; remove file-based
config in favor of SQLite settings; refresh branding and tighten gitignore.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 21:10:38 +08:00
renjue aca63d7526 Add model aliases, routing UX, and admin hardening.
Support ingress-facing model aliases with upstream rewrite, category-aware health checks, provider name validation, modal click-outside guard, and dropdown-based routing rule targets.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-21 02:49:49 +08:00
renjue af1f714fa2 Fix models drawer crash when provider has no models.
Return empty arrays from GetModels and normalize null API responses so the admin UI never reads length on null.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-21 02:03:17 +08:00
renjue c8b802996f Add prebuilt Docker push path for linux/amd64 on Apple Silicon.
Work around buildx QEMU segfault during in-container Go compile by cross-compiling locally first.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-21 01:42:34 +08:00
renjue e780197641 Fix provider admin UI and harden model management APIs.
Category-scoped protocol types, manual model add/delete, and safer sync behavior so egress configuration and model tables stay consistent.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-21 01:36:04 +08:00
renjue 694e3a8a4a Add image predictions, embedding/rerank egress, and Alpine Docker build.
Introduce ComfyUI workflow models with Replicate-style predictions API, complete embedding and Cohere-compatible rerank proxying, and rebuild images for linux/amd64 via docker.1panel.live.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-21 00:30:23 +08:00
renjue bd39a4cc05 Align admin frontend with UI design system, i18n, and dashboard charts.
Refactor theme and pages to match UI-DESIGN-SYSTEM.md, add zh/en i18n with Element Plus locale sync, and expose 24h request trend data for ECharts on the dashboard.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-18 17:49:37 +08:00
renjue ad6e192522 Unify admin UI typography with design system tokens.
Add font-size scale, harmonize Element Plus form and table text, fix settings label wrapping, and align body colors with the spec.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 22:36:10 +08:00
renjue af63df2391 Align admin UI spacing with the design system tokens.
Centralize spacing in theme.css, adopt card-toolbar/card-pager utilities, and remove per-page inline margins across all views.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 22:23:09 +08:00
renjue 23d112d370 Retry and failover on upstream 429 responses.
Treat provider rate limits as retryable, rotate to other keys when possible, and pass through the upstream status code to clients.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 16:43:42 +08:00
renjue b2e2d27b54 Fix provider key decryption after settings migration.
Auto-repair encryption_key from legacy config or env on startup and surface decrypt failures instead of a generic no-keys error.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 16:39:35 +08:00
renjue 78ff89574d Accept deprecated -config flag for old container entrypoints.
Ignore the removed config file path so git-pulled binaries still start under legacy image entrypoints; delegate container startup to the repo entrypoint when available.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 16:35:19 +08:00
renjue 7ab3bd9eff Move runtime configuration to admin UI and database.
Remove config-file validation that blocked startup; settings are stored in SQLite and editable from the system settings page, with optional legacy yaml import on first boot.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 16:32:35 +08:00
renjue 22c711bc1f Populate request log error_msg from upstream API failures.
Extract error details from provider response bodies for chat completions and streams, and record gateway pre-check and failover failures so the request logs page shows actionable messages.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 16:20:21 +08:00
renjue bdf6ff0ae8 Harden security defaults and fix gateway reliability issues.
Fail fast on missing config and reject default encryption keys; use SHA-256 ingress key lookup, trusted-proxy-aware client IP, sentinel gateway errors with correct HTTP status codes, daily provider key counter reset, Anthropic multimodal forwarding, and cache Get methods that return copies.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 12:48:23 +08:00
renjue 6ceda9e6f3 Include admin login attempts in request logs.
Record success and failure login events alongside API usage logs, with username-only request bodies and UI filters for admin_login entries.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 20:27:48 +08:00
renjue f2fb39921f Fix SQLite migration failure for legacy ip_rules schema.
Manage ip_rules table manually before AutoMigrate to convert c_id_r to cidr and avoid GORM rebuilding the table with missing NOT NULL columns.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 19:04:55 +08:00
renjue 29ace20d92 Improve request logs, IP rule safety, and add container recovery tooling.
Request logs now retain 500 records with pagination, filters, ingress names, and request/response bodies. IP rules default to proxy scope with loopback equivalence and schema migration to prevent admin lockout. Add luminary-recover CLI and script for password reset, IP rule cleanup, and login cooldown recovery without rebuilding the image.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 19:00:48 +08:00
renjue 41a206370e Fix responses-to-chat adapter for input_text and multimodal content parts.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 18:06:31 +08:00
renjue 71c84bf175 Adapt /v1/responses to chat completions when upstream lacks native support.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 18:00:10 +08:00
renjue 495e6b29e7 Add provider model toggles, /v1/responses proxy, and upsert model sync.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 17:47:05 +08:00
renjue b22fae5b36 Record client IP in usage logs and add provider-model and per-IP dashboard stats.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 16:40:31 +08:00
renjue 5ea87122e5 Add login brute-force protection and document ingress API in README.
Lock admin login by IP after repeated failures with configurable lockout, and document /v1 endpoints with correct default port.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 16:37:16 +08:00
renjue e6ce021289 Show provider models in egress UI and use multi-select ingress whitelists.
List models on providers API, expand rows in egress management, and replace JSON text inputs with provider/model pickers where empty means allow all.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 16:27:47 +08:00
renjue c509b43657 Fix SQLite with CGO_ENABLED=0 using pure Go glebarez driver.
Replaces go-sqlite3 so container builds without CGO can open the database.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 16:12:52 +08:00
renjue 3b7a939c42 Use goproxy.cn for Go module downloads in Makefile.
Container builds pick this up via git pull without rebuilding the Docker image.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 16:09:05 +08:00
renjue 81840d1657 Switch npm registry from internal artifactory to npmmirror.
Regenerate package-lock.json so Docker builds can install dependencies in CN networks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 16:05:40 +08:00
renjue 30c94aac92 Add Luminary AI gateway: Go backend, Vue admin UI, and Docker deploy.
Push full source so container entrypoint can clone, build, and run from git.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 15:59:43 +08:00
rose_cat707 c268c4fd05 Initial commit 2026-06-15 04:31:12 +00:00