eval: add Codex OAuth parity comparison

This commit is contained in:
jxxghp
2026-09-11 09:50:56 +08:00
parent 556543023f
commit cca0dd4a6c
15 changed files with 543 additions and 46 deletions

View File

@@ -223,7 +223,10 @@ async def _run_codex(scenario_id: str, settings: ModelSettings, executable: str,
failure = result.get("error_type")
except (RuntimeError, TimeoutError, OSError) as error:
failure = type(error).__name__
local_tokens = (proxy.bearer_token, server.bearer_token)
local_tokens = tuple(
value for value in (proxy.bearer_token, server.bearer_token, settings.account_id)
if isinstance(value, str) and value
)
usage = proxy.snapshot()
server_stats = server.stats
skill_sha256 = server.skill_sha256
@@ -252,7 +255,9 @@ async def _run_codex(scenario_id: str, settings: ModelSettings, executable: str,
report["task_passed"] = report["passed"]
report["passed"] = bool(report["passed"] and completed and result.get("returncode") == 0 and not failure)
report["probe_ready"] = bool(probe_only and not failure and _probe_ready(usage, server_stats))
checked: dict[str, Any] = _validate_report(_redact(report, local_tokens), settings.api_key)
checked: dict[str, Any] = _validate_report(
_redact(report, local_tokens), settings.api_key, settings.account_id,
)
checked["native_stderr_sha256"] = hashlib.sha256(checked["native_stderr"].encode()).hexdigest()
return checked