From 00ad7a42f54f5075b16419ccdd2a2e8e643e9ae8 Mon Sep 17 00:00:00 2001 From: Dorian Date: Sun, 8 Mar 2026 00:27:34 +0000 Subject: [PATCH] fix: map AIUI model IDs and add node-list-peers stub MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Map claude-haiku-4.5 → claude-haiku-4-5-20251001 in proxy - Map claude-sonnet-4.5 → claude-sonnet-4-5-20250514 in proxy - Add node-list-peers RPC stub (returns empty array) Co-Authored-By: Claude Opus 4.6 --- neode-ui/mock-backend.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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