fix(codex-bridge): leave Codex's own models alone

User decision, 11 Oct 2026: Codex's own (subscription) models are one side,
the models we add are the other. A request for one of Codex's own models now
goes to chatgpt.com as it is: no model command, lone-dot answer, info note,
work-line instruction, half-answer note or compaction handling. Codex compacts
those chats itself; the bridge making the summary on gpt-6-astra failed four
times this morning and left Codex with 'Error running remote compact task'.

Only the bridge's own traces are still cleaned (foreign ids and bridge-made
summaries left by an added model earlier in the same chat); without any, the
body is byte-identical.

Voice switching stays among the added models. Asking for one of Codex's own
models by voice is answered with how to do it: pick it in the model picker and
send a lone dot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
yilsemandClaude Opus 5.5 committed 2026-10-11 05:16:26 +03:00
1 parent dd5f99c406
commit 12eeec7b0f
5 files changed
+139 -77

No files matched your search

@@ -15,6 +15,8 @@ flatten = next(n for n in source.body if isinstance(n, ast.FunctionDef) and n.na
claude_sonu = next(n for n in source.body if isinstance(n, ast.FunctionDef) and n.name == "claude_sonu_duzelt")
handler = next(n for n in source.body if isinstance(n, ast.ClassDef) and n.name == "H")
responses = next(n for n in handler.body if isinstance(n, ast.FunctionDef) and n.name == "_responses")
ozgun = next(n for n in handler.body if isinstance(n, ast.FunctionDef) and n.name == "_ozgun")
taraf = [n for n in source.body if isinstance(n, ast.FunctionDef) and n.name in ("ek_model_mu", "yonlendirilen")]
class AccessPrograms(unittest.TestCase):
@@ -34,7 +36,7 @@ class AccessPrograms(unittest.TestCase):
"log": lambda message: None, "pencere": __import__("pencere"), "IDE_BILGI": {}, "yarim": __import__("yarim"), "is_hatti": __import__("is_hatti"), "GORULEN_ISTEMCI": set(), "arac_semalarini_duzelt": lambda req: 0, "nokta_mesaji_mi": lambda req: False, "EXTRA_MODELS": [],
"DEBUG": False, "UA": "test", "RETRIES": 1, "UPSTREAM_IDLE_TIMEOUT": 3900,
}
exec(compile(ast.Module(body=[flatten, claude_sonu, responses], type_ignores=[]), "bridge.py", "exec"), self.env)
exec(compile(ast.Module(body=taraf + [flatten, claude_sonu, responses, ozgun], type_ignores=[]), "bridge.py", "exec"), self.env)
def request(self, model):
return {"model": model, "access_programs": {"cyber": "standard"},
@@ -74,8 +76,10 @@ class AccessPrograms(unittest.TestCase):
def test_chatgpt_passthrough_preserves_original_body(self):
body = json.dumps(self.request("gpt-6-astra")).encode()
fake = Mock(headers={})
fake._ozgun = lambda *a: self.env["_ozgun"](fake, *a)
self.env["_responses"](fake, 1, "/responses", body)
self.assertEqual(fake._passthrough.call_args.args[2], body)
self.assertFalse(fake._passthrough.call_args.kwargs["rewritten"])
self.upstream.assert_not_called()