feat(codex-bridge): Jev checks every added model, routing a block to Katman-1 first
Any added model's answer is now checked, not just the layer combos; a blocked answer falls to Katman-1, then 2, 3, 4. A selected layer only tries the ones after it; Katman-4 is delivered unasked. Layer fallbacks always open through the AITURK gateway, which hosts the combos, whatever route the model used. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
be0b33e89b
commit
11bbaddcc7
3 files changed
+44
-17
No files matched your search
@@ -1568,19 +1568,26 @@ class H(http.server.BaseHTTPRequestHandler):
|
||||
open(os.path.join(LOGDIR, f"{n:04d}_req.json"), "wb").write(data)
|
||||
hdrs = {"Authorization": f"Bearer {route['key']}", "Content-Type": "application/json", "Accept": "text/event-stream", "User-Agent": UA}
|
||||
last = None
|
||||
# Katman denetimi (jev_denetim.py): Katman-1..3 cevabini Jev gecirmezse adimi siradaki katman yapar.
|
||||
# Katman-4 ve katman olmayan modeller sorulmaz.
|
||||
jev_sira = [] if ozet_tetik or rewriter is None or not jev_denetim.anahtar() else jev_denetim.sonrakiler(target)
|
||||
# Katman denetimi (jev_denetim.py): kopruye ugrayan HER ek modelin cevabi Jev'e sorulur; gecmezse adim
|
||||
# sirayla Katman-1 -> 2 -> 3 -> 4 yapar (secili model zaten katmansa ondan sonrakiler). Katman-4 sorulmadan
|
||||
# gecer. Katmanlar OmniRoute combolaridir: yedek her zaman AITURK gecidi (ide_route) uzerinden acilir,
|
||||
# secili model baska bir rotada olsa bile. Gecit yoksa denetim yapilmaz. Ozet isteginde ve aracsiz
|
||||
# (rewriter yok) yolda kapalidir.
|
||||
jev_rota = ROUTES.get(ide_route)
|
||||
jev_sira = ([] if ozet_tetik or rewriter is None or jev_rota is None or not jev_denetim.anahtar()
|
||||
else jev_denetim.sonrakiler(target))
|
||||
jev_istek = jev_denetim.son_istek(req) if jev_sira else ""
|
||||
|
||||
def jev_ac(ad):
|
||||
katman_req = json.loads(data)
|
||||
katman_req["model"] = ad
|
||||
jev_hdrs = {"Authorization": f"Bearer {jev_rota['key']}", "Content-Type": "application/json",
|
||||
"Accept": "text/event-stream", "User-Agent": UA}
|
||||
yanit = urllib.request.urlopen(urllib.request.Request(
|
||||
route["url"], data=json.dumps(katman_req, ensure_ascii=False).encode("utf-8"), headers=hdrs, method="POST"),
|
||||
jev_rota["url"], data=json.dumps(katman_req, ensure_ascii=False).encode("utf-8"), headers=jev_hdrs, method="POST"),
|
||||
timeout=UPSTREAM_IDLE_TIMEOUT)
|
||||
return (yanit, SseRewriter(custom, hedef=ad, tasma=self._tasma_ogren, aracsiz=self._aracsiz_ogren),
|
||||
f"[{n} {route_name.upper()} {slug}=>{ad}]")
|
||||
f"[{n} {slug}=>{ad}]")
|
||||
# A 9Router combo (Fusion-*, no provider prefix) runs a whole panel upstream. Once it may
|
||||
# have started (timeout, 504, cut stream) resending it runs and bills it twice (28 Sep 2026);
|
||||
# only failures before the work starts (no connection, 500/502/503/529) are retried.
|
||||
|
||||
Reference in new issue
Block a user