diff --git a/neode-ui/mock-backend.js b/neode-ui/mock-backend.js index 0a9877b8..8be75444 100755 --- a/neode-ui/mock-backend.js +++ b/neode-ui/mock-backend.js @@ -895,7 +895,8 @@ app.post('/rpc/v1', (req, res) => { case 'node-messages-received': case 'node.messages': - case 'node.notifications': { + case 'node.notifications': + case 'node-list-peers': { return res.json({ result: [] }) } @@ -1035,6 +1036,16 @@ app.post('/aiui/api/claude/*', (req, res) => { const body = req.body if (body) { if (!body.max_tokens) body.max_tokens = 4096 + // Fix model IDs — AIUI may send short names + if (body.model && !body.model.includes('-2')) { + const modelMap = { + 'claude-haiku-4.5': 'claude-haiku-4-5-20251001', + 'claude-haiku-4-5': 'claude-haiku-4-5-20251001', + 'claude-sonnet-4-5': 'claude-sonnet-4-5-20250514', + 'claude-sonnet-4.5': 'claude-sonnet-4-5-20250514', + } + if (modelMap[body.model]) body.model = modelMap[body.model] + } // Strip AIUI-specific fields that Anthropic API rejects delete body.webSearch delete body.webResults