Releases: margbug01/amp-proxy-rs
Releases · margbug01/amp-proxy-rs
v0.3.1
v0.3.0
feat: add dual-format Gemini bridge
v0.2.0
amp-proxy-rs v0.2.0 New since v0.1.0: - Prometheus /metrics endpoint (requests_total, request_duration_seconds, billable_requests_total) - Provider health checks + automatic failover with 30s background probe - amp-proxy capture-pretty subcommand for body_capture .log viewing - Bilingual README (Chinese primary, English mirror) Internals: customproxy registry now Vec<Arc<Provider>> per model; RetryTransport wired into the Gemini bridge; Connection-header value honored in proxy header sanitisation per RFC 9110. cargo test: 159 passed. See CHANGELOG.md for the full list.
v0.1.0
First release of amp-proxy-rs — a single-binary, focused reverse proxy for Sourcegraph Amp CLI.
Highlights
- 3.7 MB stripped binary (LTO + opt-z), zero runtime dependencies
- Five protocol translators — Anthropic Messages stream upgrade, Gemini
:generateContent↔ OpenAI Responses, Gemini:streamGenerateContent↔ OpenAI Responses SSE (new beyond upstream), OpenAI Responses ↔ chat/completions (request + non-streaming reply), Responses SSE → Responses SSE for chat-only upstreams - Hybrid streaming proxy — peeks the first 16 KiB for routing decisions, streams the rest of the body to the upstream chunk-by-chunk via a custom
PrefixedBodyadapter - Hot-reloadable config —
mtime-polled file watcher rebuilds the API key validator and the amp module's compiled fallback handler atomically BILLABLEwarning at the ampcode.com fallback — credit drain is immediately visible inrun.log- AMP-CLI / Vertex AI path support —
/api/provider/*/v1beta{,1}/publishers/google/models/*actionroutes - Structured per-request logging —
amp router: request/amp router: responsepaired entries with route decision, model, provider, status, elapsed_ms
End-to-end validated
| Path | Verdict |
|---|---|
claude-sonnet-4-6 (main agent + librarian) → custom provider |
✅ |
gemini-3-flash-preview (finder) → custom provider via translate |
✅ no credit leak |
gpt-5.4 → DeepSeek via Responses↔chat/completions |
✅ multi-turn reasoning + tool_use |
/api/internal, /api/telemetry (Amp control plane) |
✅ correctly billable |
cargo test: 142 passed.
Downloads
| Platform | Archive | SHA-256 |
|---|---|---|
| Linux x86_64 | amp-proxy-x86_64-linux.tar.gz |
.sha256 |
| macOS x86_64 | amp-proxy-x86_64-macos.tar.gz |
.sha256 |
| Windows x86_64 | amp-proxy-x86_64-windows.zip |
.sha256 |
Each archive contains the binary plus LICENSE, NOTICE.md, README.md, CHANGELOG.md, and config.example.yaml.
Quick start
# Linux / macOS
tar -xzf amp-proxy-x86_64-linux.tar.gz
./amp-proxy init # interactive wizard writes config.yaml
./amp-proxy --config config.yaml
# Then point Amp CLI at it
export AMP_URL=http://127.0.0.1:8317
export AMP_API_KEY=<api-key from your config.yaml>
ampSee README for full configuration, log-reading guide, and architecture overview.
Provenance
amp-proxy-rs's protocol translation algorithms and custom-provider routing decision model are derived from CLIProxyAPI (MIT). See NOTICE.md for full attribution.