Repository navigation
🚀 Get started
New to AISIX? Get the gateway running and route your first LLM request in minutes:
- 📖 Documentation — https://docs.api7.ai/ai-gateway/
- ⚡ Gateway quickstart (one container, declarative
resources.yaml) — https://docs.api7.ai/ai-gateway/getting-started/gateway-quickstart
📦 Download
Pull the container image from the GitHub Container Registry:
docker pull ghcr.io/api7/aisix:1.13.0The rolling latest tag and the docker.io/api7/aisix mirror for private/offline deployments are listed on the package page.
AISIX OSS adds Cohere retrieval on more providers, request history compression, and diagnostics for streamed responses.
- Use Cohere Embed and Rerank on Azure AI Foundry with
azure_cohere: trueon the Azure Provider Key. Reranking is also available with Cohere on Amazon Bedrock and with OpenRouter and Vercel. Bedrock Cohere embeddings support Base64 output, and OpenRouter embedding requests forward the input type. #1489 - Compress eligible request history with the
headroominput guardrail and a Headroom 0.45.0 service. Eligible buffered requests can retrieve the original content. #1485 - Diagnose missing or interrupted SSE output with summaries of the upstream and client-facing streams. On the exporter that should receive the frames, set
sse_tailto capture recent frames orsse_debugto temporarily capture matching requests. Both capture modes are bounded. #1491 - Set
token_endpoint_auth_method: client_secret_basicfor remote and OpenAPI-backed MCP servers whose OAuth 2.0 token endpoint requires HTTP Basic for the client credentials grant. The default isclient_secret_post. #1477
Routing and traffic policies
- Match conditional rate limits on model and Provider Key tags and group counters by the actual Provider Key. Usage events record these resource tags. Scope guardrails by the addressed model's tags and use exclusions to exempt selected API keys, models, or model tags. #1482
- The gateway enforces the exhaustion state supplied in budget documents for calendar-quarter periods, conditional budgets, and resource-tag budgets. It can skip an exhausted candidate and use an eligible target. A budget rejection returns
429with the reset time. #1482, #1483, #1486 - Gemini Decision can report no match and use the configured default even when only one named route is eligible. #1481
⚠️ Breaking changes
- API keys scoped to a semantic router now also need grants for the direct targets they should reach, including direct default or failure targets. Add those targets to
allowed_model_idsor the name-basedallowed_modelsgrants you use. Requests return403when the key has access to no named route. Model-group targets apply their own member selection. #1481 - Translated requests now preserve the position of system and developer instructions added mid-conversation. Move instructions to the start if the upstream must receive them in its initial system input. For an OpenAI-compatible Chat Completions upstream that accepts system instructions only at the start, set
mid_conversation_system: as_useron the direct model to send later instructions as user messages. #1488, #1490
Diagnostics
- Gateway-generated errors shield connection and credential details in caller-facing responses. Usage events and operator diagnostics record the failing phase and known cause for MCP, A2A, routing, and streaming failures. #1476, #1480
What's Changed
- fix(openai): recognize reasoning_text in Chat Completions responses by @jarvis9443 in #1472
- docs(schema): clarify least-cost pricing and sliding limits by @jarvis9443 in #1475
- fix(telemetry): preserve upstream bodies on failure rows by @jarvis9443 in #1474
- feat(telemetry): record Provider Key IDs in usage events by @jarvis9443 in #1473
- feat(mcp): support HTTP Basic for OAuth client credentials by @jarvis9443 in #1477
- test(telemetry): make cache hit attribution independent of time by @jarvis9443 in #1478
- fix(telemetry): record gateway API failure diagnostics by @jarvis9443 in #1476
- fix(proxy): protect sensitive details in gateway errors by @jarvis9443 in #1480
- fix(routing): enforce model grants for semantic routing by @jarvis9443 in #1481
- feat: use resource tags in usage and traffic policies by @jarvis9443 in #1482
- feat: enforce calendar-quarter budgets by @jarvis9443 in #1483
- feat: enforce conditional spend budgets by @jarvis9443 in #1486
- feat(guardrails): add Headroom context compression by @jarvis9443 in #1485
- fix: preserve mid-conversation instructions across protocols by @jarvis9443 in #1488
- feat(providers): support Cohere retrieval across cloud providers by @jarvis9443 in #1489
- feat(models): configure mid-conversation system instructions by @jarvis9443 in #1490
- feat(observability): export bounded SSE diagnostics by @jarvis9443 in #1491
- feat(telemetry): honor managed usage event admission by @jarvis9443 in #1492
- build(deps): bump cross-spawn from 7.0.6 to 7.1.2 in /tests/e2e by @dependabot[bot] in #1487
- build(deps): update cross-spawn for MCP conformance by @jarvis9443 in #1493
Full Changelog: v1.12.1...v1.13.0