Skip to content

fix: tool-call schemas, predefined provider base_url, i18n#8166

Merged
qnixsynapse merged 4 commits into
release/v0.8.0from
fix/last-minute
May 20, 2026
Merged

fix: tool-call schemas, predefined provider base_url, i18n#8166
qnixsynapse merged 4 commits into
release/v0.8.0from
fix/last-minute

Conversation

@qnixsynapse
Copy link
Copy Markdown
Contributor

Describe Your Changes

  • Predefined providers no longer carry a user-editable base-url setting. The settings card was already hidden from the UI for predefined providers, so the per-provider base-url entry was vestigial data with two sources of truth — and that mismatch had already shipped a bug (Anthropic's base_url was …/v1 but the settings entry was without /v1). Top-level base_url is now authoritative for all predefined providers; custom providers added via "+" keep their editable base-url. Migration v14 overwrites stale persisted base_urls with the canonical constant and strips any leftover base-url setting.

  • Strip GBNF-incompatible format and pattern from tool input schemas. llama.cpp's json-schema-to-grammar emits PCRE shorthands (\d, \w, \s) when it sees format: date-time|date|time or any pattern using those escapes. GBNF rejects them ("error parsing grammar: unknown escape at \d\d"), grammar compilation fails, llama-server silently falls back to unconstrained generation, and tool-capable models (Qwen3 in particular) emit their native <tool_call> XML instead of OpenAI JSON. The downstream parser then reports a misleading "Failed to parse input at pos N". Fix is applied symmetrically in the TS client-side normalizer and the Rust proxy. Caught with caldav-mcp's create-event / update-event tools, whose recurrenceRule.until / start / end ship both a format and a redundant \d-laden pattern.

  • Drop the duplicate connectors i18n key. Every locale's common.json already carried mcp-servers with the right translation; the parallel connectors key was only used by the settings menu and was still rendering "Connectors" in English while every other locale had already been rewritten to "MCP Servers". Point SettingsMenu (and its test) at the canonical mcp-servers key and delete the redundant lines.

Fixes Issues

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

The base-url field was already hidden from the UI for predefined
providers, leaving the per-provider settings entry as vestigial data
with two sources of truth. Anthropic shipped with a /v1 mismatch
between top-level base_url and the settings value as a result.

Drop the base-url setting entry from all predefined providers; the
top-level base_url constant is now authoritative. Custom providers
added via "+" still carry an editable base-url. Migration v14
overwrites stale persisted base_urls with the canonical constant
and strips leftover base-url settings.
llama.cpp's json-schema-to-grammar emits PCRE shorthands (\d, \w, \s)
when it sees `format: date-time|date|time` or any `pattern` using those
escapes. GBNF rejects them with "error parsing grammar: unknown escape
at \d\d", grammar compilation fails, llama-server silently falls back
to unconstrained generation, and tool-capable models (e.g. Qwen3) emit
their native <tool_call> XML instead of OpenAI JSON. The downstream
OAI tool-call parser then reports a misleading "Failed to parse input
at pos N".

Strip those from tool input schemas in both the TS client-side
normalizer and its Rust proxy counterpart. The model still has the
type and description; only the unenforceable validation hints are
dropped, and only when they would have broken GBNF.

Caught with caldav-mcp's create-event/update-event tools, whose
recurrenceRule.until / start / end ship both `format: date-time` and
a redundant \d-laden pattern.
Each locale's common.json already carried `mcp-servers` with the right
translation; the parallel `connectors` key was only used by the
settings menu link and was still "Connectors" in en/common.json while
every other locale had already been rewritten to "MCP Servers". Point
SettingsMenu (and its test) at the canonical key and delete the
redundant lines.
@github-actions
Copy link
Copy Markdown
Contributor

Barecheck - Code coverage report

Total: 48.64%

Your code coverage diff: -0.07% ▾

Uncovered files and lines
FileLines
web-app/src/containers/SettingsMenu.tsx41-70, 115, 300-301, 311-314
web-app/src/hooks/useModelProvider.ts53, 84, 152-154, 175-176, 183, 185, 188-189, 221, 225-226, 233-242, 245-267, 334-344, 397-399, 509-513, 516-535, 620-622, 627-629, 719-720
web-app/src/lib/custom-chat-transport.ts321-322, 447-462, 470-498, 542-548, 551-552, 561-564, 566, 569-573, 575-578, 580-581, 584-586, 588-590, 592-609, 611-613, 616-619, 621, 623-638, 642-646, 648-675, 677-700, 702-703, 709-713, 715-718, 720-726, 728-734, 736-750, 768, 776-778, 782-788, 790, 792-795, 797-798, 800-803, 808, 810-819, 821-822, 826-840, 842, 849-854, 856-857, 859-860, 862-864, 866-870, 873-880, 883, 885-891, 893, 895, 897-905, 908-911, 913-918, 920-926, 929-935, 937-939, 941-968, 970-983, 987-991, 994-996, 998-1000, 1002-1010, 1012-1013, 1015-1022, 1024-1031, 1034-1035, 1040-1042, 1045-1046, 1049-1055, 1057-1074, 1076-1094, 1096-1111, 1114-1120, 1125-1127, 1129-1130, 1149-1169, 1184-1212, 1219-1235, 1247, 1266
web-app/src/routes/settings/providers/$providerName.tsx127, 129-131, 134-135, 137-139, 141-142, 164-166, 168, 170, 173-178, 180-182, 184-190, 195-196, 198-205, 207-208, 210-222, 224-225, 240-246, 252-254, 256-257, 311, 314, 347-350, 376, 378, 380, 395, 434-435, 447, 456-462, 480-481, 488-490, 517-527, 558-561, 563-568, 570-580, 631, 741-749, 782-783, 789-793, 819, 821-822, 888, 898-903, 905, 907, 918, 925, 1093-1094, 1214-1224, 1226, 1235-1238, 1240-1244, 1261-1263, 1265-1266, 1359-1368, 1370-1375, 1377, 1381-1385, 1387-1405, 1407-1410, 1412-1415, 1417, 1419-1423, 1425-1428, 1430-1433, 1435-1443, 1445-1448, 1450-1451, 1453, 1455-1465, 1467-1471, 1473, 1475-1476

@qnixsynapse qnixsynapse merged commit c342f9e into release/v0.8.0 May 20, 2026
16 checks passed
@qnixsynapse qnixsynapse deleted the fix/last-minute branch May 20, 2026 15:12
@github-project-automation github-project-automation Bot moved this to QA in Jan May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: QA

Development

Successfully merging this pull request may close these issues.

2 participants