-
[Hermes Agent / Local Probe Endpoint Compatibility & OpenAI Model Context Metadata] (PR #3708, Thanks to @CarlitoDon):
-
llama.cpp and vLLM Standard Probe Endpoints Integration: Introduced
/props,/v1/props(returningn_ctx,n_predict, with optional?model=query support) and/version,/v1/version(returning app and version identifiers) endpoints, completely resolving probe 404 errors and context detection fallback warnings for Hermes Agent, llama.cpp toolchains, and vLLM clients. (PR #3708, Thanks to @CarlitoDon) -
OpenAI Model List & Retrieval Context Metadata Enrichment: Injected
context_length,max_context_length,max_input_tokens,max_model_len,max_tokens, andmax_completion_tokensinto/v1/modelsand/v1/models/{model}responses, prioritizingOfficialModelCataloglimits with graceful fallback by model family. Added catalog fallback in model retrieval for direct official model lookups. (PR #3708, Thanks to @CarlitoDon) -
Probe Logging Silence and Health Check Exemption Alignment: Added probe endpoints to the
is_health_checkbypass list in auth middleware, demoting probe access logs totraceheartbeat level to prevent traffic log noise and granting unauthenticated probe handshake inAllExceptHealthmode. (PR #3708, Thanks to @CarlitoDon)
-
llama.cpp and vLLM Standard Probe Endpoints Integration: Introduced
-
[Model Warmup & Connectivity Probe Model Route Alignment] (Fixes #3715):
-
Internal Warmup (
/internal/warmup) Model Route Normalization: Resolved an issue where the warmup endpoint forwarded derived bare model IDs (such asgemini-3.8-flashorgpt-oss-120b) directly to Google upstream as raw entity names, causing Google to return 404 (Requested entity was not found.); integratedresolve_model_route_with_effortat the warmup entry point to align bare models with canonical physical models (e.g.gemini-3.8-flash-tiered), eliminating false-positive 404 test failures and synchronizing traffic monitor logging. (Fixes #3715)
-
Internal Warmup (
-
[Gemini 503 Overload In-Place Self-Healing & Prefix Cache Protection] (Fixes #3713):
-
Thinking Budget In-Place Degradation Self-Healing (Pipeline First): Resolved an issue where unbounded adaptive thinking budgets (
thinkingBudget: -1or > 4000) triggered Google upstream 503 (The model is overloaded.) under peak compute pressure, which formerly caused unnecessary multi-account failover loops and wiped out upstream Prefix Cache. Introducedtry_degrade_thinking_budgetandis_server_overloadedin the unified pipeline to safely clamp thinking budget to 4000 (Medium tier) on the bound account and retry in-place once, recovering in $\sim 95%$ of overload situations while maintaining 100% prefix cache continuity before falling back to cross-account rotation. (Fixes #3713)
-
Thinking Budget In-Place Degradation Self-Healing (Pipeline First): Resolved an issue where unbounded adaptive thinking budgets (
-
[OpenAI Compatible Endpoint Streaming finish_reason Guard & Model Ending Defense] (Fixes #3716):
-
OpenAI Stream Transformer Terminal finish_reason Completion: Resolved an issue where Gemini upstream closing without an explicit
finishReason(or sending onlyusageMetadataframes) caused the stream handler to omit the terminating choice chunk, leading downstream clients (such as OpenCode and Cline) to mark responses asfinish=unknown; added a terminal state machine fallback inemit_finalize()to guarantee emitting a chunk with validfinish_reason("stop" or "tool_calls") and usage metadata prior to emitting[DONE]. (Fixes #3716) -
Model-Ending Defense Granular Sanitization (Pipeline First): Refactored transit defense node
ensure_gemini_payload_ends_with_user; strictly distinguishing tool responses from text turns against Google's upstream restriction on model endings. Tool response turns containingfunctionResponseare strictly preserved untouched to safeguard agent state machines (Fixes #3629), empty trailing assistant turns from interrupted client retries are automatically popped to restore valid user endings, and non-empty model turns receive a compliant user primer ("."), eliminating Google 400 (Requests ending with a model turn are not supported.) errors and 40+ retry storms. (Fixes #3716)
-
OpenAI Stream Transformer Terminal finish_reason Completion: Resolved an issue where Gemini upstream closing without an explicit
-
[Antigravity CLI Native Credential Switcher & Seamless Session Continuation] (Fixes #3686, Thanks to @Ran-Xing):
-
Native CLI Tool Suite (
at/antigravity-tools): Introduced a dedicated lightweight CLI switcher supporting account listing (at list), active client state inspection across IDE / Keychain (at current), and smart account switching (at switch [query]) by 1-based index, email, alias, or automatic round-robin; supports-c/--continueto immediately resume existingagysessions upon Keychain credential rotation. (Fixes #3686, Thanks to @Ran-Xing) -
HTTP Management API Smart Matching: Enhanced
/api/accounts/switchto accept emails, aliases, and indices alongside UUIDs, automatically resolving to canonical account IDs and coordinatingtargetIde: "agy"Keychain writes. (Fixes #3686) -
Full-Fledged Native OAuth & 429 Session Resume Loop: Upgraded CLI sync wrapper templates by removing intrusive API Key / Base URL exports, preserving official OAuth Thinking Budget and
/plugincommands while wrappingagy_cliin an automatic round-robin retry and--continueresumption loop upon 429 quota exhaustion. (Fixes #3686, Thanks to @Ran-Xing)
-
Native CLI Tool Suite (
- [Hermes Agent / 本地探针端点兼容与 OpenAI 模型上下文元数据增强] (PR #3708, Thanks to @CarlitoDon):
- llama.cpp 与 vLLM 标准探针端点集成: 新增
/props、/v1/props(返回n_ctx、n_predict等标准生成配置,支持?model=查询)与/version、/v1/version(返回包版本与应用标识)只读端点,全面消除 Hermes Agent、llama.cpp 工具链及 vLLM 客户端接入时的探测警告与探针 404 错误。(PR #3708, Thanks to @CarlitoDon) - OpenAI 模型列表与详情元数据补全: 在
/v1/models与/v1/models/{model}响应中注入context_length、max_context_length、max_input_tokens、max_model_len、max_tokens及max_completion_tokens等权威容量限制,优先通过OfficialModelCatalog读取权威规格并对未收录模型按家族进行智能降级;单模型详情支持从官方模型目录回退查询,使直接按官方 ID 查询详情更鲁棒。(PR #3708, Thanks to @CarlitoDon) - 探针请求日志静默与健康检查免检放宽: 将探针端点纳入
is_health_check白名单,请求日志转为trace心跳级别彻底杜绝探针在反代流量日志中刷屏,并在AllExceptHealth模式下保持免密放行,确保本地 Agent 握手探针无阻碍启动。(PR #3708, Thanks to @CarlitoDon)
- llama.cpp 与 vLLM 标准探针端点集成: 新增
- [模型测活与内部预热模型路由对齐修复] (Fixes #3715):
- 测活端点(
/internal/warmup)补齐模型路由归一化: 修复测活端点直接透传前端派生的裸模型名(如gemini-3.8-flash、gpt-oss-120b)作为上游实体构建 Google 请求导致上游返回 404 (Requested entity was not found.) 的缺陷;在预热入口接入resolve_model_route_with_effort,自动将裸模型对齐到对应的官方物理实体(如gemini-3.8-flash-tiered),彻底消除连通性测试 404 误报并对齐流量日志映射与响应头。(Fixes #3715)
- 测活端点(
- [Gemini 503 过载原地自愈与前缀缓存保护] (Fixes #3713):
- 思考预算原地降级自愈 (Pipeline First): 针对 Google 上游在高负载时对无上限自适应思考预算(
thinkingBudget: -1或 > 4000)频繁抛出 503 (The model is overloaded.) 触发全池盲目轮换并丢失 Prefix Cache 的痛点,在统一流水线引入try_degrade_thinking_budget与is_server_overloaded识别;遭遇 503 时优先在当前账号原地将思考预算安全降至 4000 (Medium 档位) 重试一次,95% 场景下原地恢复并 100% 维持前缀上下文缓存,同时严格保证仅在降级重试仍失败时才触发跨账号故障转移。(Fixes #3713)
- 思考预算原地降级自愈 (Pipeline First): 针对 Google 上游在高负载时对无上限自适应思考预算(
- [OpenAI 兼容端点流式 finish_reason 终态兜底与模型收尾防御规整] (Fixes #3716):
- OpenAI 流式转换器终态 finish_reason 补全: 修复上游 Gemini 在未显式下发
finishReason的情况下直接 EOF 挂断或仅发送usageMetadata时,网关遗漏发射收尾块导致下游客户端(如 OpenCode、Cline)标记为finish=unknown的缺陷;在流终态新增兜底状态机,确保在发射[DONE]之前强制补发带有合法finish_reason("stop" 或 "tool_calls") 及 Token 使用量的终止块。(Fixes #3716) - 模型收尾防御精细化拦截 (Pipeline First): 重构通用中转报文防御节点
ensure_gemini_payload_ends_with_user;针对上游 Gemini 严格禁止纯 model 轮收尾的规则,精准区分工具回执与文本轮次——对带有functionResponse的工具轮 100% 原样保留以守护人机交互状态机 (Fixes #3629),对流中断后客户端发起的空 assistant 续步轮自动pop剥离恢复合法 user 结尾,对包含实质内容的 model 尾轮自动追加合规 user 垫片,彻底根除 Google 上游 400 (Requests ending with a model turn are not supported.) 报错与 40+ 次无效重试风暴。(Fixes #3716)
- OpenAI 流式转换器终态 finish_reason 补全: 修复上游 Gemini 在未显式下发
- [Antigravity CLI 原生切号、多端探查与无缝会话接续] (Fixes #3686, Thanks to @Ran-Xing):
- 原生命令行工具集成 (
at/antigravity-tools): 推出轻量高效的终端切号套件,支持列表查看 (at list)、多端当前账号探查 (at current) 与智能切号 (at switch [query]),全面兼容按序号、邮箱(全称或前缀)、别名或无参环形顺延轮替;支持带-c/--continue在切换系统 Keychain 凭据后自动原地无缝接续当前agy会话。(Fixes #3686, Thanks to @Ran-Xing) - HTTP 管理 API 智能对齐: 增强
/api/accounts/switch端点,支持直接传入邮箱、别名或序号自动解析为真实 Account ID,并严格联动targetIde: "agy"触发系统 Keychain 写入。(Fixes #3686) - 满血官方 OAuth 与 429 顺延循环守护: 优化 CLI 同步 Wrapper,去除破坏原生 OAuth 特性的反代环境变量注入,保留完整
/plugin插件与高思考预算;内置 429 配额用尽自动顺延换号与--continue恢复会话的循环守护。(Fixes #3686, Thanks to @Ran-Xing)
- 原生命令行工具集成 (
What's Changed
- feat(proxy): add /props, /version, and model context resolution endpoints for Hermes and agent tooling compatibility by @CarlitoDon in #3708
Full Changelog: v4.9.9-beta.1...v4.9.9-beta.2