Fifteen changes aimed at the first day of real use: - Import and media jobs persist to <data>/jobs-*.json and reload on start (running ones settle as errors); the Register button no longer vanishes because the gateway restarted. - Docker ships the cortiq binary (built in the builder stage) — local .cmf chat models and image/video generation now work in containers, where auto-install never could (no cargo in the runtime image). libvulkan1 added for optional GPU offload. - Open admin console on 0.0.0.0 without a token now warns in the log and shows a dismissible banner — the VPS footgun is at least labeled. - "Restart gateway" button in Settings: stops managed model servers, spawns a fresh copy (bind retried while the port frees), Docker relies on the container restart policy instead. - Dashboard "System" panel: CPU sparkline + load, RAM (with the gateway's own RSS), free disk at the models dir — sampled by sysinfo every 2 s. - Featured model cards warn "not enough disk" / "may not fit in RAM" before the download, from the same live snapshot. - Log viewer in the sidebar: a 500-line in-memory ring fed by a second ANSI-free tracing layer; filter, level, pause, copy. - Update check: crates.io polled twice a day, the console shows an "update available" notice. - Media generations queue up (with position shown) instead of being rejected; progress gained an honest ETA from measured throughput. - Generation gallery under the image/video tabs: lazy PPM thumbnails, click to reopen with seed/steps, delete. - Playground chat is a real dialogue now: history is resent, bubbles, Clear, Cmd/Ctrl+Enter. - "Connect your app" snippets (curl / Python / JS) on the keys page, with the real key inlined right after creation. - One-click benchmark on the Models page via `cortiq bench --json`. - Config export now downloads the actual gateway.toml (comments intact); import accepts TOML (validated, hot-reloaded) and the legacy JSON. - Streaming token counts are exact when the model server provides usage (cortiq-server patch, shipped separately); the gateway fallback now counts content chunks (1/token on cortiq) instead of chars/4. Wizard's Finish lands on the Playground. 37 new strings in all 7 languages.
80 lines
2.2 KiB
TOML
80 lines
2.2 KiB
TOML
[package]
|
|
name = "cortiq-gateway"
|
|
version = "0.2.37"
|
|
edition = "2021"
|
|
rust-version = "1.75"
|
|
license = "Apache-2.0"
|
|
description = "Universal LLM gateway with intelligent routing and an embedded multilingual admin console"
|
|
repository = "https://github.com/infosave2007/cortiq-gateway"
|
|
homepage = "https://api.allaigate.com"
|
|
readme = "README.md"
|
|
keywords = ["llm", "gateway", "proxy", "openai", "routing"]
|
|
categories = ["web-programming::http-server", "command-line-utilities"]
|
|
# Files shipped in the published crate. The embedded admin SPA MUST be included
|
|
# because rust-embed compiles it in; docs/screenshots are excluded to keep the
|
|
# crate lean. The web/ subfolders are listed one by one rather than as web/**/*
|
|
# so stray scratch files dropped next to the SPA never end up published.
|
|
include = [
|
|
"src/**/*",
|
|
"web/index.html",
|
|
"web/favicon.svg",
|
|
"web/css/**/*",
|
|
"web/js/**/*",
|
|
"config/gateway.example.toml",
|
|
"README.md",
|
|
"CHANGELOG.md",
|
|
"LICENSE",
|
|
]
|
|
|
|
[dependencies]
|
|
# async runtime + HTTP server
|
|
tokio = { version = "1", features = ["full"] }
|
|
axum = { version = "0.7", features = ["macros"] }
|
|
tower = "0.5"
|
|
tower-http = { version = "0.6", features = ["limit", "trace", "cors"] }
|
|
|
|
# HTTP client to providers and to cortiq-router (rustls, no OpenSSL)
|
|
reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "rustls-tls"] }
|
|
|
|
# serialization
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
toml = "0.8"
|
|
|
|
# hot-reloadable shared state + embedded admin SPA
|
|
arc-swap = "1"
|
|
rust-embed = "8"
|
|
mime_guess = "2"
|
|
|
|
# cross-platform CSPRNG for admin/key token generation (Linux/macOS/Windows)
|
|
getrandom = "0.2"
|
|
|
|
# streaming / async utils
|
|
futures = "0.3"
|
|
async-trait = "0.1"
|
|
async-stream = "0.3"
|
|
bytes = "1"
|
|
tokio-stream = "0.1"
|
|
|
|
# CLI / config
|
|
clap = { version = "4", features = ["derive"] }
|
|
# open browser on first run (optional)
|
|
open = { version = "5", optional = true }
|
|
|
|
# host metrics for the admin dashboard (CPU / RAM / disk)
|
|
sysinfo = "0.39"
|
|
|
|
# errors / logging / metrics
|
|
thiserror = "1"
|
|
anyhow = "1"
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
|
|
[features]
|
|
default = ["open-browser"]
|
|
open-browser = ["open"]
|
|
|
|
[profile.release]
|
|
lto = true
|
|
codegen-units = 1
|