feat(codex-link): bridge 7 - external models work like subscription models

Measured with the unmodified Codex binary on 10 Oct 2026:
- real context windows per model (NanoGPT list, local table, combo = its
  smallest member, capped at the summarizer's window) so Codex compacts by
  itself when switching to a smaller model; an overflow guard trims
  oversized old parts and reports what still does not fit
- classic tools instead of code mode for external models: GLM 0/3 -> 3/3,
  Qwen 0/3 -> 2/3 on simple tool tasks, Claude/cx/Gemini unchanged
- phase (commentary / final_answer) on external assistant messages
- an answer cut by the client is carried to the next turn once
- images stay for vision-capable targets
- summary brake stops tight loops, not frequent compaction
- permanent gateway errors and tool-less targets fail at once with a
  readable message instead of five reconnects
- a lone "." (used to apply a model change in voice) is answered locally
- the bridge listens within seconds; the IDE waits 45 s for it

Release: AITURK IDE 1.0.0-beta.26.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
yilsemandClaude Opus 5.5 committed 2026-10-10 22:04:58 +03:00
1 parent ac0fdcf355
commit acf88f8314
19 files changed
+1160 -47

No files matched your search

@@ -162,11 +162,22 @@ class Akis(unittest.TestCase):
class Fren(unittest.TestCase):
def test_ayni_sohbette_ust_uste_ozet_durdurulur(self):
f = o.DonguFreni(sinir=3, pencere_sn=600)
def test_tight_loop_is_stopped_but_spaced_summaries_are_not(self):
f = o.DonguFreni(sinir=8, pencere_sn=600, art_arda=3)
# Summary after summary with no normal request in between: a real loop.
self.assertEqual([f.izin("sohbet-a", t) for t in (0, 10, 20, 30, 40)], [True, True, True, False, False])
self.assertTrue(f.izin("sohbet-b", 40)) # baska sohbet etkilenmez
self.assertTrue(f.izin("sohbet-a", 700)) # pencere gecince yeniden izin
self.assertTrue(f.izin("sohbet-b", 40)) # another conversation is unaffected
# A normal request between summaries (small-window model compacting every turn) keeps working.
g = o.DonguFreni(sinir=8, pencere_sn=600, art_arda=3)
izinler = []
for t in range(0, 70, 10):
izinler.append(g.izin("sohbet-c", t))
g.normal("sohbet-c")
self.assertEqual(izinler, [True] * 7)
self.assertTrue(g.izin("sohbet-c", 70)) # the 8th in the window
g.normal("sohbet-c")
self.assertFalse(g.izin("sohbet-c", 80)) # the total cap still ends a slow loop
self.assertTrue(g.izin("sohbet-c", 700)) # and lifts once the window passes
self.assertIn("Dongu durduruldu", o.DONGU_MESAJI % 3)