Files
aiturk-hermes-ide/apps/desktop/assets/codex-bridge
yilsemandClaude Opus 5.5 adf73eeedd fix(codex-link): summarize with a subscription model, reject tiny summaries, describe added models
Model switch lost the conversation: on 10 Oct a 1 MB thread was compacted by the
newly selected small model into 2201 characters. The compaction summary for a bridge
model is now written by a subscription model (ozet_kopru.ozet_modeli, default
gpt-6.1-sol); if that request is refused before it starts, the target model is used
as before. A summary far shorter than the conversation warrants is not accepted:
Codex gets response.failed and keeps the history.

The line under each added model no longer repeats its name. Teams show their
members, fallback chains their order, single models their provider and the traits
readable from the name; the text fits one phone row (30 characters).

Also normalizes tool call ids in the streamed response so Codex persists ids the
subscription backend accepts (fc_ -> ctc_), and bumps the bridge protocol to 6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 15:31:53 +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.