Files
hermes-agent/tests
Chris Danis bc98ea5f03 schema_sanitizer: strip pattern and format from tool schemas for llama.cpp compatibility
llama.cpp's json-schema-to-grammar converter doesn't support standard JSON Schema
pattern/escape syntax (e.g. "\d{4,4}"), causing HTTP 400 errors when MCP servers
expose tool definitions with date-time or other regex patterns.

These fields are purely descriptive hints for LLM prompting — the actual runtime
validation happens on the Python side via the MCP tool's type checking, so dropping
them is safe.

- Add pattern/format stripping to _sanitize_node() in schema_sanitizer.py
- Add 3 tests: string pattern stripped, format stripped, nested anyOf stripped
2026-05-04 21:08:13 -07:00
..