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
Add "text" to Codex Responses API allowlist so text.format.json_schema
reaches upstream for structured outputs instead of being stripped.
Co-authored-by: Cursor <cursoragent@cursor.com>