Files
aiturk-hermes-ide/apps/desktop/assets/codex-bridge
yilsemandClaude Opus 5.5 9739222919 fix(codex-link): only reject degenerate summaries, not short correct ones
The size-proportional minimum (input/250, cap 4000) rejected a correct summary:
a 646,955 byte thread (225k tokens, five labelled facts in a long log) was
summarized by the subscription model in 1501-1701 characters, the bridge demanded
2587, and Codex could not continue the thread on the selected model. The floor now
only catches broken output (input/2000, cap 300). Memory loss is prevented by who
writes the summary, not by its length.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 15:52:44 +03:00
..

AITURK IDE Codex bridge

Local HTTP proxy that AITURK IDE's Settings → Codex Bağlama runs for OpenAI Codex (desktop or CLI) on the same computer. Standard-library Python only; it runs on the agent venv's interpreter and keeps running after the IDE window closes, because Codex depends on it while openai_base_url points here.

  • bridge.py: the proxy. Subscription models go to chatgpt.com unchanged; ide/<id> models go to the AITURK gateway configured in the agent's config.yaml, with the key read from the agent's .env on every catalog refresh (never written elsewhere).
  • ide_catalog.py: which IDE models and combos are added to Codex's model list and how they are named (provider/model, combos by bare name). The public /models catalog supplies every OmniRoute chat model; a member does not need a private local model allowlist. /router/catalog supplies only the kind metadata used for sorting, never additional model IDs. Direct 9Router entries and internal 9Router combos are excluded. Combos sort A–Z first, then individual models by provider and name, including OpenAI subscription models. Codex labels the first visible row isDefault; a saved model selection remains unchanged. A failed or empty refresh keeps the last successful catalog.
  • ozet_kopru.py: conversation summaries are produced as plain text, so a summary made by one provider stays readable after the user switches to another.
  • gemini_context.py, resim_context.py: request fixes for routed models.

Run: python bridge.py --home <data dir> --hermes-home <agent home>. The IDE writes <data dir>/bridge.json and reads GET /aiturk/codex-baglama/status; POST /aiturk/codex-baglama/stop ends the process.

Tests: python -m unittest discover in this directory.