feat(assistant): optimize MCP and custom widget authoring

This commit is contained in:
ajnart committed 2026-08-30 18:41:05 +02:00
1 parent 8d8dec5749
commit b49f6b5631
93 files changed
+6718 -1859

No files matched your search

+8 -1
View File
@@ -72,7 +72,14 @@ const server = createServer(async (request, response) => {
const webSearchTools = body.tools?.filter((tool) => tool.type === "openrouter:web_search") ?? [];
if (
webSearchTools.length > 1 ||
webSearchTools.some((tool) => tool.parameters?.max_results !== 5 || tool.parameters?.max_uses !== 3)
webSearchTools.some(
(tool) =>
tool.parameters?.max_results !== 5 ||
tool.parameters?.max_uses !== 3 ||
tool.parameters?.max_total_results !== 10 ||
tool.parameters?.max_characters !== 2500 ||
tool.parameters?.search_context_size !== "low",
)
) {
json(response, 400, { error: { message: "Unbounded web search controls reached the upstream" } });
return;