feat(models): add passive availability tracking and opt-in probes (#171)

* feat(models): add passive availability tracking and opt-in probes

* test(models): harden passive availability telemetry and catalog refresh overlap protection

---------

Co-authored-by: NekomyaDev <neko@nekomya.dev>
This commit is contained in:
NEKOMYAandNekomyaDev authored and GitHub committed 2026-11-05 11:41:52 +08:00
1 parent 6fbe12c4df
commit cee32f7047
14 files changed
+504 -41

No files matched your search

+8
View File
@@ -996,6 +996,14 @@
</span>
</label>
</div>
<div class="field full">
<label class="check">
<input id="c-active-probes" type="checkbox" />
<span data-i18n="config.upstream.activeProbes">
启用免费模型后台主动探测(默认关闭,使用被动调用追踪以节省额度)
</span>
</label>
</div>
</div>
</section>
</div>
+4
View File
@@ -285,6 +285,7 @@ const DICTIONARY = {
"config.upstream.caption":
"anonymous will use every available proxy; an explicit protocol mapping wins over inferring the protocol from the model name.",
"config.upstream.freeOnly": "Only expose free models (even when Zen / Go Keys are configured)",
"config.upstream.activeProbes": "Enable active background probes for free models (disabled by default to save quota)",
"config.upstream.attempts": "Max attempts per Key Tier",
"config.upstream.timeout": "Request timeout (seconds)",
"config.upstream.refresh": "Model refresh interval (seconds)",
@@ -856,6 +857,7 @@ const DICTIONARY = {
"config.upstream.caption":
"anonymous sẽ dùng hết các Proxy khả dụng; ánh xạ protocol tường minh được ưu tiên hơn việc suy luận từ tên mô hình.",
"config.upstream.freeOnly": "Chỉ công khai mô hình miễn phí (kể cả khi đã cấu hình Zen / Go Key)",
"config.upstream.activeProbes": "Bật probe chủ động ngầm cho mô hình miễn phí (mặc định tắt để tiết kiệm hạn mức)",
"config.upstream.attempts": "Số lần thử tối đa cho mỗi Key Tier",
"config.upstream.timeout": "Timeout của request (giây)",
"config.upstream.refresh": "Làm mới mô hình (giây)",
@@ -1439,6 +1441,8 @@ const DICTIONARY = {
"anonymous userà ogni proxy disponibile; una mappatura esplicita di protocollo prevale sull'inferenza del protocollo dal nome del modello.",
"config.upstream.freeOnly":
"Espone solo modelli gratuiti (anche quando sono configurate Zen / Go Key)",
"config.upstream.activeProbes":
"Abilita i probe attivi in background per i modelli gratuiti (disabilitato per impostazione predefinita)",
"config.upstream.attempts": "Tentativi massimi per Key Tier",
"config.upstream.timeout": "Timeout richiesta (secondi)",
"config.upstream.refresh": "Intervallo di refresh modelli (secondi)",
+2
View File
@@ -95,6 +95,7 @@ function fillConfig(value) {
$("#c-refresh").value = value.models.refresh_seconds;
$("#c-protocols").value = JSON.stringify(value.models.protocols || {}, null, 2);
$("#c-free-only").checked = !!value.models.free_only;
$("#c-active-probes").checked = !!value.models.active_probes;
const reasoning = value.reasoning || {};
$("#c-reasoning-effort").value = reasoning.effort || "";
$("#c-reasoning-by-model").value = JSON.stringify(reasoning.effort_by_model || {}, null, 2);
@@ -139,6 +140,7 @@ async function save(event) {
refresh_seconds: numberValue("#c-refresh"),
protocols: JSON.parse($("#c-protocols").value || "{}"),
free_only: $("#c-free-only").checked,
active_probes: $("#c-active-probes").checked,
},
reasoning: {
effort: $("#c-reasoning-effort").value,