feat(codex-bridge): add the models of 9Router's providers to Codex (beta.23)
Codex only received combos and the models named in the IDE config, so none of the models behind the providers added to 9Router showed up. Those single models are now always added; 9Router's combos stay hidden. The copy of the same model that comes through OmniRoute is still added only when the IDE config names it, so each model is listed once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HRDGW1LiKcDUZYUdKBoWYW
This commit is contained in:
1 parent
1e0f2f9aea
commit
bfd0ff196d
7 files changed
+25
-7
No files matched your search
@@ -26,7 +26,7 @@ from resim_context import resimleri_sadelestir
|
||||
import ide_catalog
|
||||
import ozet_kopru
|
||||
|
||||
SURUM = "3"
|
||||
SURUM = "4"
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
# Codex sends request bodies zstd-compressed. Python gained zstd in 3.14; for older
|
||||
|
||||
@@ -6,7 +6,8 @@ anahtar IDE'nin kendi .env dosyasindan her yenilemede okunur, bridge.json'a yazi
|
||||
Ac/kapat: %LOCALAPPDATA%\\TurkServis\\AITURK-IDE\\codex-baglama.json
|
||||
{"enabled": true, "kapsam": "ide"}
|
||||
Dosya yoksa ACIK sayilir (kullanici karari, 9 Ekim 2026: varsayilan acik).
|
||||
kapsam "ide" : IDE ayarinda tanimli modeller + adlandirilmis combolar (varsayilan)
|
||||
kapsam "ide" : IDE ayarinda tanimli modeller + 9Router'a eklenmis saglayicilarin modelleri +
|
||||
adlandirilmis combolar (varsayilan)
|
||||
kapsam "hepsi" : gecitteki butun sohbet modelleri (1000+; Codex listesi cok buyur)
|
||||
"""
|
||||
import json, os, re, urllib.request
|
||||
@@ -131,7 +132,11 @@ def sec(data, tanimli, kapsam="ide"):
|
||||
# 9Router kaynagi ve gecidin "9router" saglayicisi uzerinden gelen kopyalari.
|
||||
if combo and (ts.get("source") == "9router" or mid.lower().startswith("9router-")):
|
||||
continue
|
||||
if kapsam != "hepsi" and not combo and kisa.lower() not in tanimli and mid.lower() not in tanimli:
|
||||
# 9Router'a eklenmis saglayicilarin tekil modelleri her zaman eklenir (kullanici karari, 9 Ekim 2026:
|
||||
# "9Router'in combosu olmasin dedim, 9Router'in modeli olsun"). Ayni modelin OmniRoute uzerinden
|
||||
# gelen kopyasi yalniz IDE ayarinda tanimliysa eklenir; boylece her model listede bir kez durur.
|
||||
dokuz_model = not combo and ts.get("source") == "9router"
|
||||
if kapsam != "hepsi" and not combo and not dokuz_model and kisa.lower() not in tanimli and mid.lower() not in tanimli:
|
||||
continue
|
||||
gorulen.add(mid)
|
||||
secilen.append({"id": mid, "ad": gorunen, "sira": ts.get("order") or 0})
|
||||
|
||||
@@ -67,6 +67,19 @@ class Secim(unittest.TestCase):
|
||||
self.assertEqual([(x["id"], x["ad"]) for x in s],
|
||||
[("Takim-Agir", "Takim-Agir"), ("Ajan-Arac", "Ajan-Arac"), ("9router-nano-x", "nano/x")])
|
||||
|
||||
def test_9router_saglayici_modelleri_tanimsiz_da_olsa_eklenir(self):
|
||||
katalog = [girdi("9router-nano-x-aaaa1111", "nano/x", kaynak="9router", sira=1),
|
||||
girdi("9router-nano-x", "nano/x (2)", sira=2),
|
||||
girdi("9router-ocg-y-bbbb2222", "ocg/y", kaynak="9router", sira=3),
|
||||
girdi("vag-z", "vag/z", sira=4),
|
||||
girdi("9router-ses", "nano/ses", ("tts",), kaynak="9router", sira=5),
|
||||
girdi("9router-Takim-Agir-6e65dba5", "Takim-Agir", kaynak="9router", sira=6)]
|
||||
s = c.sec(katalog, [], "ide")
|
||||
# 9Router modelleri IDE ayarinda adi gecmese de gelir; OmniRoute kopyasi, OmniRoute'un kendi
|
||||
# saglayici modeli, sohbet olmayan model ve 9Router combosu gelmez.
|
||||
self.assertEqual([(x["id"], x["ad"]) for x in s],
|
||||
[("9router-nano-x-aaaa1111", "nano/x"), ("9router-ocg-y-bbbb2222", "ocg/y")])
|
||||
|
||||
def test_gorunen_ad_yalniz_saglayici_ve_model(self):
|
||||
for tam, beklenen in [("OmniRoute · ag/gemini-3.8-flash", "ag/gemini-3.8-flash"),
|
||||
("nano/qwen/qwen3.8-27b-obliterated:thinking", "nano/qwen3.8-27b-obliterated:thinking"),
|
||||
|
||||
@@ -27,7 +27,7 @@ export const CODEX_LINK_REFRESH_URL = `${CODEX_LINK_ORIGIN}/aiturk/codex-baglama
|
||||
export const CODEX_LINK_MARKER = '# AITURK IDE Codex Baglama'
|
||||
// Must equal SURUM in assets/codex-bridge/bridge.py; a running bridge that reports
|
||||
// another version is restarted so an updated IDE never keeps an old bridge alive.
|
||||
export const CODEX_BRIDGE_VERSION = '3'
|
||||
export const CODEX_BRIDGE_VERSION = '4'
|
||||
export const CODEX_LINK_LINE = `openai_base_url = "${CODEX_LINK_ORIGIN}/backend-api/codex" ${CODEX_LINK_MARKER}`
|
||||
|
||||
export const CODEX_LINK_RUN_KEY = 'HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run'
|
||||
|
||||
@@ -21,7 +21,7 @@ const PATHS: CodexLinkPaths = {
|
||||
}
|
||||
|
||||
const BRIDGE_JSON = `${PATHS.bridgeHome}\\bridge.json`
|
||||
const STATUS_OK = { ok: true, surum: '3', ide_durum: 'tamam', ide_model: 7, ozet: true }
|
||||
const STATUS_OK = { ok: true, surum: '4', ide_durum: 'tamam', ide_model: 7, ozet: true }
|
||||
const USER_CONFIG = 'model = "gpt-6"\r\n\r\n[features]\r\nweb = true\r\n'
|
||||
|
||||
interface World {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "aiturk-ide",
|
||||
"productName": "AITURK IDE",
|
||||
"private": true,
|
||||
"version": "1.0.0-beta.22",
|
||||
"version": "1.0.0-beta.23",
|
||||
"description": "TurkServis resmi yapay zekâ geliştirme ortamı. Hermes Agent tabanlıdır.",
|
||||
"author": "AITURK / TurkServis",
|
||||
"repository": {
|
||||
|
||||
Generated
+1
-1
@@ -65,7 +65,7 @@
|
||||
},
|
||||
"apps/desktop": {
|
||||
"name": "aiturk-ide",
|
||||
"version": "1.0.0-beta.22",
|
||||
"version": "1.0.0-beta.23",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@assistant-ui/core": "0.2.23",
|
||||
|
||||
Reference in new issue
Block a user