9router/open-sse
mustafabozkaya f3176b4b23 fix: implement json_schema fallback for OpenAI-compatible providers (#1343)
When json_schema response_format is sent to models that do not natively
support Structured Output (e.g. DeepSeek/Ollama/local LLMs via
openai-compatible-* providers), they often return empty or malformed
content.

Detect response_format.type === "json_schema", inject the schema into the
system prompt, and downgrade response_format to json_object so Structured
Output works transparently across openai-compatible providers.

Gated to provider.startsWith("openai-compatible-") so providers with
native Structured Output support are not downgraded.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-26 11:35:39 +07:00
..
config Fix codex 2026-05-26 11:35:39 +07:00
executors fix: implement json_schema fallback for OpenAI-compatible providers (#1343) 2026-05-26 11:35:39 +07:00
handlers fix(embeddings): forward Gemini output dimensions (#1366) 2026-05-23 09:23:26 +07:00
rtk feat(rtk): add Kiro format support for tool result compression (#1194) 2026-05-17 15:13:37 +07:00
services Refactor Tunnel 2026-05-26 11:35:39 +07:00
transformer feat: enhance request handling and error management in chatCore and streamToJsonConverter 2026-02-15 12:02:53 +07:00
translator Fix codex 2026-05-26 11:35:39 +07:00
utils Fix codex 2026-05-26 11:35:39 +07:00
.npmignore Update jsconfig.json and package.json to correct open-sse path references from relative to local directory. 2026-01-05 10:37:09 +07:00
index.js Refactor config 2026-03-12 16:20:46 +07:00