Skip to content

armgit / Cairn

Public Imported from GitHub
0

Cairn is a general-purpose AI state-space search engine, validated first on autonomous penetration testing. Sometimes misspelled as Carin.

fix: switch codex healthcheck to chat completions

leixiao113e14cadeba
diff --git a/cairn/src/cairn/dispatcher/workers/adapters/codex.py b/cairn/src/cairn/dispatcher/workers/adapters/codex.py
index 166a4ef..f0440be 100644
--- a/cairn/src/cairn/dispatcher/workers/adapters/codex.py
+++ b/cairn/src/cairn/dispatcher/workers/adapters/codex.py
@@ -94,7 +94,7 @@ class CodexDriver(RegexSessionDriver):
@staticmethod
def _healthcheck_url(worker: WorkerConfig) -> str:
- return f"{worker.env['CODEX_BASE_URL']}/responses"
+ return f"{worker.env['CODEX_BASE_URL']}/chat/completions"
@staticmethod
def _healthcheck_headers(worker: WorkerConfig) -> list[str]:
@@ -108,7 +108,7 @@ class CodexDriver(RegexSessionDriver):
@staticmethod
def _healthcheck_payload(worker: WorkerConfig) -> str:
return (
- '{"input":[{"content":"ping","role":"user"}],'
+ '{"messages":[{"role":"user","content":"ping"}],'
'"model":"'
+ worker.env["CODEX_MODEL"]
+ '","stream":false}'