Releases
v4.0.1
one-api v4.0.1 — Adaptive Edge LLM Gateway & Distributed Agent Runtime
Latest
Compare
Sorry, something went wrong.
No results found
one-api v4.0.1 — Adaptive Edge LLM Gateway & Distributed Agent Runtime
v4.0.1 — Documentation & Release Polish
README Redesign: Overhauled README.md for GitHub and npmjs.com with remote logo rendering (width="140"), uniform flat-square badges, ASCII architecture diagram, collapsible configuration and endpoint references, and SDK/MCP/A2A quick-start snippets.
Dynamic Runtime Versioning: Wired package.json version dynamically into A2A Agent Card (src/routes/a2a.js), gateway status (src/index.js), OTel gen_ai.* resource attributes (src/engine/flight-recorder.js), and the interactive CLI banner (src/cli/chat.js).
Release Automation: Updated .github/workflows/publish.yml to automatically create GitHub Releases on npm version publish or v* tag push.
v4.0.0 — Major Architecture Evolution
Added
Adaptive Intelligence Router & TTFT Hedging (src/engine/adaptive-router.js): Sub-millisecond lexical/structural complexity scoring (fast, smart, reasoning), online Thompson-Sampling Beta/Normal posterior bandit selection (balanced, fastest, cheapest, reliable), and executeHedged() TTFT-triggered hedged requests with AbortController loser cancellation.
Pure-JS Structured Output Enforcement & Smart Cascade (src/engine/structured.js): Deterministic JSON syntax repair (repairJson), JSON Schema validator (validateJsonSchema), refusal detection (isRefusal), and automatic fast -> smart quality cascade.
Multi-Tenant Virtual Keys & Agent Runaway-Loop Breaker (src/engine/governance.js, src/routes/keys.js): SHA-256 crypto.timingSafeEqual scoped virtual keys (sk-oa-...), GET/POST /v1/keys and DELETE /v1/keys/:id, per-key model allowlists, sliding RPM/TPM limits, hard/soft USD budgets, and FNV-1a runaway agent loop protection (429 agent_runaway_loop).
Native Agent2Agent (A2A) Protocol Gateway (src/routes/a2a.js): GET /.well-known/agent.json discovery and POST /a2a JSON-RPC 2.0 (message/send, message/stream, tasks/get, tasks/cancel).
MCP 2025-11-25 Streamable HTTP & Async Tasks (src/mcp/server.js, src/routes/mcp.js): Protocol negotiation (2024-11-05 fallback), Mcp-Session-Id lifecycle, Origin DNS-rebinding protection (403), and MCP Async Tasks (tasks/get, tasks/result, tasks/cancel, tasks/list).
Model Aliases, Pricing & Prompt-Cache Discounts (src/engine/aliases.js, src/engine/cost.js, src/engine/resilience.js): Added auto (tier: 'adaptive'), 2025/2026 aliases, cached-token pricing discounts, and expanded fallback chains.
Dashboard, CLI & Verification: Updated /dashboard (Bearer auth, Bandit Posteriors, Virtual Key CRUD, A2A/MCP status, Trace Replay diff modal), one-api chat (/auto, /json, /stats), one-api doctor, 9 benchmarks, and 156 passing tests .
Changed & Optimized
Gemini API Key Transport: Moved credentials out of URL ?key= query strings into the x-goog-api-key HTTP header.
Provider Parity & Streaming Resilience: Unified response_format, cached_tokens, tools, stream_options: { include_usage: true }, deferred initSSE() pre-connect fallback, STREAM_TIMEOUT_MS stall watchdogs, and SSE compression() bypass.
Deterministic Trace Replay & OTel gen_ai.* Export: Added PII-redacted requestSnapshot replay (POST /v1/traces/:id/replay) and OpenTelemetry GenAI semantic conventions on GET /v1/traces/export.
Sub-Linear 64-bit SimHash + 4-Band LSH Semantic Cache: Replaced O(N) linear semantic scanning with 64-bit SimHash + four 16-bit LSH buckets (42.60µs p50 / 18,193 ops/sec at N=2,000 — 135.7x faster than linear scan), added O(1) Float64Array metrics buffer, bounded RateLimiter, and /v1/embeddings vector caching.
Fixed
Rolling-window Stream DLP (128-char tail overlap + .flush()), timing-safe SHA-256 auth, cache key isolation (response_format/seed/stop/penalties/actualServedModel), half-open circuit breaker counter resets, dashboard XSS escaping, REQUEST_TIMEOUT_MS upstream abort signals, and Gemini functionCall streaming deltas.
You can’t perform that action at this time.