chore(release): prepare v0.1.0 for crates.io
- bump version to 0.1.0; add crates.io metadata (include list, homepage, rust-version) - add .github/workflows/release.yml: on tag v* → publish to crates.io + GitHub Release with binaries - README: absolute links/images and badges so it renders on crates.io; add install section - CHANGELOG: 0.1.0
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
name: Release
|
||||
|
||||
# Triggered when a version tag is pushed, e.g. `git tag v0.1.0 && git push --tags`.
|
||||
# Publishes the crate to crates.io and creates a GitHub Release with prebuilt binaries.
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
# --- publish to crates.io -------------------------------------------------
|
||||
crates-io:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Publish to crates.io
|
||||
# Requires a CARGO_REGISTRY_TOKEN repo secret (Settings → Secrets → Actions).
|
||||
if: ${{ secrets.CARGO_REGISTRY_TOKEN != '' }}
|
||||
run: cargo publish --token "${{ secrets.CARGO_REGISTRY_TOKEN }}"
|
||||
|
||||
# --- prebuilt binaries + GitHub Release -----------------------------------
|
||||
release:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
- os: macos-14
|
||||
target: aarch64-apple-darwin
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: ${{ matrix.target }}
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Build
|
||||
run: cargo build --release --target ${{ matrix.target }}
|
||||
- name: Package
|
||||
shell: bash
|
||||
run: |
|
||||
staging="cortiq-gateway-${{ github.ref_name }}-${{ matrix.target }}"
|
||||
mkdir "$staging"
|
||||
cp "target/${{ matrix.target }}/release/cortiq-gateway" "$staging"/
|
||||
cp README.md LICENSE config/gateway.example.toml "$staging"/
|
||||
tar czf "$staging.tar.gz" "$staging"
|
||||
echo "ASSET=$staging.tar.gz" >> "$GITHUB_ENV"
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: ${{ env.ASSET }}
|
||||
generate_release_notes: true
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
All notable changes to this project are documented here.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
||||
|
||||
## [Unreleased]
|
||||
## [0.1.0] - 2026-06-30
|
||||
|
||||
### Added
|
||||
- **Embedded admin web console** at `/admin` — a build-free single-page app compiled
|
||||
|
||||
Generated
+1
-1
@@ -263,7 +263,7 @@ checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
|
||||
|
||||
[[package]]
|
||||
name = "cortiq-gateway"
|
||||
version = "0.0.1"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arc-swap",
|
||||
|
||||
+16
-3
@@ -1,13 +1,26 @@
|
||||
[package]
|
||||
name = "cortiq-gateway"
|
||||
version = "0.0.1"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.75"
|
||||
license = "Apache-2.0"
|
||||
description = "Universal LLM gateway with intelligent routing via cortiq-router"
|
||||
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"]
|
||||
categories = ["web-programming::http-server", "command-line-utilities"]
|
||||
# Files shipped in the published crate. The embedded admin SPA (web/) MUST be
|
||||
# included because rust-embed compiles it in; docs/screenshots are excluded to
|
||||
# keep the crate lean.
|
||||
include = [
|
||||
"src/**/*",
|
||||
"web/**/*",
|
||||
"config/gateway.example.toml",
|
||||
"README.md",
|
||||
"CHANGELOG.md",
|
||||
"LICENSE",
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
# async runtime + HTTP server
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# Cortiq Gateway
|
||||
|
||||
**English** · [Русский](README.ru.md)
|
||||
**English** · [Русский](https://github.com/infosave2007/cortiq-gateway/blob/master/README.ru.md)
|
||||
|
||||
[](LICENSE)
|
||||
[](https://crates.io/crates/cortiq-gateway)
|
||||
[](https://github.com/infosave2007/cortiq-gateway/actions/workflows/ci.yml)
|
||||
[](https://github.com/infosave2007/cortiq-gateway/blob/master/LICENSE)
|
||||

|
||||

|
||||
|
||||
**A universal LLM gateway with intelligent routing.**
|
||||
One OpenAI-compatible endpoint → automatic model selection from your pool
|
||||
@@ -44,18 +45,35 @@ One OpenAI-compatible endpoint → automatic model selection from your pool
|
||||
|
||||
---
|
||||
|
||||
## 📦 Install
|
||||
|
||||
```bash
|
||||
# from crates.io
|
||||
cargo install cortiq-gateway
|
||||
|
||||
# or build from source
|
||||
git clone https://github.com/infosave2007/cortiq-gateway
|
||||
cd cortiq-gateway
|
||||
cargo build --release # ./target/release/cortiq-gateway
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🖥️ Admin console
|
||||
|
||||

|
||||

|
||||
|
||||
The gateway ships with an embedded web console at **`/admin`**:
|
||||
|
||||
| | |
|
||||
| Models | Routing |
|
||||
|---|---|
|
||||
|  |  |
|
||||
| **Models** — add/edit/probe models, manage provider keys | **Routing** — visual tier editor (ordered, drag-to-reorder) |
|
||||
|  |  |
|
||||
| **Playground** — test the live pipeline, see the decision | **Dashboard** — traffic, cost, latency analytics |
|
||||
|  |  |
|
||||
| add/edit/probe models, manage provider keys | visual tier editor (ordered, reorderable) |
|
||||
|
||||
| Playground |
|
||||
|---|
|
||||
|  |
|
||||
| test the live pipeline and see the routing decision |
|
||||
|
||||
```bash
|
||||
cargo run --release -- --config config/gateway.toml --admin-token <YOUR_TOKEN>
|
||||
@@ -79,7 +97,7 @@ cp config/gateway.example.toml config/gateway.toml
|
||||
$EDITOR config/gateway.toml
|
||||
|
||||
# 3. run the gateway
|
||||
cargo run --release -- --config config/gateway.toml
|
||||
cortiq-gateway --config config/gateway.toml
|
||||
# Gateway listens on 0.0.0.0:9000 and serves the admin console at /admin
|
||||
```
|
||||
|
||||
@@ -113,13 +131,13 @@ print(resp.choices[0].message.content)
|
||||
## Request flow
|
||||
|
||||
1. Client → `POST /v1/chat/completions` (or Anthropic/MCP) with `model: "cortiq-auto"`.
|
||||
2. The gateway extracts the **text to route on** (strategy is configurable, see [docs/ROUTING.md](docs/ROUTING.md)).
|
||||
2. The gateway extracts the **text to route on** (strategy is configurable, see [docs/ROUTING.md](https://github.com/infosave2007/cortiq-gateway/blob/master/docs/ROUTING.md)).
|
||||
3. Gateway → `cortiq-router /v1/route` → gets `task_label` + `complexity.tier`.
|
||||
4. Gateway selects a model from the pool via the routing table (with a fallback order).
|
||||
5. Gateway → the selected model's provider (translating the protocol if needed), returns the response.
|
||||
6. Gateway attaches routing metadata in headers/`usage` and records cost & statistics.
|
||||
|
||||
Details — [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
|
||||
Details — [docs/ARCHITECTURE.md](https://github.com/infosave2007/cortiq-gateway/blob/master/docs/ARCHITECTURE.md).
|
||||
|
||||
---
|
||||
|
||||
@@ -181,8 +199,8 @@ high = ["claude-opus", "local-qwen"]
|
||||
default = "local-qwen"
|
||||
```
|
||||
|
||||
Full example — [config/gateway.example.toml](config/gateway.example.toml).
|
||||
Routing & cost-aware selection — [docs/ROUTING.md](docs/ROUTING.md).
|
||||
Full example — [config/gateway.example.toml](https://github.com/infosave2007/cortiq-gateway/blob/master/config/gateway.example.toml).
|
||||
Routing & cost-aware selection — [docs/ROUTING.md](https://github.com/infosave2007/cortiq-gateway/blob/master/docs/ROUTING.md).
|
||||
Everything in the config is also editable from the admin console at runtime.
|
||||
|
||||
---
|
||||
@@ -195,7 +213,7 @@ Everything in the config is also editable from the admin console at runtime.
|
||||
- **Cost accounting:** token usage + USD cost and the selected model.
|
||||
- **Observability:** `GET /metrics` (Prometheus), `GET /healthz`, `GET /readyz`.
|
||||
|
||||
Details — [docs/PROTOCOLS.md](docs/PROTOCOLS.md).
|
||||
Details — [docs/PROTOCOLS.md](https://github.com/infosave2007/cortiq-gateway/blob/master/docs/PROTOCOLS.md).
|
||||
|
||||
---
|
||||
|
||||
@@ -214,9 +232,9 @@ cargo test # config round-trip, routing validation
|
||||
degradation, cost/token accounting, the **embedded multilingual admin console with
|
||||
hot config reload**, statistics and Prometheus `GET /metrics`. Planned: streaming
|
||||
(SSE), Anthropic provider/inbound, embeddings, MCP. See the roadmap in
|
||||
[docs/ARCHITECTURE.md](docs/ARCHITECTURE.md). Contributions welcome — see
|
||||
[CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
[docs/ARCHITECTURE.md](https://github.com/infosave2007/cortiq-gateway/blob/master/docs/ARCHITECTURE.md).
|
||||
Contributions welcome — see [CONTRIBUTING.md](https://github.com/infosave2007/cortiq-gateway/blob/master/CONTRIBUTING.md).
|
||||
|
||||
## License
|
||||
|
||||
Apache-2.0 — see [LICENSE](LICENSE).
|
||||
Apache-2.0 — see [LICENSE](https://github.com/infosave2007/cortiq-gateway/blob/master/LICENSE).
|
||||
|
||||
Reference in New Issue
Block a user