Skip to content

BFE v1.10.0

Latest

Choose a tag to compare

@mileszhang2016 mileszhang2016 released this 28 Nov 01:12
289a7c0

[v1.10.0] - 2026-11-28

Added

  • Add per-Key concurrent session limit AIConf.MaxConcurrencyPerKey: a cluster-level cap on distinct client sessions (ClientKeyId) per upstream Key, enforced as a Redis-global ZSet slot set (Lua, the [AIKeyAffinity] handle) from day one for multi-instance deployments. Occupancy mirrors the session-affinity binding lifecycle (bind=acquire, idle TTL or failure unbind=release); a full cap rotates like a 429 without penalties, rolls back the freshly written affinity binding, and synthesizes the NO_AVAILABLE_KEY 429 (issue #1440 contract) so cluster fallback works. Redis failures fail open. New counters ReqAiKeyConcurrencyLimited / ReqAiKeyConcurrencyRedisErr
  • Add whitelisted request/response header collection to mod_access_pb3 (#1506): headers named in the new mod_access_pb.data config (multi-section JSON carrier, first section access_header) are collected into the existing proto fields req_headers(55)/res_headers(158); header names are canonicalized at load time (case-insensitive), multi-values are joined with , and values are truncated to 2048 bytes (downstream Doris column width). The data file is hot-reloaded via /reload/mod_access_pb3 (mod_ai_route-style WebHandleReload, optional DataConfPath in mod_access_pb3.conf) and a missing file is tolerated at startup (zero-config upgrade, behavior unchanged). Whitelist content is not restricted on the data plane; raw credentials stay masked by the existing maskSensitiveCredentials gate (#1357)

Changed

  • AI route fallback now includes the rule's unselected targets in the attempt chain: attempts = [selected target] + [remaining targets by weight desc] + [fallbacks], deduplicated by (cluster_name, model). Multi-target rules now degrade across their own clusters before configured fallbacks, aligned with Bifrost's load-balancing fallback semantics (see the rewritten fallback flow in mod_ai_route.md)
  • When the whole AI forward attempt chain fails, the client now receives the primary (target-selected) attempt's error response instead of the last attempt's, so a fallback's error (e.g. model_not_found) no longer masks the primary path's real fault. Pure transport errors on the primary (no response at all) keep the last attempt's result. Upstream error normalization consequently takes the primary cluster's config

Fixed

  • Fix mod_ai_token_auth subnet gate bypass behind a trusted reverse proxy (CWE-863): ValidateUserTokenByReq accepted the key when EITHER Request.ClientAddr or Request.RemoteAddr was inside the configured subnet, so in a mod_trust_clientip deployment an out-of-subnet client could pass the subnet gate through an in-subnet proxy peer, although BFE already knew the real client address. The check now decides by ClientAddr alone when it is available, and falls back to the remote peer address only when no client address is available (direct requests always set ClientAddr=RemoteAddr, so both deployment shapes are covered)