Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Decode the mock's request bodies as UTF-8 across chunks

Fei241151c2575a178e
diff --git a/ds-bot/dev/mock-llm.mjs b/ds-bot/dev/mock-llm.mjs
index d249d44b..5a3be0c5 100644
--- a/ds-bot/dev/mock-llm.mjs
+++ b/ds-bot/dev/mock-llm.mjs
@@ -554,6 +554,7 @@ function sse(res, payload) {
// An Ollama-shaped search API, for checking a `searchApis` entry declared in config.
function searchApi(req, res) {
let raw = ''
+ req.setEncoding('utf8')
req.on('data', chunk => { raw += chunk })
req.on('end', () => {
const body = JSON.parse(raw || '{}')
@@ -571,6 +572,7 @@ const server = createServer((req, res) => {
return
}
let raw = ''
+ req.setEncoding('utf8')
req.on('data', chunk => { raw += chunk })
req.on('end', () => {
const body = JSON.parse(raw)