diff --git a/neode-ui/mock-backend.js b/neode-ui/mock-backend.js index 397896b7..0a9877b8 100755 --- a/neode-ui/mock-backend.js +++ b/neode-ui/mock-backend.js @@ -1031,10 +1031,14 @@ app.post('/aiui/api/claude/*', (req, res) => { const apiPath = '/' + req.params[0] - // Ensure max_tokens is set — Claude API requires it but AIUI may omit it + // Clean request body for Anthropic API const body = req.body - if (body && !body.max_tokens) { - body.max_tokens = 4096 + if (body) { + if (!body.max_tokens) body.max_tokens = 4096 + // Strip AIUI-specific fields that Anthropic API rejects + delete body.webSearch + delete body.webResults + delete body.context } const bodyStr = JSON.stringify(body)