fix(codex-bridge): do nothing at all for Codex's own models

User, 11 Oct 2026: 'If you pick Codex and write to Codex, our bridge cannot be
beside it even to help.' The last touch is gone too: traces an added model or
the bridge left earlier in the chat are no longer cleaned on the way to
chatgpt.com. The request goes out byte for byte.

Known consequence: a chat that used an added model, or still carries a
bridge-made summary, may be refused by chatgpt.com on Codex's own model; such a
chat continues on the added models.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
yilsemandClaude Opus 5.5 committed 2026-10-11 05:27:54 +03:00
1 parent 12eeec7b0f
commit c0eee2cc2a
2 files changed
+22 -29

No files matched your search

+10 -24
View File
@@ -1272,30 +1272,16 @@ class H(http.server.BaseHTTPRequestHandler):
f"Bundan sonraki işleri {sonuc['ad']} yapacak; hangi model diye sorulursa bunu söyle.{donus}") f"Bundan sonraki işleri {sonuc['ad']} yapacak; hangi model diye sorulursa bunu söyle.{donus}")
def _ozgun(self, n, path, body, req, slug): def _ozgun(self, n, path, body, req, slug):
"""Codex'in kendi (abonelik) modeli. Kullanici karari (11 Ekim 2026): "Codex kendi modelini kullanirken """Codex'in kendi (abonelik) modeli: kopru HICBIR SEY yapmaz, istek chatgpt.com'a bayt bayt oldugu gibi gider.
kopruyle bir bagi olmamali. Codex kendi modelinden kendi modeline gectigi zaman kopruyle bir bagi olmamali. Kullanici karari (11 Ekim 2026): "Codex kendi modelini kullanirken kopruyle bir bagi olmamali ... Codex'in
Codex'in kendi modeline dokunulmamali." Istek chatgpt.com'a OLDUGU GIBI gider: model komutu, nokta kendi modeline dokunulmamali" ve "Codex'i secip Codex'e yaziyorsan bizim kopru yardim amacli bile yaninda
karsilama, bilgi notu, is hatti talimati, yarim cevap notu ve sikistirmaya karisma YOK. Sikistirmayi Codex olamaz." Bu yuzden model komutu, nokta karsilama, bilgi notu, is hatti talimati, yarim cevap notu,
kendisi OpenAI'de yapar (olcum 11 Ekim 2026: kopru ozgun modelde ozeti kendi uretmeye calisip dort kez sikistirmaya karisma ve koprunun kendi izlerini temizleme de YOKTUR; sikistirmayi Codex kendisi yapar
"ozet uretilemedi" verdi, Codex "Error running remote compact task" ile takildi). (olcum 11 Ekim 2026: kopru ozgun modelde ozeti kendi uretmeye calisip Codex'i "Error running remote compact
task" ile takti).
Tek dokunus koprunun KENDI izleridir ve yalniz sohbette daha once ek model kullanildiysa olur: ek modelin Bilinen sonuc: ayni sohbette daha once ek model kullanildiysa ya da kopru ozeti kaldiysa chatgpt.com bu
urettigi yabanci kimlikler ve koprunun urettigi duz metin ozet ogeleri. Bunlar kalirsa chatgpt.com istegi istegi reddedebilir; o sohbet ek modellerle surer, Codex'in kendi modeli icin yeni sohbet acilir."""
reddeder ("Item ... not found"). Iz yoksa govde bayt bayt ayni kalir.""" return self._passthrough(n, path, body, tagname=f"CHATGPT {slug}", rewritten=False)
fixed = atilan = acilan = 0
try:
fixed = fix_tool_ids(req)
atilan = drop_foreign_items(req)
if (CFG.get("ozet_kopru") or {}).get("enabled", False):
acilan = ozet_kopru.ozetleri_ac(req, yabanci_hedef=False)["acilan"]
if fixed or atilan or acilan:
body = json.dumps(req, ensure_ascii=False).encode("utf-8")
log(f"[{n} CHATGPT {slug}] kopru izleri temizlendi: {fixed} arac kimligi, {atilan} yabanci oge, "
f"{acilan} kopru ozeti")
except Exception as e:
fixed = atilan = acilan = 0 # govde degismeden gider
log(f"[{n} CHATGPT {slug}] kopru izi temizligi atlandi, istek oldugu gibi gidiyor: {type(e).__name__}: {e}")
return self._passthrough(n, path, body, tagname=f"CHATGPT {slug}", rewritten=bool(fixed or atilan or acilan))
def _responses(self, n, path, body): def _responses(self, n, path, body):
try: try:
@@ -298,12 +298,19 @@ class Zincir(unittest.TestCase):
self.assertFalse(kwargs["rewritten"]) self.assertFalse(kwargs["rewritten"])
self.assertEqual(self.env["YONLENDIRME"].veri, {}) self.assertEqual(self.env["YONLENDIRME"].veri, {})
def test_only_the_bridges_own_traces_are_cleaned_for_codex_own_model(self): def test_the_bridge_does_not_even_help_codex_own_model(self):
self.env["fix_tool_ids"] = lambda req: 2 # ids left behind by an added model earlier in the chat """'If you pick Codex and write to Codex, our bridge cannot be beside it even to help.' Traces an added
fake, body = self.send("gpt-6-astra", [user("devam")]) model or the bridge left earlier in the chat are not cleaned either: the body goes out byte for byte."""
self.env["CFG"]["ozet_kopru"] = {"enabled": True, "kapsam": "hepsi"}
self.env["fix_tool_ids"] = Mock(return_value=2)
self.env["drop_foreign_items"] = Mock(return_value=3)
summary = ozet_kopru.ozet_ogesi("eski köprü özeti", "t")
fake, body = self.send("gpt-6-astra", [summary, {"type": "reasoning", "id": "rs_chatcmpl-x"}, user("devam")])
args, kwargs = fake._passthrough.call_args args, kwargs = fake._passthrough.call_args
self.assertTrue(kwargs["rewritten"]) self.assertEqual(args[2], body)
self.assertEqual(json.loads(args[2]), json.loads(body)) self.assertFalse(kwargs["rewritten"])
self.env["fix_tool_ids"].assert_not_called()
self.env["drop_foreign_items"].assert_not_called()
fake._yerel_yanit.assert_not_called() fake._yerel_yanit.assert_not_called()
def test_voice_switch_stays_among_the_added_models(self): def test_voice_switch_stays_among_the_added_models(self):