Files
9router/open-sse/utils
anhtran-ai 781c18d837 fix(codex): strip Unicode-property tool schema patterns Codex rejects
Codex's /responses validator has no Unicode property escapes, so a tool
`pattern` containing `\p{...}` 400s the whole request with `Invalid schema
for function ... is not a 'regex'` — identically on every account, costing a
full combo failover per turn (#3922).

- Add open-sse/utils/codexToolSchema.js: copy-on-write walk that drops only
  `pattern` values carrying a property escape, returning the original
  reference when nothing changed so the caller's schema stays intact for a
  retry against another provider
- Treat `properties` keys as property names, so a field literally called
  `pattern` is never read as the schema keyword; skip escaped literals via
  backslash-parity counting
- Apply it in normalizeCodexTools for both function and namespace sub-tool
  parameters, and log the strip count via dbg
- Add three cases to tests/unit/codex-tool-normalization.test.js
2026-09-10 22:25:47 +07:00
..
2026-05-26 11:35:39 +07:00
2026-05-26 23:09:19 +07:00
2026-05-12 09:19:50 +07:00