9router/open-sse/translator/response
Hamsa_M 315dcaa37a
fix: strip empty Read pages argument in OpenAI-to-Claude translator (#1354)
Some OpenAI-compatible providers emit optional string tool parameters
as empty strings (e.g. pages: "") instead of omitting them. Claude
Code rejects pages: "" as invalid, breaking the Read tool for
non-PDF files routed through 9router.

Add sanitizeToolArguments() that parses tool-call arguments and
removes known optional empty-string fields before emitting
input_json_delta back to Claude format. Currently handles the
Read tool pages field specifically.

Includes regression test.

Fixes #1278

Co-authored-by: JoJo <noreply@github.com>
2026-05-23 09:27:13 +07:00
..
claude-to-openai.js fix(claude-to-openai): emit closing </think> tag instead of empty reasoning_content (#454) 2026-03-31 09:21:11 +07:00
commandcode-to-openai.js feat: enhance CommandCode integration with improved message handling 2026-05-07 23:02:07 +07:00
cursor-to-openai.js feat(cursor): Add cursor Provider 2026-02-05 11:06:20 +07:00
gemini-to-openai.js fix(translator): correct thought signatures for AG, Gemini CLI, Vertex; fix missing Vertex response translator 2026-04-05 00:38:36 +07:00
kiro-to-openai.js https://github.com/decolua/9router/pull/1167 2026-05-16 11:20:08 +07:00
ollama-to-openai.js feat(ollama): Enhance Ollama support by adding new models, updating API format handling, and integrating translation functionality. 2026-03-12 15:24:10 +07:00
openai-responses.js Fix bug 2026-04-11 11:36:33 +07:00
openai-to-antigravity.js Fix Bug 2026-03-30 12:21:24 +07:00
openai-to-claude.js fix: strip empty Read pages argument in OpenAI-to-Claude translator (#1354) 2026-05-23 09:27:13 +07:00