Release Notes
These release notes cover the AISIX gateway runtime shared by AISIX OSS, AISIX Enterprise, and AISIX Cloud. They also cover the control plane and dashboard shared by AISIX Enterprise and AISIX Cloud, together with AISIX Enterprise deployment artifacts.
When upgrading across multiple versions, review the Breaking Changes and Upgrade Considerations for each intervening release in chronological order. For the control-plane-first sequence, follow Upgrade AISIX Enterprise. For AISIX OSS or a connected gateway rollout, follow Upgrade a Gateway on Kubernetes.
The shared gateway image is published at docker.io/api7/aisix. AISIX Enterprise artifacts include control-plane images under docker.io/api7/aisix-cp-*, the aisix-cp Helm chart, and the offline installation package.
For versioned changes in the AISIX Cloud Admin API used by AISIX Enterprise and AISIX Cloud, see the AISIX Enterprise / Cloud Admin API Changelog. The changelog covers releases from 1.9.0, the oldest supported version, onward. It does not cover AISIX OSS resource configuration, the AISIX gateway Admin API, or its proxy APIs.
1.11.0
Release date: November 20, 2026
This release adds fine-grained authorization. Roles are now sets of rules scoped to environments and objects, a member can hold several roles, teams can hold roles, and new members default to the new Restricted Member role. Model calls the gateway makes for semantic routing, the semantic cache and semantic guardrails are now billed. They are reported separately from the caller's own usage, and a semantic router's JEV classifier now references a model. Sale prices and off-peak discounts work on direct and embedding models as well as model groups. Cost analysis can show platform cost instead of billed amounts. An organization can keep estimated usage out of budgets and token rate limits. API keys can be granted every model, including models added later. Azure OpenAI provider keys serve images, audio and embeddings natively and take an api_version. The dashboard marks gateways whose configuration has stopped syncing. The support floor rises to 1.9.0, and from this release a control plane that has been replaced by a newer one during an upgrade answers with an upgrade message instead of working against the newer database.
For the complete AISIX Cloud Admin API endpoint and schema comparison, see changes from 1.10.0 to 1.11.0.
Breaking Changes
The following changes can require updates to model-group pricing, exporter consumers, and semantic routers.
Off-Peak Discounts Need a Sale Price on the Same Model
An off-peak discount now applies only together with a sale price on the same model. A model group that has only off_peak, without price, is no longer discounted after upgrading. Its requests are billed in full, at the serving model's own sale price if it has one, or otherwise at the platform price, so costs and budget use rise. The group still reads back with its off_peak. Any write to it is refused with 400 until the write also sets price or removes off_peak, including a write that only changes its name or targets. The dashboard flags these groups with Off-peak not applied: no sale price. To keep the discount, give the group a sale price.
Gateway Embedding Audit Fields Are Replaced by Internal-Call Events
Usage events from a 1.11.0 gateway no longer carry gateway_embedding_calls or gateway_embedding_calls_dropped, and OTLP spans no longer carry the aisix.gateway_embedding_calls* attributes. Each internal model call is its own usage event instead (see New Features). Update exporter queries (SLS, object storage, Datadog, OTLP) that read those fields. The control plane still reads them from older gateways, and the dashboard still shows the old panel for those rows.
A Semantic Router's Inline JEV Classifier Must Reference a Model
A semantic router's JEV classifier now references a direct model (semantic.classifier.model_id) whose provider key's provider is typesafe. New routers must use model_id. A router configured with only the inline provider_key_id and model keeps working, but its classifier calls are not billed. Any write that leaves it inline-only (a rename, or a change to routes or thresholds) is refused with 400. The dashboard shows a notice on such routers. A model a classifier references cannot be deleted (409 MODEL_IN_USE) or moved to a key that is not typesafe.
Upgrade Considerations
The following changes take effect when you upgrade, or matter while gateways and the control plane run different versions.
AISIX Enterprise: The Support Floor Is 1.9.0
The oldest supported version is now 1.9.0, for gateways and for the control-plane database you upgrade from.
- Gateways older than 1.9.0 are no longer supported by this control plane. Bring them to 1.9.0 or later before upgrading.
- The control plane keeps no behavior for a gateway older than 1.9.0 except marking it Unsupported version in the Data planes view. Saves no longer return a
below_floorwarning (CompatibilityWarning.codeis now onlyfield_ignored), such gateways are left out of every compatibility count, and nothing is refused because of them. For example, a tag budget can now be created while such a gateway is registered. cp-apirefuses to start on a database last run by a control plane older than 1.9.0, before it migrates or writes anything. The offline installer'srun.shrefuses the same upgrade before any container starts when.envpins a version older than 1.9.0. Upgrade to a release from 1.9.0 to 1.10.x first, let its migrations finish, then upgrade to 1.11.0. To proceed anyway, take a database backup and setAISIX_ALLOW_UNSUPPORTED_UPGRADE=1(forcp-api, alsodatabase.allow_unsupported_upgradein its config file), for exampleAISIX_ALLOW_UNSUPPORTED_UPGRADE=1 ./run.sh.- The per-request budget check endpoints are removed:
GET /dp/budget_checkondp-managerand the undocumentedGET /api/internal/budget_check, which now returns404. Gateways from 1.8.0 on decide budgets themselves and do not call them. - On the first start of 1.11.0,
cp-apiruns two one-time passes, because 1.11.0 gateways no longer read the old field spellings (secret,display_name) or default a missing semantic guardrail threshold. Each runs once and does not run again.- The credential pass rewrites stored provider keys, MCP servers and A2A agents. It logs a WARN starting with
api7/aisix#1375:only for a row whose credential cannot be decrypted and whose stored gateway document a current gateway would reject. Rows a 1.9.0 or 1.10 control plane already wrote in the current spelling are not reported. - The semantic-guardrail pass fills in thresholds. It logs a WARN starting with
api7/aisix#1409:for every semantic guardrail it cannot repair. - Each WARN carries the row's kind and id. Find them by searching the
cp-apistartup log forapi7/aisix#1375:andapi7/aisix#1409:. A 1.11.0 gateway rejects such a row whole, and what depends on it goes with it (models on that provider key, that MCP server's tools, attachments of that guardrail). It also shows inaisix_config_rejected_resources,GET /environments/{env_id}/rejected_resourcesand the dashboard's rejected-resources banner. A gateway rejects a credential-pass row whole until the resource is deleted and re-created. Recover a semantic-guardrail row by saving it again with its thresholds.
- The credential pass rewrites stored provider keys, MCP servers and A2A agents. It logs a WARN starting with
AISIX Enterprise: Control-Plane Upgrades Are Fenced from 1.11.0 On
From 1.11.0, a cp-api that finds the database migrated by a newer control plane stops serving:
- Every
/api/*request returns503 CP_UPGRADINGwithRetry-After: 5, without running. SCIM (/scim/v2/*) returns503withRetry-Afterin SCIM's error format. The request can be resent unchanged. During a multi-replica rolling upgrade, a request that reaches an older replica gets this answer for the whole rollout, so Admin API and SCIM clients should retry afterRetry-After. - The replaced
cp-apistays ready:/readyzand/healthzboth return200, so a front load balancer keeps routing to it and callers get the upgrade answer rather than no answer.dp-manageralso stays ready. - The dashboard shows The control plane is being upgraded. Retrying automatically…, also on a full page load, and retries automatically for up to 10 minutes. After that it shows the upgrade message until the page is reloaded.
cp-apianddp-managerrefuse to start on a database recorded by a newer control plane, and a running one exits if the recorded version is rolled back below its own. There is no override. Roll back a control plane by restoring the database backup taken before the upgrade.cp-apianddp-managermust run the same version. Upgrading onlycp-apimakes the olderdp-managerrefuse to start at its next restart.
This protects upgrades from 1.11.0 to later releases. A 1.10 control plane does not have it.
AISIX Enterprise: Rolling Upgrade from 1.10 to 1.11
1.10 does not have the upgrade fence above, and nothing else fences it. During a rolling upgrade from 1.10, once the 1.11 migration has run, a cp-api replica still on 1.10 answers 500 on organization routes, and writes made through it in that window, such as role changes, invitations and SCIM or SSO provisioning, may be lost. Do not make changes during the upgrade. A stop-then-start upgrade is not affected.
Members Hold Several Roles, and Roles Are Rules
- A member now holds a list of
roles(each with asource:manual,ssoorscim), and can hold none. The Admin API member object's singleroleis replaced byroles, plusteam_rolesfor the roles it gets through teams. Add and remove a member's roles withPOST /members/{user_id}/rolesandDELETE /members/{user_id}/roles/{role_name}.PATCH /members/{user_id}now edits onlytags. ItsoperationIdis renamedupdateMemberRole→updateMemberTags, and its schemasUpdateMemberTagsRequest/UpdateMemberTagsResponse, so clients generated from the Admin API spec get new method and type names. The route and payloads do not change. - Invitations take
roles(a list) instead ofrole. Withoutroles, the invitee getsrestricted_member. - A role's
permissionsis replaced byrules. Each rule lists resource types, actions (read,create,update,delete), environments (all, ids or environment tags), and an optional object selector (ids, tags, or for API keys and usage,assigned_to: self | my_teams | led_teams). Existing custom roles are converted with the same effect:writebecomescreate+update+deletein all environments. - Environment role bindings (
/members/{member_id}/role_bindings) are removed. Each existing binding becomes a generated role named<role>-<environment>, assigned to the member who held the binding. It is a snapshot: later edits to the original role do not change it. - The directory-group-to-role mapping for SCIM is removed. Assign roles to the teams that directory sync creates instead.
See API Changes for each endpoint.
Access Changes from the Role Migration
The migration keeps each member's effective access, with these deliberate exceptions:
- A generated role from an environment binding does not include budgets. A member who could read an environment's budget only through a binding loses the environment budget view (
GET /environments/{env_id}/budget). - An API key's budget status follows the key's visibility (
api_keysread) and no longer needsbudgetsread. A key that does not exist or cannot be read now returns404instead of an empty budget. - Organization-wide usage (
/usage_analysis) is the union of each environment's usage scope. A member with usage read in only one environment now sees that environment's usage there, including members whose roles came from environment bindings. - A custom role's
memberswrite no longer includes set-password links. Grantmember_passwordsseparately. - A member managed by both SSO and SCIM now holds the roles both assign. Before, SSO won.
/members/meis open to every member. It used to needmembersread.PATCH /members/{user_id}now needsmembersupdate instead ofmembersread.- OIDC providers, claim mappings, MCP policies, team MCP entitlements, SSO, role assignments and set-password links have their own permissions. Existing roles keep the access they had to them.
- A custom role named
restricted_memberis renamedrestricted_member-custom. - New organizations, new SSO connections and invitations default to Restricted Member, which can read only API keys and usage assigned to the member, the member's teams, or the teams the member leads. Stored SCIM and SSO default roles do not change.
- AISIX Enterprise: a member created directly (
POST /members, Create user) also defaults to Restricted Member. It used to be fixed tomember. Automation that relies on the old default must send"roles": ["member"]."roles": []creates a member with no role. - Lists of environments, models, API keys, provider keys, MCP servers, A2A agents and teams return only what the caller can read, and an object outside the caller's scope returns
404. A role that reads a whole type sees no change. Saving a reference to an object the caller cannot read is refused as if the object did not exist (400). Usage and Logs are filtered by the API keys a usage rule selects, and the per-target-model usage view needs unscoped usage read in every environment it covers (403 USAGE_TARGET_VIEW_FORBIDDEN). - The Usage page needs environment read. A member with usage read but no environment read, such as a Restricted Member, uses Cost Analysis instead.
- AISIX Enterprise: an unused set-password link whose target has since become an owner no longer works. An owner must issue a new one.
Gateway Helm Chart: No Default resources; Size workers
The aisix chart no longer sets default resources. The former requests: {cpu: 500m, memory: 256Mi} and limits: {memory: 1Gi} are removed, so a release that relied on them renders a pod with no resources after helm upgrade. --reuse-values keeps whatever the old release had. config.proxy.workers has no default, so the gateway uses every CPU the process sees, which is the whole node when there is no CPU limit.
Set resources and config.proxy.workers for your deployment before upgrading. Set workers to the CPUs you allocate to the pod. Gateway memory grows with workers: each token-estimate pool thread (one per worker) holds its own tokenizer for each encoding it has used, about 17 MiB for cl100k, 27 MiB for o200k and 39 MiB for o200k_harmony.
With autoscaling on, a CPU or memory utilization target now fails the render unless the matching resources.requests is set, for an HPA and for a KEDA cpu or memory trigger with metricType: Utilization (KEDA's default). Before, such an autoscaler was deployed and never scaled. targetCPUUtilizationPercentage defaults to 70, so autoscaling.enabled=true alone now needs resources.requests.cpu.
Model-Group Billing and provider_key Budgets
- A request on
/v1/systemoneor/v1/decisions, or one billed by audio duration, addressed to a model group whose price has no rate for it, no longer gets the group's discount. It is billed at the serving model's sale price if that has the rate, otherwise at the platform price. - A request to a model group with no sale price is billed at the serving model's sale price and that model's own discount, when the serving model has one. Before, it was billed at the platform price times the group's discount.
- A
provider_keybudget now counts only the serving model's platform cost. A request whose serving model has no platform price counts 0. Since 1.9.0, a model group's sale price was counted instead when its serving target was unpriced. Spend already accumulated in the current period is not recomputed. The new rule applies to usage recorded after the upgrade and whenever the budget is recomputed (a new budget, or a change of scope, subject or period), so the old amount can remain until the period ends, at most one month later.
Internal Model Calls Are Billed, from 1.11.0 Gateways
Once gateways run 1.11.0, embedding and classifier calls made by semantic routers, the semantic cache and semantic guardrails are billed at the called model's sale price or platform price. They count toward api_key, environment and other budgets, and toward the called model's provider key budget. Spend rises for deployments that use these features. These calls are not counted as requests and do not consume the caller's rate limits. aisix_usage_events_emitted_total and its drop counter count them, so those counters rise. A semantic-cache hit is still free, but the lookup embedding behind it is billed. Gateways older than 1.11.0 do not report these calls, so nothing changes for them.
A semantic-routed request is now billed as if the caller had called the route's target directly: the target's sale price (a model group's price applies, with its discount), then the serving model's sale price, then the platform price. This needs a 1.11.0 gateway. Older gateways bill as before.
Streamed OpenAI-Protocol Chat Always Asks the Upstream for Usage
For every streamed chat request to an OpenAI-protocol upstream (OpenAI, Azure OpenAI, and the OpenAI-compatible endpoints of Bedrock and Vertex), the gateway now always sets stream_options.include_usage: true. It merges that into the caller's object, overriding an explicit false, and replaces a non-object value. Before, it did this only when the caller sent no stream_options. The caller still sees usage only if it asked for it, so responses do not change. Usage records for callers that sent include_usage: false now carry the upstream's counts instead of local estimates. This applies whether estimated usage is excluded.
Older Gateways and New Settings
- An API key with All models (
allow_all_models) can call no model on a gateway older than 1.11.0. The older gateway ignores the field and reads an empty model list. The dashboard and the Admin API return afield_ignoredwarning on save. - Keep estimated requests out of budgets and token rate limits keeps estimates out of budgets on every gateway version, because budgets are counted in the control plane. Gateways older than 1.11.0 still count estimates toward token rate limits. Saving the setting while it is on now warns how many registered gateways in the organization are older than 1.11.0, and which versions they run. The save still succeeds.
- While that setting is on, each environment carries a new
usage_accountingdocument. A gateway older than 1.11.0 counts it inaisix_config_unknown_kind_resources. Reload status is not affected, and the dashboard does not report it. - An Azure OpenAI provider key's
api_versionis ignored by older gateways. Each operation keeps its default version there. - The Config out of sync status needs 1.11.0 gateways. Older gateways never show it.
Deleting an Object Deletes Its Budgets and Classic Rate-Limit Policies
Deleting an API key, environment, provider key, team or member now deletes the budgets whose subject it is. Deleting an API key, team, member or model deletes the classic rate-limit policies whose scope_ref it is. Deleting a model used by a classic rate-limit policy now succeeds and deletes the policy. Before, it returned 409 MODEL_IN_USE. Conditions inside conditional policies are kept. The delete dialogs list what will be deleted with the object. Budgets and policies already orphaned before the upgrade are not cleaned up.
An API key that an environment's anonymous MCP access runs as can no longer be deleted (409 KEY_IN_USE). Point anonymous access at another key, or set mcp_anonymous to null (in the dashboard, turn it off). enabled: false keeps the binding.
Provider Key Request Overrides Are Masked on Read
GET and PATCH responses for a provider key return every value in request.default_headers and request.default_body_fields as ***. The names are kept. Writing *** back keeps the stored value. Gateways still receive the real values.
Passthrough Routes
- Inject routes can send a key only to its own origin without update on it. When an inject passthrough route is created, or its key,
credential_mode,target_url,hostsorpreserve_hostchanges, the target must be the provider key'sapi_baseorigin (scheme, host and port), unless the caller hasprovider_keysupdate on that key. Otherwise the save is refused with400. Apreserve_hostroute is checked ashttps://<host>:443for each entry inhosts. Stored routes keep working, and edits that do not touch these fields save as before. Built-in owners and admins are not affected. identity_headerno longer accepts headers that carry a credential: besidesauthorization,proxy-authorization,cookie,set-cookie,x-api-keyandx-aisix-api-key, it now refusesapi-key,x-goog-api-key,x-amz-security-token,x-amz-dateandx-amz-content-sha256, and the route's ownauth_header_name, with400. Its value is recorded as the usage record'sclient_identityand exported, so a credential named there was being stored. A stored route that already names one of these keeps loading and recording, but any update to it is refused unless the same update changes or clearsidentity_header(null).auth_header_nameis unaffected.
SSO: SAML Responses Are Validated More Strictly
The SAML library is updated. Signed assertions that lack a required element (Subject, Conditions, SubjectConfirmationData), or carry a NameID in another namespace, are refused. Authentication statement, timestamp and signature checks are stricter. When a response has several AudienceRestriction elements, each must include this service provider's entity ID. Before, one matching restriction was enough. A single restriction that lists several audiences still works.
SCIM Tokens
- A SCIM token keeps working after the owner who issued it leaves the organization or loses the owner role. Before, directory sync stopped with
403 NOT_A_MEMBER. - Audit events written by SCIM calls now name the SCIM token as the actor, not the issuing owner. These events no longer match a filter by member, and the actor column shows SCIM token <name>. Older events are unchanged.
- The admin token list and the SCIM settings card mark active SCIM tokens whose issuer is no longer an owner, and suggest rotating them.
Notification Templates and Custom Guardrail Scripts
- Webhook body templates can no longer use
define.range,templateandblockwere already refused. Content that functions produce in one render is limited to 64 KiB, estimated before it is built. Other functions, including theprintfexample in the 1.10.0 docs, still work. A stored template that breaks these rules fails on its next delivery, with the reason in the delivery record. Its channel can still be disabled or deleted. At start, the control plane logs a WARN listing up to 50 stored templates that will fail. - A custom guardrail script is now syntax-checked in a separate process with stack, memory and CPU limits. Scripts that nest too deeply or are too costly to parse are refused with
400. When the check is busy, saving returns503 SCRIPT_CHECK_BUSYwithRetry-After. Retry the save.
AISIX Enterprise: Control-Plane Memory and Request Bounds
- When
GOMEMLIMITis not set,cp-apianddp-managerset the Go soft memory limit to 90% of the container limit.cp-apialso reserves 176 MiB of that for script-check processes, without going below half the limit. With the chart's 512Mi default,cp-api's heap soft limit is 285 MiB. Ifcp-api's resident memory is already close to its limit, raise the limit by about 200 MiB. cp-apirequest headers are limited to 64 KiB (431above that). Idle keep-alive connections close after 620 seconds. A request body that is not sent within 30 seconds gets408, and the connection is closed. Routes outside the Admin API, such as sign-in and webhooks, now share the Admin API's 1 MiB body limit. SCIM bodies are limited to 8 MiB and SAML callback forms to 5 MiB. Data import keeps its 1 GiB limit.dp-managercloses a connection that does not finish its TLS handshake and send its first request within 10 seconds of being accepted. Gateway certificates can only read and watch throughdp-manager, which is all that supported gateways do.
Gateway Behavior Changes
- MCP: A single upstream MCP message (a tool result or a
tools/listpage) over 64 MiB now fails promptly with the usual-32603error anderror_class="transport". Before, there was no limit. Aninitializethat asks for protocol version2026-07-28is answered with2025-11-25. A 429 that carries a JSON-RPC error is now recorded asupstream_statusinstead ofupstream_in_band. The caller's answer does not change. - MCP OAuth: For
oauth2_authorization_codeMCP servers, the gateway no longer advertises or grants the upstream's scopes as its own. Protected-resource metadata lists the configured scopes withoutopenidandoffline_access, and omitsscopes_supportedwhen none are left. Both authorization-server documents listscopes_supported: []. Token responses no longer carryscope, which by RFC 6749 means the requested scope was granted. The upstream is still asked for the full configured scope set. - Metrics: The root-level MCP OAuth discovery routes (
/.well-known/oauth-protected-resource,/.well-known/oauth-protected-resource/mcp[/{server}],/.well-known/oauth-authorization-server/mcp/{server}) are now labelledinbound_protocol="mcp"instead ofopenai. Update dashboards and alerts that filtered them by the old value. - Rate limits: An answer on
/v1/messagesthat the output guardrail refuses now counts toward TPM/TPD, as it already did on chat and/v1/responses. Non-streamed/v1/messagesand buffered/v1/responsesnow count tokens before the output guardrail runs, so a caller that hangs up during the check is still charged. - Azure OpenAI: On every Azure route, an override
api_base(a host other than<resource>.openai.azure.com) that ends in/openaior/openai/v1has that suffix dropped before the route is added. An upper-case scheme such asHTTPS://now works instead of returning400. Realtime and files/batches/fine-tuning resolveapi_basethe way chat does. - etcd connection: With
etcd.request_timeout_msunset, the watch create is bounded byetcd.dial_timeout_ms× endpoints × 4 (at least 30 seconds), and each reconnect first runs a count-only probe read. New log lines: INFOetcd watch established after a failed cycle, and every 10 seconds a WARNetcd call still pending …while a call is outstanding. An etcd answer that is not a credential refusal (for exampleOutOfRange,NotFound, or an unrecognizedUnimplemented) is now retried with backoff instead of ending the gateway at boot. The gateway stays up with its proxy listener closed until it can load. A permission or credential refusal behaves as before. - Responses (
/v1/responses) encrypted reasoning: The gateway now tagsencrypted_contenton a direct model's responses too, not only a model group's (aisix_enc_v1:prefix, in the response body and in a stream'sresponse.output_item.doneevents). Clients echo it back unchanged, as they already do for groups. A direct model's tagged item continued outside the gateway, through a passthrough route or sent to the provider directly, now carries the tag and is rejected there, because only the gateway removes it. The tag now records the provider key that served the response. The gateway forwards a tagged item to the model that issued it, whatever provider key that model is on now, to models on the recorded provider key, and to models on the issuing model's current key. So after a model is moved to a replacement provider key, the gateway keeps forwarding the ciphertext to it. A model group tries the issuing model first, and a deleted issuing model's context is still forwarded to models on the recorded key. A model that cannot read an item gets it without its ciphertext, or not at all if it has no readable summary.previous_response_idhandling does not change. During a rolling upgrade, a 1.10 gateway that receives a new tag sends a model group's item without its ciphertext, so that turn loses its reasoning reuse without an error. - Streaming usage: A streamed
/v1/chat/completionsrequest withstream_options.include_usage: truenow carries the gateway's estimate in its final usage chunk (before[DONE]) when the upstream's stream reports no usage, as some OpenAI-compatible servers and relays do. Before, it got no usage chunk although the usage record carried the estimate. Counters the upstream reports as non-zero are kept, and the numbers match the ones the usage record bills. A stream that did not ask for usage still gets none. - Token estimation:
proxy.workersalso sets the size of the token-estimate pool. A gateway that setsworkersbelow its CPU count gets that many estimate threads instead of one per CPU. Memory per thread is given under the Helm chart change above.
New Features
Access Control: Rule-Based Roles, Multiple Roles, Team Roles
Roles are rules over resource types and actions, scoped to all environments, chosen environments or environments with given tags. A rule can also narrow to chosen objects, objects with given tags, or for API keys and usage, objects assigned to the member, the member's teams or the teams the member leads. Members and teams can hold several roles. A team's members get all the team's roles. Environments, models, provider keys, MCP servers and A2A agents gain access-control tags, which the gateway does not read and which do not affect cost attribution. The new built-in Restricted Member role reads only the API keys and usage assigned to the member and the member's teams. The dashboard gains a rule editor for roles, a Roles section on each member with its sources, team roles, an Effective permissions view, and a My permissions page. Pages, buttons and options the member cannot use are hidden or disabled with the missing permission named. Objects the member cannot open appear by name with a lock. The new endpoints include GET /members/me/permissions, GET /members/{member_id}/permissions, GET /roles/{role_name}/holders and GET/POST/DELETE /teams/{team_id}/roles. In AISIX Enterprise, Create user and POST /members take roles like invitations do, with the same rules on who can grant which role.
Usage: Internal Model Calls Reported Separately
Each internal model call made for a request is its own usage event, a child of the request, with internal_call_purpose (semantic_route_embedding, semantic_route_decision, semantic_cache_embedding, guardrail_embedding). It carries the caller's identity and the called model, and on OTLP it is a CLIENT span in the request's trace. The request's events gain route_target_model_id, the model or group a semantic router chose. In the control plane, usage_summary and usage_analysis gain internal_call_cost, internal_call_platform_cost, internal-call token totals and internal_call_no_platform_cost_count. The breakdown gains rows by internal_call_purpose. usage_events and its export include child events only with include_internal_calls=true. In Logs, expanding a request lists its internal calls. Overview, Usage and Cost Analysis show the internal-call share.
Pricing: Sale Prices on Direct and Embedding Models
direct, embedding and routing models accept a sale price and off_peak. Ensembles, semantic routers and wildcard aliases do not. A request is billed at the addressed model's sale price, then the serving model's sale price, then the platform price. Sale prices gain decisions rates, duration_cents_per_1m_seconds and cache_write_1h_per_1m. Breakdown rows gain price_source (requested_model, dispatched_model, platform_price), and GET /model_pricing?view=in_use gains sale_priced_models[]. The pricing page's Model groups section becomes Sale prices, covering every model type.
Cost Analysis: Platform Cost View
Cost Analysis gains a Billed / Platform cost switch (cost_view=billed|platform on usage_analysis and its breakdown). Every figure, sort, breakdown and CSV follows it, and calls with no platform cost are counted rather than filled in. Overview adds a Platform cost today card, and Usage a Platform cost (last 30d) card. usage_summary rows gain platform_cost. Platform cost for usage recorded before the upgrade is filled in by a background job, newest first. Until it finishes, the platform view says the data is still being filled in.
Traffic Controls and Budgets: Exclude Estimated Usage
A new organization setting, Keep estimated requests out of budgets and token rate limits on the Estimated usage card (exclude_estimated_usage, off by default), keeps requests whose usage the gateway estimated out of every budget and out of token rate limits (tpm, tpd, a policy's max_tokens). Request-count limits and concurrency still count them, and billing does not change. A stream the caller closes before the usage frame arrives is estimated and excluded too, so use it only where every caller is trusted. Switching applies to later usage. A budget that is recomputed uses the current setting for its whole period. The budgets page shows Estimated requests excluded while the setting is on.
API Keys: All Models
An API key can grant All models (including ones added later) (allow_all_models: true), covering every model type in the environment. allowed_models must then be empty. The model picker on API key forms is now searchable, and list rows show an All models badge.
Providers: Azure OpenAI Images, Audio and Embeddings
Azure OpenAI provider keys now serve /v1/images/generations, /v1/images/edits, /v1/embeddings and the three audio routes on Azure's own routes, with the api-key header or an Entra ID token. The new optional api_version on the provider key takes a dated version, or v1 (preview and latest are aliases), which selects Azure's /openai/v1/... routes. When it is unset, each operation keeps a default version. Realtime and files/batches/fine-tuning read it too, and Entra ID client credentials now work on those routes. The provider key form shows an API version field for Azure keys.
Observability: Config Out of Sync
A gateway that is reporting on time, but has not applied configuration saved at least five minutes earlier, now shows Config out of sync on the data-plane page, in the environment list and in the overview count. Its tooltip gives the time the gateway fell behind. In the Admin API, GET /environments/{env_id}/dp_nodes reports status: out_of_sync with config_out_of_sync_since. store_revision is now computed per environment, so writes in other environments no longer make a synced gateway look behind. Gateways report applied revisions per watched prefix (applied_revisions) in their heartbeat.
AISIX Enterprise: Control-Plane Chart Disruption Budgets and Spreading
The aisix-cp chart adds optional podDisruptionBudget and topologySpreadConstraints for api and dpm. Both are off by default, with the same shape as the gateway chart's.
Improvements
- Local token estimation for usage-free responses above 16 KiB now runs on a dedicated thread pool instead of the request's worker, so a large estimate no longer delays other requests on the same worker. Counts do not change.
- Dashboard stat cards show values of one million and up compactly with three significant figures (for example
204M,$1.94M), with the full value on hover. The estimate badge reads incl. estimated and gives the number of estimated calls, and the token card shows that count too. - The passthrough route form checks path prefixes before saving.
- The KPI cards on Overview and Usage show Could not load instead of
0when the usage query fails. - AISIX Enterprise:
dp-managerlogsgateway watch openedandgateway watch closedfor each gateway watch, with the gateway, environment, key range, revisions, duration and areason(client_cancel,server_cancel,compacted,stream_closed,stream_error,server_shutdown).
Fixes
- A gateway could stop applying configuration until restarted after a lossy period on the path to etcd, when the TCP connect of a reconnect succeeded but its TLS handshake never completed. The gateway now drops the stuck connection and dials a new one.
- A gateway watch created at the moment
dp-manager's store could not be read could stay open and deliver nothing for the life of the process.dp-managernow confirms its watch delivery works before serving gateways. dp-managerno longer exits when the rollback of a store compaction fails during a database stall, and its liveness check no longer fails while the database is only slow.- Removing an environment from a provider key that a passthrough route in that environment uses is now refused (
409 PROVIDER_KEY_ENV_IN_USE). Before, every request on the route then failed with400. - An Azure OpenAI model whose deployment name contains a dot (for example
gpt-4.1) was refused with400on every endpoint without calling Azure. It now works. This needs a 1.11.0 gateway: 1.9 and 1.10 gateways still refuse a dot. A name made only of dots is still refused. An Azureapi_basegiven without anhttp(s)://scheme, or with another scheme, is still refused, and the error now says why. - A Vertex credential's
projectandregionand an Azure OpenAI Entra ID credential'stenant_idandclient_idthat contain/,\,?,#,%, a space or an ASCII control character, contain.., or are made only of dots are now refused when the provider key is saved (400 INVALID_REQUEST, naming the field). Such a value rewrote or redirected the upstream URL, so every request on the key failed. The gateway refuses the same values, and also a Vertex model's upstream model id of that shape. GUIDs,contoso.onmicrosoft.com,example.com:my-proj,us-central1andglobalare accepted as before. - Saving a
directorembeddingmodel whosemodel_namethe gateway refuses on every request is now refused (400 INVALID_REQUEST, namingmodel_name): an Azure OpenAI deployment name outside[A-Za-z0-9._-]or made only of dots, a Vertex AI model id containing/,\,?,#,%, a space, a control character or.., or made only of dots (Vertex OpenAI-compatible partner models ondirectmodels, such asmeta/llama-3.3-70b-instruct-maas, are exempt), and an Amazon Bedrock model id with characters other than letters, digits,.,_,:,/and-. Before, such a model saved and every request to it failed at the gateway. On a wildcard alias, amodel_nametemplate is refused only when its fixed text makes every resolution invalid (for examplegpt *on Azure); the gateway still checks each resolved name. Existing models keep loading and serving. An existing model is re-checked only when a write changes itsmodel_nameorprovider_key_id, or whether it is a wildcard alias. - An Admin API or SCIM request whose admin token, SCIM token, membership, organization, environment tags or custom-role rules the control plane cannot read, for example during a database stall, now gets
503 SERVICE_UNAVAILABLE("please retry"; noRetry-After; the request did not run). On SCIM the body is the SCIM error resource. Before, it got401 INVALID_TOKEN,403(FORBIDDENorNOT_A_MEMBER) or500, and a member with a custom role could get a list silently narrowed as if the role allowed nothing. A client that has disconnected gets499 CLIENT_CLOSED. Invalid, revoked or expired tokens still get401, and requests the rules deny still get403. - SCIM endpoints (
/scim/v2/*) now answer authentication, request-size, timeout and unknown-path failures in the SCIM error resource (application/scim+json,urn:ietf:params:scim:api:messages:2.0:Error), with the former message indetail, so identity providers can read them. Before, these answers used the dashboard's{"error": {"code", "message"}}envelope. Status codes do not change, except that a method a SCIM path does not support now answers404instead of an empty405. - The
latesttag of the gateway and control-plane images now moves only for the highest stable release. A patch on an older release line no longer moveslatestback to it. - Dashboard error messages show field names and literal characters as code instead of with raw backticks.
- A Responses item a model group served, sent to a direct model on an unrelated provider key, is now sent without its ciphertext instead of failing with
400 invalid_encrypted_content. - Datadog, SLS,
aisix exportand the gateway's usage reports carryf32values such as guardrail thresholds andcache_similarityexactly (0.9, not0.8999999761581421). - An
api_baseon atypesafeprovider key ending in/v1or/systemoneno longer doubles the path on semantic router classifier calls. - The Single sign-on required page now always offers Sign out, and offers Use another organization only when there is another organization to go to. A member who could not use the identity provider had no way out of it.
- The Usage page's Top models table labels its first column Model instead of Key.
API Changes
The following changes break existing AISIX Cloud Admin API callers.
| Method and path | What breaks | What to change |
|---|---|---|
Every /api/* request, and SCIM | From 1.11.0, while a newer control plane is taking over during an upgrade, any request can return 503 CP_UPGRADING with Retry-After (SCIM: 503 in SCIM's error format). The request did not run. | Retry after Retry-After with the same request. |
GET /environments/{env_id}/dp_nodes | A node's status can now be out_of_sync (gateway reporting on time but behind on configuration), with config_out_of_sync_since. | Accept the new value in clients that switch on status. |
GET /members, GET /members/me, POST /members/lookup, POST /members, PATCH /members/{user_id} | The member object no longer has role. It has roles ([{role, source}], possibly empty) and team_roles. | Read roles[].role, and team_roles for roles that come through teams. |
PATCH /members/{user_id} | role is refused (400); the body takes only tags, which is now required. The call needs members update instead of members read. | Change roles with POST /members/{user_id}/roles {role} and DELETE /members/{user_id}/roles/{role_name}. |
POST /members (AISIX Enterprise) | Without roles, the member gets restricted_member instead of member. | Send "roles": ["member"] to keep the old result. |
GET, PUT /members/{member_id}/role_bindings | Removed. Existing bindings became generated roles. | Assign roles that carry environment-scoped rules. |
POST /invitations | role is refused (400). | Send roles (a list). Omitted, the invitee gets restricted_member; an empty list invites with no role. |
GET /invitations, POST /invitations, POST /invitations/{invitation_id}/resend | The invitation object has roles instead of role. | Read roles. |
GET /roles, POST /roles, PATCH /roles/{role_name} | permissions is replaced by rules in requests and responses; POST /roles requires rules. | Write roles as rules (resources, actions, environments, optional selector). |
POST /environments/{env_id}/models, PATCH /environments/{env_id}/models/{model_id} (semantic) | A classifier with only the inline provider_key_id and model is refused (400), on create and on any write that leaves it inline-only. semantic.classifier.provider_key_id in responses is no longer guaranteed. | Set semantic.classifier.model_id to a direct model on a typesafe provider key. |
POST /environments/{env_id}/models, PATCH /environments/{env_id}/models/{model_id} | A model left with off_peak and no price is refused (400), including any PATCH to a stored model group in that state. | Set price with off_peak, or remove off_peak. |
DELETE /environments/{env_id}/models/{model_id} | A model used by a classic rate-limit policy is now deleted together with that policy, instead of 409 MODEL_IN_USE. | Delete or repoint the policy first if it must be kept. |
DELETE of an API key, environment, provider key, team or member | Budgets whose subject is the deleted object, and (for API keys, teams and members) classic rate-limit policies on it, are deleted with it. | Recreate a budget or policy on another subject first if it must be kept. |
DELETE /environments/{env_id}/api_keys/{api_key_id} | Returns 409 KEY_IN_USE while an environment's anonymous MCP access runs as the key. It used to succeed. | Point mcp_anonymous at another key, or set it to null, first. enabled: false is not enough. |
PATCH /provider_keys/{provider_key_id} (allowed_environments) | Removing an environment where a passthrough route uses the key returns 409 PROVIDER_KEY_ENV_IN_USE. | Change or delete the route first. |
GET /provider_keys/{provider_key_id}, PATCH /provider_keys/{provider_key_id} | Values in request.default_headers and request.default_body_fields are returned as ***. *** on create, or on a name with no stored value, is refused (400). | Do not read these values back. Send *** or omit an entry to keep it, and send a new value to replace it. |
POST /environments/{env_id}/passthrough_routes, PATCH /environments/{env_id}/passthrough_routes/{passthrough_route_id} | An inject route whose target is not the provider key's api_base origin (scheme, host, port) is refused (400) unless the caller has provider_keys update on that key. Applies on create and when the key, credential_mode, target_url, hosts or preserve_host changes. | Use a caller that can update the key, or target the key's own origin. |
POST /provider_keys, PATCH /provider_keys/{provider_key_id} (Vertex, Azure Entra ID) | project, region, tenant_id or client_id containing /, \, ?, #, %, a space, a control character or .., or made only of dots, is refused (400 INVALID_REQUEST). | Send the real project, region, tenant or client id. |
POST /environments/{env_id}/models, PATCH /environments/{env_id}/models/{model_id} (direct, embedding on Azure OpenAI, Vertex AI or Amazon Bedrock provider keys) | A model_name the gateway refuses on every request is refused (400 INVALID_REQUEST, naming model_name); on a wildcard alias, only a template whose fixed text makes every resolution invalid. A PATCH re-checks the stored value only when it changes model_name, provider_key_id, or whether display_name contains *. | Send a valid deployment name or model id. |
Every /api/* request, and SCIM | When the admin token, SCIM token, membership, organization, environment tags or custom-role rules cannot be read, the answer is 503 SERVICE_UNAVAILABLE (no Retry-After; on SCIM, in the SCIM error resource) instead of 401 INVALID_TOKEN, 403 or 500; a disconnected client gets 499 CLIENT_CLOSED. Invalid, revoked and expired tokens still get 401, rule denials 403. | Retry on 503 with the same request; do not treat it as a credential or permission failure. |
POST /notification_channels, PATCH /notification_channels/{channel_id} | A body_template using define, or whose functions produce more than 64 KiB in one render, is refused (400). POST /notification_channels/{channel_id}/test answers ok: false. | Remove define and keep generated content within the budget. |
POST /environments/{env_id}/guardrails, PATCH /environments/{env_id}/guardrails/{guardrail_id} (custom) | Scripts that nest too deeply or are too costly to parse are refused (400). A save can return 503 SCRIPT_CHECK_BUSY with Retry-After. | Retry on 503. |
1.10.0
Release date: November 12, 2026
This release extends semantic routers to /v1/messages, /v1/messages/count_tokens, and /v1/responses, lets them target model groups, and can pin a session to the route its first matched request took. Rate limits can use sliding windows. Cost analysis shows how each cost was built up, per row and per request, and can page through every group. OpenAI-style prompt-cache writes are billed at the cache-write price, with a separate 12-hour price. Cost and price names no longer include a currency, and the gateway's default log level is now warn. AISIX Enterprise is now supported on Podman.
For the complete AISIX Cloud Admin API endpoint and schema comparison, see changes from 1.9.0 to 1.10.0.
Breaking Changes
The following changes can require updates to dashboards, alerts, consumers of usage records and exports, and scripts that read cost or price names.
Cost and Budget Names No Longer Include a Currency
Organizations can be priced in CNY as well as USD, so names that promised dollars have been changed.
- Gateway budget
429: in the OpenAI-format error body,error.limit_usdis renamederror.limitanderror.spent_usdis renamederror.spent. Values and format do not change, and the old names are no longer sent. The Anthropic-format body never carried these fields. - Gateway budget metrics:
aisix_budget_limit_usd,aisix_budget_spent_usdandaisix_budget_remaining_usdare renamedaisix_budget_limit,aisix_budget_spentandaisix_budget_remaining. Labels do not change. Rename any dashboards and alerts that use the old names. Ifobservability.metrics.labelsstill lists an old name, the gateway starts, logs a warning naming the replacement, and ignores that entry until it is renamed. - Exported usage events no longer carry a cost.
cost_usdis removed from SLS columns, object-store NDJSON, Datadog (aisix.cost_usd), OTLP, and the telemetry the gateway sends to the control plane. The control plane's usage data is the authoritative cost. The gateway sent0here except for realtime sessions and completed batch jobs. - Usage events CSV export: the
cost_usdcolumn is renamedcostin the same position. Scripts that read columns by header must changecost_usdtocost. New columns are added after the 1.9.0 columns (see API Changes). - AISIX Cloud Admin API: the new names
costandprompt_per_1m,completion_per_1m,cache_read_per_1m,cache_write_per_1m,cache_write_1h_per_1m,reasoning_per_1mare added. The oldcost_usdand*_usd_per_1mnames remain as deprecated aliases with the same values. Usage responses (usage_events,usage_summary,usage_analysis,usage_analysis/breakdown) gain a top-levelcurrency(USDorCNY). See API Changes for the parts that break.
Upgrade Considerations
The following changes take effect when you upgrade, or matter while gateways and the control plane run different versions. Most need no configuration change, but they can change logs, bills, rate-limit counts, metrics, and masking.
The Gateway's Default Log Level Is warn, and the Access Log No Longer Depends on It
observability.log_level now defaults to warn instead of info. A gateway that sets neither log_level nor RUST_LOG writes only WARN and above, plus the access log. The INFO lines that are no longer shown by default include provider call completed, the lifecycle lines (aisix listening, etcd connected, drain progress), and guardrail block and monitor-mode diagnostics. To keep the old output, set log_level: info. A script that waits for one of those lines must set info or poll /readyz. The aisix Helm chart's default changes to match.
The access log no longer depends on the log level. While observability.access_log is on, it is written at any log_level or RUST_LOG. A gateway that already ran at warn/error and had no access log will now write one. access_log: false is the only way to turn it off: a RUST_LOG that sets aisix_obs::access_log=off no longer does.
OpenAI Cache Writes Are Billed at the Cache-Write Price
OpenAI-style cache writes are now billed at the model's cache-write price, when one is configured. 12-hour writes are billed at the 12-hour price (see New Features). The built-in catalog has a cache-write price for OpenAI's GPT-5.6 and gpt-6 families. 1.9.0 billed these tokens as ordinary input. This applies to new events from any gateway version that reports cache_write_tokens. Only 1.10.0 gateways report the 30-minute / 12-hour split. With an older gateway, the whole write is billed at the cache-write price. Events stored before the upgrade are not re-priced, so historical costs and summaries do not change. Models without a cache-write price cost the same as before. Budgets count the new costs as well. No configuration change is needed. Anthropic-style cache creation billing does not change.
Codex Lite-Mode Requests Use the Chat Bridge on Most Non-OpenAI Keys
A /v1/responses request that declares tools in additional_tools input items (Codex's Lite mode) now goes through the Responses → Chat Completions bridge on some keys. Even when the key would otherwise forward Responses natively, the Lite-mode request takes the bridge unless its provider is OpenAI, bring-your-own, omitted in an AISIX OSS resources file, or the literal azure value with an adapter other than bedrock, vertex, or azure-openai. An Azure OpenAI provider key uses adapter: azure-openai and therefore takes the bridge for every Responses request. Before, other native Responses keys received Lite-mode requests unchanged and ignored the tools, so the model wrote its tool calls as text. DeepSeek's catalog keys are the common case.
The decision is made per upstream attempt from the key actually dispatched. A model group can therefore send its first attempt natively to an OpenAI member and its fallback through the bridge to a DeepSeek member. The usage event, access log, metrics and OTLP span report such an attempt as bridged. Requests without additional_tools do not change. A rerouted request does not resolve previous_response_id, which matters only to a client that relies on stored responses; Codex sends store: false with the full input every turn. The dashboard's hint for the Responses surface of a provider key states this. No configuration change is needed.
Rate Limits Count Model Group Attempts per Layer
A request that goes through a model group now counts each rate-limit layer the same way on every routed endpoint:
- Limits on the caller and on what the caller addressed count once per request, as before: the API key's own limit, the addressed model's or group's own limit, classic
api_key,team,memberandteam_memberpolicies, and MCP limits. - Limits on the target model the group dispatches to — its inline
rate_limit, classicmodel-scope policies on it, and conditional policies its ownmodel/model_namesatisfy — count once per upstream attempt, including retries on the same target. On/v1/messages/count_tokens, completions, embeddings, rerank, images, audio, videos and decisions they used to count once per target model. They now count per attempt, as chat completions, messages and responses already did, so a target model's limits fill faster when retries fire. - A conditional policy that matches through the addressed group itself, whichever target model is dispatched, and whose
group_bydoes not split onmodelorprovider, counts once per request — for example a policy withmember in [...] AND model in [G]split bymember. It used to count again on retries or failover and could run out early. A policy whose match depends on the target model (for examplemodel == G AND NOT provider == X, ormodel ~= M), or that splits onmodelorprovider, counts per attempt. - When the gateway's own limiter refuses a request, the counts that request had already taken are returned. For example, the key's
rpmis no longer spent when the model's limit refuses the request. Once an attempt reaches the upstream, nothing is returned, whatever the upstream answers.
Direct (non-group) dispatch does not change. The full counting rules are in the RateLimitPolicy description of the Admin API reference.
Per-Model Failure Metrics on Video and Realtime Routes
Failed GET /v1/videos/{id} and GET /v1/videos/{id}/content requests, and /v1/realtime handshakes refused after the model was found, are now labelled with the configured model instead of model="unresolved". Realtime refusals after a target was selected also gain provider, upstream_model and the provider-key labels. As a result, per-model error rates on these routes can rise after upgrading, and model="unresolved" drops by the same amount. On a wildcard row (model_name: "*"), the realtime request families now report upstream_model as the row's template rather than the caller's suffix.
MCP and A2A Failures Inside HTTP 200 Are Recorded as Failures
Some /mcp failures still answer the caller with HTTP 200. They now record an error_class and a fixed error_message on the usage event and access-log line. This covers a tool call answering isError: true, an upstream HTTP error, timeout or connection failure, and a JSON-RPC error. It also covers an answer that cannot be decoded, a credential failure, an ACL refusal, and an unknown OpenAPI tool. A2A JSON-RPC errors inside a 200 (on message/send and on streams) record upstream_in_band. tool_error requests carry error_source="upstream" on the request counters while status stays 200. OTLP CLIENT spans are now ERROR whenever an error_class is set (except 499). This also applies to a streamed response that an output guardrail refuses after its 200 head. The dashboard's Logs list, Logs detail and Overview's recent requests now show these rows as tool error (MCP) or agent error (A2A). Success rates and the Failed (4xx/5xx) status filter still count them as 2xx.
PII Detection Masks Grouped Card Numbers and Numbers Next to CJK Text
The built-in bank_card detector now matches grouped card numbers separated by spaces or hyphens. The supported groupings are 4-4-4-4, 4-4-4-4-3, 4-6-5 and 4-6-4. The number must still start with a card prefix and pass Luhn. Every built-in detector also now matches a value written directly next to Chinese, Japanese or Korean text (for example 卡號4111111111111111 or 手机号13812345678). So more text is masked or blocked after upgrading. In the other direction, us_ssn and ip_address written entirely in full-width or other non-ASCII digits no longer match.
Semantic Routers Classify Chat Requests Differently
For an existing semantic router on /v1/chat/completions, an image-only or reminder-only newest user message used to send the request to default (empty_prompt). The router now classifies the newest earlier user turn that has text. <system-reminder> blocks are no longer part of the classified text. Several text parts of one message are now joined with a space rather than run together. For Codex callers, Codex's injected context blocks (<environment_context>, <user_instructions>, # AGENTS.md instructions for … and similar) are also removed before classifying.
Gateways Older Than 1.10.0 Block Sliding Windows and Model-Group Targets
Some saves are refused while an environment has a registered gateway older than 1.10.0. The control plane refuses a sliding-window rate limit, and a semantic router target that is a model group. The refusal is 422 DP_INCOMPATIBLE and lists those gateways. For sliding windows, this also refuses any other save that rewrites a key, model or policy already carrying window_type: sliding (for example disabling or rotating a key). Upgrade the gateways, then save. A semantic router's session_affinity is saved with a field_ignored warning instead: older gateways route as usual without pinning.
Budget Documents Log a Warning on 1.10.0 Gateways
During the compatibility window, the control plane writes both the new limit/spent/remaining amounts and the old *_usd amounts to budget documents. Each time a 1.10.0 gateway loads an exhausted budget, it writes a WARN row loaded with unknown fields ignored naming the three *_usd keys. These warnings are expected. They are not reported as partial compatibility in the dashboard.
New Features
This release adds the following capabilities for routing, traffic controls, pricing, cost analysis, the dashboard, and AISIX Enterprise.
Routing: Semantic Routers on Messages, Count Tokens and Responses
Semantic routers now work on /v1/messages, /v1/messages/count_tokens and /v1/responses, as well as /v1/chat/completions, so Claude Code and Codex can use them. count_tokens counts against the model the real request would go to. The router classifies the newest user turn that has human text: tool results, images and <system-reminder> blocks are skipped, and the system prompt and instructions are never classified. The access-log fields semantic_route, semantic_score and semantic_fallback, and the x-aisix-route debug header (with proxy.expose_debug_headers), apply on all four endpoints.
Routing: Model Groups as Semantic Router Targets
A semantic route, default, on_embedding_failure.target_model_id and classifier.on_failure.target_model_id can now be a model group. The group dispatches as it does when addressed directly: its strategy, retries, fallbacks, cooldown, health and when_all_unavailable apply. A group that cannot serve this caller counts as unavailable, so the router serves default with semantic_fallback=target_unavailable. The group must have at least one member whose provider serves chat completions. A model group referenced by a router cannot be deleted (409 MODEL_IN_USE). In the dashboard, the semantic router's target pickers list model groups, and the route test panel names the group.
Routing: Session Affinity for Semantic Routers
The new optional semantic.session_affinity (enabled, default false; ttl_seconds, default 3600, 60–604800) keeps a session on the route its first matched request took, without calling the classifier again. The session id comes from x-aisix-session-id, vendor x-<vendor>-session-id headers such as Claude Code's, Codex's session headers, x-session-id, body metadata.user_id/metadata.session_id, or the session.id entry of W3C baggage. A pin is per router, API key and session. The TTL slides on each use. Only a request that matched a route creates a pin. count_tokens and client side requests (Claude Code's x-claude-code-request-class: auxiliary, and known title-generation and suggestion prompts from Claude Code and Codex) follow an existing pin but never create one. The access log carries semantic_pinned=true on pinned requests. Pins are shared across every gateway of an environment through the data-plane manager. The dashboard adds a Session affinity toggle and a TTL field to the semantic router form.
Traffic Controls: Sliding-Window Rate Limits
Rate limits gain window_type (fixed, the default, or sliding) on api_key.rate_limit, model.rate_limit, api_key.mcp_rate_limits and the limits of conditional rate-limit policies. A sliding window counts over a rolling period, so a burst on both sides of a window boundary can no longer admit up to twice the limit. Steps are 10 seconds for rpm/tpm, 5 minutes for rph, and 1 hour for rpd/tpd. Usage is released between one window and one window plus one step after it was recorded. rps and concurrency are not affected. Switching a limit between fixed and sliding starts its count from zero. On a 429, Retry-After and X-RateLimit-Reset give the exact seconds until the request would fit. The dashboard adds a Window type choice to API key, MCP, model and conditional policy limits, and marks sliding limits in their summaries. The classic policy shape does not take window_type.
Pricing: 12-Hour Cache-Write Price and Cache-Write Retention
OpenAI reports how much of a prompt-cache write used each retention. The gateway now records this on the usage event, and the control plane prices it.
-
Usage events gain
cache_write_30m_tokensandcache_write_12h_tokens, each present only when the upstream reported it. OpenAI returns them on Responses requests that select a cache retention (prompt_cache_options.ttlor a block'sprompt_cache_breakpoint.ttl). Chat Completions does not return them. The fields appear in the Admin API usage events and the usage-events export (CSV columns are listed under API Changes). They also appear in the dashboard's Logs detail, under the cache write, which is marked as usually counted inside prompt. The gateway's exporters carry them by name in serialized exporters, and asaisix.cache_write_30m_tokens/aisix.cache_write_12h_tokensin Datadog and OTLP. -
cache_write_12h_per_1mcan be set wherever a cache-write price can. That is the model price, each input-token tier, each service-tier entry and its tiers, and a model group's group price and its tiers. The decisions block does not take it. A 12-hour write uses the first configured of these prices:- Its tier's own 12-hour price.
- The matched service-tier entry's own, the entry's tier first.
- The base 12-hour price of the price in use: the model's, or the group price's when it applies.
- Twice the effective cache-write price, when one is configured.
- The effective input price.
On
/v1/systemoneand/v1/decisions, a configured decisions cache-write price replaces both the cache-write and the 12-hour price. -
Cost components gain
cache_write_12h, in the cost breakdown and in each usage event'scost_components. In the dashboard, the shared price editor gains a 12-hour price on the flat price, each tier and each service-tier entry. The pricing page and the model group form use this editor. The cost breakdown gains a Cache write (12 hours) row.
Cost Analysis: Cost Breakdown
Cost analysis can show how each cost was built up: price tier, service tier, off-peak discount, group price, and usage source.
- The new
GET /usage_analysis/breakdowntakes the same window and filters as/usage_analysis, plustarget_model_id,unset,group_by(tag:<key>,team,member,api_key,environment,day) andoffset. Each row is keyed by requested model, dispatched model, price tier, the service-tier price that billed the usage, off-peak, group price and usage source. The usage source isusage_estimated, which is true when the gateway estimated tokens the upstream did not report. A row'sservice_tieris the firstmatchvalue of the service-tier price entry that billed the usage, ornullwhen the base price did. Usage with no reported tier, or a tier no entry matches, such asdefaultwhen no entry names it, shares the base-price row. It is not the tier name the upstream reported, which stays on each usage event. Each row lists each charge's quantity and amount, plus the off-peak discount.totaladdsestimated_request_countandestimated_cost.uncovered_costis the cost in the window that has no breakdown, mostly usage from before the upgrade. History is not backfilled. - Each usage event in
GET /environments/{env_id}/usage_eventsand its export gainscost_componentsandoff_peak_discount. Rows from before the upgrade shownull. - In the dashboard, each cost-analysis row, including the total, expands to its breakdown and can export it as CSV. Breakdown rows billed at the base price are labelled Base price. The Logs detail shows the request's charges and discount.
- Decision endpoints (
/v1/systemone,/v1/decisions) report theirdecisions_*charges separately.
Cost Analysis: Paging Through Every Group
GET /usage_analysis and /usage_analysis/breakdown accept offset, with limit still capped at 500. Order is total, so adjacent pages neither repeat nor skip a group. total.group_count gives the number of groups across pages, and remainder sums every group not on the current page. Responses are unchanged when no offset is sent, except for the added total.group_count.
Pricing: Off-Peak Date Ranges
A model group's off_peak discount gains date_ranges ({start, end}, YYYY-MM-DD, inclusive, up to 100). A request that completes on any day inside a range, in off_peak.timezone, is discounted for the whole day, in addition to the weekly windows. windows is no longer required as long as one of the two lists is non-empty. There is no built-in holiday calendar, and make-up working days are not excluded from windows. The dashboard's off-peak form and the pricing page's in-use summary show date ranges.
AISIX Enterprise: Full Paging of the Usage Events Feed
GET /environments/{env_id}/usage_events accepts legacy_paging=true on AISIX Enterprise. With it, the 10,000-row offset limit is lifted and total is exact. The call has no application time limit and gets slower on deeper pages. AISIX Cloud answers legacy_paging=true with 400 INVALID_REQUEST.
Dashboard: Settings Tabs and an Account Page
Organization settings at Settings are split into General, Authentication, Policies and Data tabs, and each tab has its own URL (?tab=). Personal settings (profile, password, two-factor authentication, personal access tokens) move to a new Account settings page, opened from the avatar menu, which also holds Sign out. Accounts that sign in only through SSO no longer see a password form.
Dashboard: Missing-Price Hint on Model Forms
The direct and embedding model forms show a hint when the selected upstream model has no price in the organization: until a price is set, its requests record no cost. The hint links to the pricing page with the pair pre-filled.
AISIX Enterprise: Podman
AISIX Enterprise is supported on Podman starting with 1.10.0. 1.9.0 and earlier are not supported under Podman.
Under rootless Podman, enable lingering for the user that runs the stack (sudo loginctl enable-linger <user>). Otherwise the containers stop soon after that user's last login session ends. To start the containers again after a host reboot, also enable podman-restart.service. Rootful Podman does not need lingering. Also under rootless Podman, a gateway on the same host cannot reach the data-plane manager through the host's own IP address. Use the compose network instead (AISIX_CLOUD_DPMGR_BASE_URL=https://dpm:7944 in .env, and --network <project>_aisix on the gateway command), or Podman's host alias such as https://host.containers.internal:7944.
Improvements
- Codex over the Responses → Chat Completions bridge: tools that Codex declares in
additional_toolsinput items (Responses Lite mode), andcustomtools inside a namespace, now reach chat upstreams. Calls to those tools come back ascustom_tool_call/function_callitems with their name and namespace, not as text. Codex's client-executedtool_searchand the tools it loads now reach chat upstreams too, and come back astool_search_callitems. Repeated declarations are offered once, with the latest definition. Usage telemetry now recordscustom_tool_calloutput and treats a clienttool_search_callas a tool call. - Usage analysis performance: organization usage analysis, its breakdown and
tag_keysnow read completed days from day-level summaries, without changing any result. For example, a breakdown grouped by member over 5,000 members and 31 days drops from about 4.2 s to 1.9 s per page. Hourly rollup of large usage bursts no longer slows quadratically with the number of cells. Each aggregation behind/usage_analysisand/usage_analysis/breakdownnow has a 30-second budget and answers503 QUERY_TIMEOUTpast it (see API Changes). - Gateway exporters and listeners: with
proxy.thread_per_coreon, exporter pipelines run on the control runtime rather than staying on one request worker, which evens out worker load. Every listener (proxy, admin, metrics, debug) requests a backlog of 4096 instead of 128, capped bynet.core.somaxconn. - Gateway deployment snippets: the dashboard's Docker and compose snippets for running a gateway now set
--restart unless-stoppedand--stop-timeout 45(stop_grace_period: 45s). A gateway now restarts with its host and is not killed before its 30-second drain. The snippets verify the gateway by pollinghttp://127.0.0.1:3000/readyzinstead of waiting for a log line. The check works at any log level, and also under rootless Podman. - AISIX Enterprise installer (
run.sh):- On a fresh installation, the ports and addresses passed on the command line (
API_HOST_PORT,DPM_HOST_PORT,POSTGRES_HOST_PORT,AISIX_CLOUD_PUBLIC_BASE_URL,AISIX_CLOUD_DPMGR_BASE_URL) are written into the generated.env, so a later plain./run.shuses the same ports and addresses. A loopback base URL that was not passed follows the port that was (for example,API_HOST_PORT=18520writesAISIX_CLOUD_PUBLIC_BASE_URL=http://localhost:18520). An existing.envis never rewritten. - With an existing
.env, when settings passed on the command line differ from it, a successful start prints the lines to set in.envto keep them. Alocalhostbase URL can point at a different port than the one published.run.shthen warns and prints the exact.envlines to set, instead of printing a dashboard address that would refuse sign-in. - When a start fails because a host port is in use,
run.shnames the port and the URL setting that has to change with it, with its current value. This works on Docker Engine and Podman. If the first start fails, a rerun prints the first administrator's credentials. - Under rootless Podman without lingering,
run.shprints a notice with thesudo loginctl enable-linger <user>command before starting. It does not refuse to start. - The Helm chart's
NOTESgateway command now runs detached with a restart policy and a published port.
- On a fresh installation, the ports and addresses passed on the command line (
Fixes
- On Linux kernels older than 6.4, the gateway image no longer panics when it reads the page size: automatic heap dumps work again, and
/metricsagain includes theprocess_*andaisix_allocator_bytesfamilies. Affected since 1.5.0. Proxy traffic was not affected. - A provider key, MCP server or A2A agent whose
allowed_environmentsstill listed a deleted environment could no longer be edited or deleted (every write returned500). Deleting an environment now removes it from those lists, and the upgrade clears ids left behind by earlier versions, so stuck resources work again without manual SQL.GETon these resources no longer lists a deleted environment. - The first sign-in in a browser no longer passes through a blank
/select-orgpage before reaching the dashboard. - Pressing Back after signing in no longer shows a blank sign-in page with no form. Pages restored from the browser's back/forward cache in the middle of a redirect now end where a fresh visit would.
- Opening a dashboard page while signed out goes to the sign-in page without first sending requests that fail with
401, so the browser console no longer shows those errors. - A tab left on the sign-in page carries on normally after you sign in from another tab. Following a link in it no longer returns to the sign-in page, and it shows the organization's language straight away. Likewise, a tab left on the forced password change is no longer sent back there once the password has been changed in another tab.
- The service-tier price help in the dashboard and the Admin API descriptions no longer say that OpenAI's fast mode is reported as
priority. When OpenAI serves a request with priority processing, GPT-6 models reportfastand earlier models reportpriority; a request downgraded to Standard reportsdefault. An entry matches the reported name. If you wrote a service-tier price entry for priority processing by hand with onlypriority, addfast, otherwise GPT-6 usage served at that tier is billed at the base price. Prices from the built-in catalog already list both names. Matching itself is unchanged. - AISIX Enterprise: files in the offline installation package are now owned by root. They used to keep the build machine's UID when root extracted them, so a local account with that UID could modify
run.shanddocker-compose.yaml, which root runs.quickstart.shrun as root also returns such files in an existing installation to root. - AISIX Enterprise: on Podman,
run.shagain shows migration progress and recognises fatal startup errors, and rejects an offline package built for the wrong architecture. - The API key limit editor now shows a save error (such as a
422) while editing. It used to show it only in the summary view.
API Changes
The following changes break existing AISIX Cloud Admin API callers.
| Method and path | What breaks | What to change |
|---|---|---|
GET /environments/{env_id}/usage_events/export (format=csv) | The cost_usd column is renamed cost in the same position. Five columns are appended after the 1.9.0 columns: cost_components, off_peak_discount, cache_write_30m_tokens, cache_write_12h_tokens, currency. currency is the last column. | Read cost instead of cost_usd. |
GET /usage_analysis without sort | The default sort is now cost, so the response's sort field reads cost where it read cost_usd. Ordering does not change, and sort=cost_usd is still accepted and echoed. | Do not match sort against cost_usd when sort is not sent. |
GET /usage_analysis, GET /usage_analysis/breakdown | An aggregation that runs past 30 seconds returns 503 QUERY_TIMEOUT with no partial result. It used to run to completion. | Narrow the window or filters, and retry on 503. |
Audit log entries for model pricing and model price changes | New audit before/after JSON uses only the new names (prompt_per_1m, …). Existing entries are not rewritten. | Read both spellings when parsing audit diffs. |
1.9.0
Release date: November 6, 2026
This release lets each user sign in to upstream MCP servers from their MCP client, and lets an OIDC provider supply cost-attribution tags from verified tokens. Usage records now show what a failed request sent and received, the last attempt of each request, and what a request cost the platform. Request-log queries now have fixed bounds on counting, paging, and statement time. Upstream failures reach callers as the upstream's text with its code and param, and a realtime session the upstream refused now answers and records as a failure.
Breaking Changes
The following changes can require updates to clients, consumers of usage records and exports, and provider key budgets.
Upstream Error Responses Carry Text, code, and param
On an upstream failure, error.message now holds the upstream's text rather than its whole error body as a JSON string. This applies to /v1/rerank (including Cohere), /v1/audio/speech, /v1/audio/transcriptions, /v1/audio/translations, /v1/images/edits, and native /v1/responses (including streaming). A 4xx now also carries the upstream's code and param. A 5xx carries neither. Status codes do not change.
Before:
{"error":{"message":"{\"error\":{\"message\":\"bad\",\"type\":\"invalid_request_error\",\"code\":\"bad_param\",\"param\":\"x\"}}","type":"upstream_error"}}
After:
{"error":{"message":"bad","type":"upstream_error","param":"x","code":"bad_param"}}
Before upgrading gateways, change any caller that parses JSON out of error.message on these routes. Read error.message as text, and error.code and error.param as fields. The access log's error and the failure row's error_message read upstream returned HTTP 500: bad, and the full-content response field still holds the upstream's body as sent.
Related changes:
- Other error body shapes, on every route. A body shaped
{"message":"x"},{"error":"x"},{"detail":"x"}, or{"detail":{"message":"x"}}now reads asx, including on chat, completions, embeddings, images, messages, count tokens, and bridged responses, which used to return the raw body text. A blank field no longer hides the text of a later one. A non-JSON body stays the text as sent. /v1/decisions. A 4xx now carries the upstream'scodeandparam. An error body past 64 KiB is no longer parsed, so the caller receives its first 1 KiB as text.- Azure OpenAI keys. On
/v1/chat/completionsand/v1/responses, a missing deployment now answerscode: model_not_found, where it answered nocode. A 4xx now carriesparam, and a numericerror.codenow answers as a string. The status,error.type, anderror.messagedo not change. Audio and realtime still carry Azure's own code untranslated, and/v1/messagesstill omitscode. /v1/videos. OnPOST /v1/videos,GET /v1/videos/{id}, andGET /v1/videos/{id}/content, for every video provider:error.messageis the upstream's text, without thecode:prefix. A client that parsed the code out ofmessagemust readerror.code.- A 4xx carries the upstream's
codeandparam, and a DashScope top-level string code.error.typestaysupstream_error. A 5xx carries text only. - The literal
upstream erroris gone. A non-JSON body, or JSON with no text field, is returned as text. An empty body or a blank message gets the status fallback, such asupstream returned 400 Bad Request. - An upstream's
Retry-Afternow reaches the caller on a 429. On any status that trips the model's cooldown, it also sets the cooldown's length, and it paces same-target retries. This includes a poll or content request, so a 429 on a poll can hold the model's new submits for up to the cooldown'smax_seconds. - An error body past 64 KiB is no longer parsed, so the caller receives its first 1 KiB as text.
- A non-2xx whose body cannot be read whole is now decided by its status, where it used to be a
502 upstream_decode_errorthat was neither retried nor counted toward cooldown. The message is the status fallback, a 4xx keeps its status, a 5xx answers 502, a 429 keepsRetry-After, and retries and cooldown follow that status. - The failure row and access log cap a message at 1 KiB, and a body with a code but no text no longer reports the code.
The /v1/files, /v1/batches, and fine-tuning routes and passthrough routes still relay a non-2xx as the upstream sent it.
Inject Passthrough Routes Remove Every Credential Header
A passthrough route with credential_mode: inject now removes every inbound credential header before forwarding: authorization, x-api-key, api-key, x-goog-api-key, cookie, proxy-authorization, x-amz-security-token, x-amz-date, and x-amz-content-sha256. The ProviderKey's strip_headers no longer decides this, and a glob such as x-* or * does not bring one back.
Before upgrading gateways, name each header that a route must still forward, exactly, in forward_client_headers. This includes a ProviderKey that un-stripped cookie. If the named header is the one the route injects into, the upstream receives the caller's value instead of the injected one. credential_mode: forward_client is unchanged.
The dashboard now always saves authorization, cookie, and x-api-key in a ProviderKey's strip_headers, even when the save changes another field. A key that un-stripped cookie through the API therefore stops forwarding it on gateways older than 1.9.0 too, once it is saved in the dashboard.
Failure Records Carry Real Text and More Content
Every failure row now names its failure in error_message, at any content_mode. The text can echo what a caller sent or what an upstream answered, and it reaches the control-plane store, OTLP, and SLS, including under metadata_only. A value that a monitor-mode guardrail matched, or one quoted by a validation error raised before guardrails run, can appear there when an upstream or a parser echoes it. A guardrail's own refusal still does not carry what matched. An upstream failure reads upstream returned HTTP <status>: <upstream text>.
Under content_mode: full, every failure row now carries the request body and its own response body, on every endpoint and status:
- Exports now include request bodies for upstream 401 and 403 responses and for gateway refusals such as a forbidden model.
- A row that fails before guardrails finish carries an unmasked request body.
- Every fallback attempt repeats the request body, so export volume grows on failing traffic.
- Under a full-content exporter, the gateway reads an A2A agent's error body before answering, so a slow agent can delay the answer up to the agent's timeout.
Before upgrading gateways, review who can read usage records and exports, and how much export volume you can absorb.
Vertex AI Gemini max and xhigh Effort Can Return 400
Callers that ask for thinking on Vertex AI Gemini 2.5 or later now receive reasoning on their protocol's reasoning field. A stream's first event can be reasoning rather than text.
Gemini has no setting for an effort of max or xhigh. On a model that does not think by default, such as gemini-2.5-flash-lite, gemini-2.5-flash-image, or gemini-3.5-transcribe, the upstream answers 400 Thinking_config.include_thoughts is only enabled when thinking is enabled. 1.8.0 returned 200. The gateway passes that error through, so choose a supported effort for those models.
Output guardrails do not scan thought text. A deployment with an output guardrail on a Vertex AI Gemini model now passes this text unscanned to callers who asked for it.
Upstream 200 Responses That Report an Error Become Failures
A 2xx response or stream frame with a top-level error that carries something is now an in-band upstream failure on the covered paths. The caller receives 502, or the embedded 4xx, with upstream_in_band_error.
- Completions and image generation used to return this as a
200carrying the error object. - Native
/v1/responsesused to do the same for a bare error envelope. A response object withstatus: "failed"is still relayed as an answer. /v1/messages/count_tokensno longer relays such a body as a count.- Other typed paths used to return
502 upstream_decode. - Passthrough routes still relay the upstream's bytes and status, and now record the failure.
/v1/realtimefollows its own rule, described under Upgrade Considerations.null,{}, and""inerrorare not failures.
Exported Content Changes Shape
Consumers of full-content OTLP, SLS, and Datadog records should account for these changes:
| Record | Change |
|---|---|
| Chat prompts | Carry every block the client sent. Multi-block text is several text parts rather than one concatenated part. |
| Base64 media | Small payloads no longer stay verbatim. Recognized media is replaced with [aisix: base64 data uri omitted, N bytes] in prompts, MCP tools/call arguments and results, and passthrough bodies. A data URI keeps its mime-type head. |
| Image endpoints | b64_json is replaced, so the response field is no longer the full response JSON. |
| MCP tool results | A result that used to overflow into aisix.content.response because of an image now stays whole under gen_ai.tool.call.result. |
Vertex AI Gemini provider_request_id | Now holds responseId instead of being empty. |
Capability 501 rows | Gain error_class: config, and the OTLP server span reports error.type: config rather than 501. |
endpoint metric label | Paths under /mcp/{server}/ that no route serves report other rather than /mcp/{server}. |
Callers still receive their media. Object storage carries no content and is unchanged.
provider_key Budgets Accumulate Platform Cost
A provider_key budget now accumulates each usage event's upstream_cost, falling back to cost_usd where that is null. A model group's price and an off-peak discount no longer change it, and a group priced at 0 now spends it. Other budget scopes are unchanged, and spend already accumulated does not drop.
No budget needs editing. In environments that use group prices, a key budget now grows at a different rate. It grows slower when the group price is above the target's price, and faster when it is below. A hard limit is therefore reached at a different time.
Upgrade Considerations
The following apply when upgrading to 1.9.0.
AISIX Enterprise: cp-api Requires the Master Key
cp-api now exits at startup when AISIX_CLOUD_MASTER_KEY is empty, before it opens the database or runs a migration. It previously started in a degraded mode and reported healthy. The official chart and Compose deployments already require the key, so a standard deployment changes nothing.
A deployment whose key is actually empty restarts repeatedly until the key is set to the same value as AISIX_DPMGR_MASTER_KEY on the data-plane manager. The usual cause is an extraEnvVars override that dropped the variable during the 1.8.0 chart upgrade.
AISIX Enterprise: Audit and Access Logs Follow auth.trusted_proxies
cp-api now resolves the client address for audit events and its access log in the same way as sign-in sessions and rate limits. It previously believed any client-supplied X-Forwarded-For, so the address could be forged.
Behind a proxy without auth.trusted_proxies (Helm: api.trustedProxies; Compose: AISIX_TRUSTED_PROXIES), audit events and the access log record the proxy's address after the upgrade. Set it before upgrading. With trusted proxies configured, X-Real-IP is no longer read, IPv4-mapped addresses are recorded as plain IPv4, and a chain made entirely of proxies records the connecting peer.
Dotted Claim Names Read Literally First
identity_claim, bound_claims, claim mapping match[].claim, and the new tag_claims now read the whole string as one top-level claim name first, and only then traverse dots. A name such as https://acme.com/dept, which none of them could read before, now resolves. A token carrying both a literal a.b claim and a nested a: {b} now resolves a.b to the literal one. No configuration needs editing.
AISIX Enterprise: Re-Export Older Bundles That Are Refused on Restore
Exports no longer carry a former member referenced only by audit rows outside the bundle's window. A bundle exported before the upgrade that carries such a user is still refused with 409 OUT_OF_SCOPE_ROWS, so export it again. To bring those people back, widen the window with audit_since, which returns the audit rows and the people together.
Output Guardrails Run on Responses with No Text
The output guardrail chain now also runs on responses with no text. This covers the chat stream hold-back, both /v1/messages streams, the /v1/responses bridge, the end-of-stream monitor scan, and buffered transcripts. Text-matching kinds match nothing and let such a response through.
A custom script decides for itself. One that blocks unconditionally now also refuses an empty or image-only stream and an empty transcript. ctx.segments can be empty, and a script that throws on a fail-closed row refuses the response. Review scripts that read ctx.segments[0].
AISIX Enterprise: Control-Plane Database Connections and First Catalog Sync
Each data-plane manager replica opens a separate pool of up to 8 database connections for the gateway-shared store. Check this against your database's connection limit.
The first pricing-catalog sync after startup now waits for background index builds, for at most 2 minutes. Until it runs, a new installation's catalog and provider list are empty, and an upgraded one keeps its previous values.
Realtime: A Refused Session Answers and Records as a Failure
A /v1/realtime session the upstream never let start now tells the client why and records as a failure, whichever way it was refused. No configuration needs editing. A client that matches the sentence failed to connect to the upstream realtime endpoint for a refused handshake must stop doing so. Alerts and dashboards that count realtime dial hangs under 502, OpenAI wrong-key sessions under 200, or refused handshakes under 502 will see these sessions move.
The WebSocket upgrade to the client still succeeds before the dial. Apart from the last row, the client's error frame is followed by close 1011 with reason upstream connect failed, as before.
| What happened | Client's error frame | Recorded status and class |
|---|---|---|
| Handshake refused with a 4xx | The upstream's text, with its code and param | The upstream's status, so 401 has outcome client_error and 429 has rate_limited; upstream_status |
| Handshake refused with a 5xx | The upstream's text only | 502; upstream_status. The recorded text names the real status. |
| Handshake answered with a 2xx or 3xx that is no upgrade, or a status past 599 | The body's text, or a fallback such as upstream returned 200 OK | 502; upstream_status |
| Handshake refused with an empty or unreadable body | A status fallback such as upstream returned 500 Internal Server Error | As for its status. The text reads upstream returned HTTP <status> with no error detail in the response, or upstream returned HTTP <status>: failed to read response body: <reason>. |
Dial past upstream.connect_timeout_ms | failed to connect to the upstream realtime endpoint | 504; timeout, with text upstream request timed out after <n>ms: ... |
| No answer at all, such as a transport, DNS, or TLS failure | failed to connect to the upstream realtime endpoint | 502; transport |
Upgrade accepted, then an error event before any other frame | None from the gateway. The client gets the upstream's frames and its close code. A dropped connection with no Close still closes 1011. | From the event, below; upstream_in_band, with text upstream reported an in-band error: <upstream text> |
The status of the last row comes from the event: invalid_api_key is 401; rate_limit_exceeded and insufficient_quota are 429; invalid_model and model_not_found are 404; any other invalid_request_error is 400. A numeric code in 400-499 is used as itself, one in 500-599 is 502, and everything else is 502. These statuses apply to status_code on the row, the access log, and the status and outcome labels on the request metrics.
- Cooldown. A handshake refused with a status, or a refused session with a status, now takes
trigger_statusesandhonor_retry_afterrather thantrigger_on_transport. With the default list, an OpenAI wrong-key session now cools the model down, and a400or an unknown model does not. A dial timeout now takestrigger_on_timeout, sotrigger_on_transport: falseno longer keeps the model available on a dial hang. A refused session with no status takestrigger_on_transport. aisix_deployment_*. The success sample now waits for the first frame that is not anerrorevent, or for the end of the session, rather than being taken at the101. A refused session counts one failure and no success. A session that an upstream failure ended before any frame now counts as a failure.- Failure rows. On a refused handshake,
responseatcontent_mode: fullis the upstream's body as sent, andupstream_response_headerscarries the exporter's listed headers.provider_request_idis read from the response's request-id headers,upstream_latency_msis the dial's duration, and OTLP spans carry the server address. On a refused session,responseatcontent_mode: fullholds the error frame as sent. - Handshake body. The gateway now reads a refused handshake's whole body, up to 64 KiB and within the model's stream budget. The frame therefore no longer depends on the body's size and timing. A stalled body holds the client's frame for up to one stream budget past the dial. With no budget, it holds the frame for as long as the upstream stalls and the client stays.
A session that became usable is unchanged. An error event after its first usable frame, such as one OpenAI sends for a bad client event while the session stays open, does not make it a failure.
New Features
MCP: Per-User OAuth to Upstream Servers
MCP servers of type: mcp gain auth_type: oauth2_authorization_code. Each user signs in to the upstream from their MCP client, and the gateway then calls the upstream with that user's token. Upstream tokens never reach the client, and the client's Authorization never reaches the upstream.
- Sign-in without a gateway credential. When an environment has exactly one enabled OIDC provider with
login, a client can connect with only the server's URL. Otherwise, the client brings a gateway credential. - Shared across gateways. Credentials are stored encrypted in the control plane through the data-plane manager, and refresh is coordinated across gateways.
- Administration. The MCP server form adds a Connected users panel. New Admin API endpoints list and disconnect credentials under the
mcp_server_credentialspermission. After a disconnect or any purge, a gateway that has the token cached can keep using it for up to 5 minutes. - What sends users back through sign-in. Deleting an OIDC provider, or changing its
issueroridentity_claim, removes its stored upstream tokens. So does deleting an MCP server, changing itsurl,client_id,token_url,authorization_url, orregistration_url, or changing itsauth_typefromoauth2_authorization_code. Removing an environment fromallowed_environmentsremoves only that environment's tokens. The dashboard warns about the OIDC provider changes. - Network. The proxy listener serves new paths under
/.well-known/,/mcp/{server}/, and/mcp-oauth/. A front proxy must route them.outbound.ssrf_protectioncovers OAuth documents and endpoints that an upstream names on another authority.
This requires 1.9.0 gateways. The control plane returns 422 DP_INCOMPATIBLE while an older gateway is registered in the environment. An older gateway ignores login, and the save returns a warning.
MCP: Path-Prefixed Resource URLs
mcp_resource_url can carry a path prefix, such as https://host/aisix/mcp, for gateways behind a front proxy that routes by prefix and strips it. A plain /mcp URL behaves as before.
This requires 1.9.0 gateways. Saving a prefixed URL returns 422 DP_INCOMPATIBLE while an older gateway is registered in the environment. If an older gateway registers after a prefixed URL is saved, OAuth discovery is off on that gateway. Any save that rewrites the environment's MCP authentication settings is then refused until the gateway is upgraded or the URL is cleared in the same request.
Authentication: Cost-Attribution Tags from JWT Claims
An OIDC provider can now map claims of the verified token to tags with tag_claims, so tags follow the identity provider rather than being maintained on every API key. Usage events, tag budgets, and tag: rate-limit conditions all read the result.
- A claim overrides the same tag key with the precedence claim, key, team, member. Nothing is written back to the key.
- Strings, numbers, and arrays of them become text. Arrays are sorted, deduplicated, and joined with
,. An invalid value yields nothing, and the key keeps what its other layers give it. - Each tag key must already be declared in the organization. A key in use by an OIDC provider cannot be deleted (
409 TAG_KEY_IN_USE). - When several tokens share an API key, the key-labelled
aisix_budget_*gauges reflect the most recent request's verdict. A batch attribution row carries the tags of the caller that observed the batch complete. - Tag-value suggestions now include values seen in the last 30 days of usage, for callers who can read usage.
Gateways older than 1.9.0 ignore tag_claims, and the save returns a field_ignored warning.
Observability: Last Attempt per Request
Usage events gain is_final_attempt, and the Logs page gains a Last attempt per request filter, also available as final_attempt_only on the usage event list and export. It shows one row per request.
- It is off by default.
- Filtered rows do not total the tokens or cost of hidden attempts, so do not use them to compute spend.
- Rows from before the upgrade, or from older gateways, are always returned, so a fallback request on an older gateway still shows every attempt.
Observability: error_source on Request Counters
aisix_llm_requests_total, aisix_proxy_requests_total, and aisix_proxy_failed_requests_total gain a default error_source label: upstream, aisix, or empty for a success or a caller that left. {error_source!="aisix"} gives call volume without the gateway's own refusals, which status codes cannot do because both sides answer 429.
A metric label selection that already lists labels for these families does not pick it up, so add it explicitly. The label at most doubles failure series on statuses both sides answer.
Cost Analysis: Platform Cost and Price Tiers
Usage events now record upstream_cost, price_tier_index, and price_tier_max_input_tokens, in the event list, CSV export, and log details. Cost Analysis can drill from a model group to its target models and show billed and platform cost side by side, also available as group_by=target_model on GET /usage_analysis. Platform cost exists only for events recorded after the upgrade, so earlier ranges show less in the drill-down than on the model row.
Vertex AI: Gemini Generated Images on Chat Completions
/v1/chat/completions now returns Gemini image output in message.images and delta.images, and a client's modalities becomes generationConfig.responseModalities. Image models can return an interim thought image before the final one, so read the last entry for the final image.
/v1/messagesand/v1/responsesstill discard images, so an image-only answer is an empty200on those two endpoints.- Output guardrails do not scan or block on images.
- Image-related Gemini finish reasons now finish as
content_filter. - A response with images, from any upstream, is not stored in the response cache.
- Generated image data stays out of usage events, access logs, and exporters.
Dashboard: Documentation Links
The dashboard adds a global documentation entry on screens at least 1280 pixels wide, topic links across its pages, and Settings card links. It also adds provider setup guides, and troubleshooting and error-class guides on the Logs page.
Improvements
- Logs page: The page loads rows first and counts separately. Totals cap at
10,000+, paging stays within the first 10,000 rows, and a timed-out count shows the total as unknown. A Failed (4xx/5xx) status suggestion is backed by a new index. - Members: Member pickers and team member lists search and page on the server, for organizations with thousands of members.
GET /membersgainsteam_id,exclude_team_id, andstatus;GET /teams/{team_id}/membersgainsqand paging;POST /members/lookupandGET /members/meare new. - Search errors: The pricing page and member pickers show the server's message when a search is refused, rather than a generic load failure.
- Gateway memory: Native
/v1/responses,/v1/messages,/v1/messages/count_tokens,/v1/rerank, and JSON/v1/audio/speechrequests whose only rewrite is the model name use about one body-size less peak memory when content capture is off. - Failure diagnostics: Empty upstream errors now read
upstream returned HTTP <status> with no error detail in the response, and every failure row and access-log line at 400 or above names its failure. Passthrough and job rows for a relayed non-2xx gainerror_class: upstream_status. An in-band failure now readsupstream reported an in-band error: <message>inerror_messageand the access log'serror, on streaming and non-streaming requests alike, where the access log saidin-band stream error. A stream's closing error frame keeps its text. - Gateway logs: Outbound failures now log the underlying cause, such as an untrusted certificate, instead of only
error sending request. - Vertex AI Gemini and Bedrock Converse: Chat and non-streaming Messages responses no longer return an empty
id. - ProviderKey form: The header strip-list rationale is localized, and the form explains the other credential headers.
Fixes
- One usage event with a NUL byte or invalid text no longer loses the rest of its batch. A very long
requested_modelno longer stops usage rollups across the whole deployment; the entry point now truncates it to 256 characters. - Audit rows are no longer lost, and requests no longer fail with
500, when aUser-Agentholds bytes the database refuses. Sign-in sessions handle the same input. - AISIX Enterprise: restoring an organization no longer fails with
409 OUT_OF_SCOPE_ROWSwhen another connection commits during the import, such as the pricing sync, or with500 IMPORT_FAILEDfrom a deadlock with that sync. - AISIX Enterprise: an organization export that fails mid-stream now fails the download rather than saving a truncated file and reporting success.
- Usage and audit exports that fail mid-stream now fail the download rather than ending as a short file.
cp-apino longer panics when creating or updating a credentialed guardrail without a master key, because it no longer starts without one.- An upstream that answers a failure status, sends part of the body, and then goes silent no longer holds a streaming request with no limit. This covers streaming
/v1/chat/completions,/v1/messages,/v1/responses, speech, and transcriptions, on the OpenAI, Anthropic, Azure, Vertex AI, and Bedrock Chat Completions paths. The read now gets the model's stream budget, after which the caller receives the status fallback, such as502 upstream returned 500 Internal Server Error, and the row readsfailed to read response body: timed out after <n>ms. The upstream's status andRetry-Afterstill drive retries and cooldown. A model withtimeout: 0has no stream budget, so its read stays unbounded. - The A2A agent card no longer builds a broken URL from a chained
X-Forwarded-Protosuch ashttps,http. The first hop is read, in any case, and a value other thanhttporhttpsis ignored. - A session that must change its password now goes to the password page without the dashboard first sending requests the server refuses, and a
/login?next=destination survives the password change.
API Changes
The following changes break existing AISIX Cloud Admin API callers.
| Method and path | What breaks | What to change |
|---|---|---|
GET /environments/{env_id}/usage_events | total stops at 10,000, with total_is_capped: true. If the count exceeds its 5-second budget, total and total_is_capped are absent and rows still return. An offset (page-1)*limit of 10,000 or more returns 400 INVALID_REQUEST. A row query over 30 seconds returns 503 QUERY_TIMEOUT. | Use GET /environments/{env_id}/usage_summary or GET /usage_analysis for exact totals. Narrow the time range to reach older rows. |
GET /environments/{env_id}/usage_events/export | X-Export-Total and the JSON total are capped at 50,001. The count can take about 35 seconds: 5 seconds on an index, then 30 seconds on a plan chosen by the database. A timeout returns 503 QUERY_TIMEOUT before the first byte. A failure after the first byte cuts the connection. | Treat a transport error as a failed export. Handle the 503 by narrowing the range. |
GET /members, GET /teams/{team_id}/members, GET /environments/{env_id}/api_keys, GET /provider_keys, GET /environments/{env_id}/rate_limits, GET /model_pricing | A q over 256 bytes returns 400 INVALID_REQUEST. It used to return 200. The limit is in bytes, so non-ASCII text reaches it sooner. | Shorten q. |
GET /environments/{env_id}/usage_events and /export | requested_model (unless requested_model_exact=true), mcp_tool, a2a_method, jwt_subject, jwt_claim_mapping, and branded_provider over 256 bytes return 400. | Shorten the filter. |
All cp-api routes | A query parameter name or value, or a decoded path, with a NUL byte or invalid UTF-8 returns 400 INVALID_REQUEST, before authentication and even for parameters no handler reads. SCIM routes return a SCIM error. Some of these used to return 200 with empty results, 401, 404, or 500. | Send valid UTF-8. |
| Search endpoints | The message q must be at most 256 characters now reads q must be at most 256 bytes. | Update any match on the message text. |
PATCH /environments/{env_id}/oidc_providers/{oidc_provider_id} | A whitespace-only identity_claim returns 400. It used to return 200 and store the value. | Send a real claim name, or omit the field. |
PATCH /environments/{env_id} | mcp_resource_url values with an encoded path spelling such as https://host/%6Dcp, or an empty query or fragment such as https://host/mcp?, return 400. Stored values are not changed. Those values already left OAuth discovery off on the gateway. | Send the canonical URL. |
GET /members?q=... without page_size | owner_count is now the organization's total, not the count among matching rows. | Do not read it as a count of matching owners. |
GET /budgets, GET /budgets/{budget_id} | spent_cents of a provider_key budget now accumulates each usage event's upstream_cost, falling back to cost_usd where that is null. It used to accumulate cost_usd. Spend already accumulated does not drop. | Do not read it as the billed cost of the key's traffic. |