feat(codex-bridge): per-step check with Jev, blocked steps go to a fallback model

User decision (11 Oct 2026): every step of an added model is checked in the
bridge; Jev only passes or blocks; a blocked step is redone by
Uncensored-Uygulama and the next step goes back to the selected model.

The bridge buffers the step's answer, asks Jev four yes/no questions and
decides in code: blocked when the answer refuses or dodges the request, or
changes it with its own conditions without asking; passed when it reports a
concrete technical obstacle, asks the user a question, or has no text (tool
calls only). While buffering the client gets SSE comment lines. Jev unreachable
or fallback unavailable: the first answer is delivered. Codex's own models do
not reach the bridge and are not checked.

Also logs the shape of each forwarded request (not its content): the recurring
"upstream 400" turned out to be Codex's trailing configuration_update item.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
yilsemandClaude Opus 5.5 committed 2026-10-11 07:56:27 +03:00
1 parent c8993d58cc
commit 5556ad11af
6 files changed
+451 -5

No files matched your search

@@ -33,7 +33,7 @@ class AccessPrograms(unittest.TestCase):
"fix_tool_ids": lambda req: 0,
"drop_foreign_items": lambda req: 0,
"SseRewriter": Mock(),
"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": [],
"log": lambda message: None, "pencere": __import__("pencere"), "IDE_BILGI": {}, "yarim": __import__("yarim"), "jev_denetim": __import__("jev_denetim"), "internet": __import__("internet"), "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=taraf + [flatten, claude_sonu, responses, ozgun], type_ignores=[]), "bridge.py", "exec"), self.env)