fix(aux): log sanitizer failures instead of silently swallowing them

Match the warning behavior of the parent main-agent path in
chat_completion_helpers.py — sanitizer failures should be visible
in logs, not silent.
This commit is contained in:
teknium1 2026-05-18 09:43:35 -07:00 committed by Teknium
parent 2fae8fba9c
commit 9cae9c0166

View file

@ -713,8 +713,11 @@ class _CodexCompletionsAdapter:
try:
from tools.schema_sanitizer import strip_pattern_and_format
tools, _ = strip_pattern_and_format(list(tools))
except Exception:
pass
except Exception as exc:
logger.warning(
"Auxiliary client: failed to sanitize tool schemas for "
"Codex/xAI Responses path: %s", exc,
)
converted = []
for t in tools:
fn = t.get("function", {}) if isinstance(t, dict) else {}