# Payload Doctor: a private, offline AI that explains failing integration payloads

> Source: <https://dev.to/abbeywillblog/payload-doctor-a-private-offline-ai-that-explains-failing-integration-payloads-1lfg>
> Published: 2026-10-19 10:07:59+00:00

*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle](https://dev.to/challenges/hacktoberfest-week2-2026-10-12)*

**Payload Doctor** is a small tool for integration developers. You paste a failing JSON or XML payload and the error it produced, and a local AI model explains what went wrong and suggests a fix.

I work with enterprise integrations day to day, and one of the most common time sinks is staring at a rejected payload: a wrong date format, a missing field, a namespace mismatch, an expired token. The obvious shortcut is pasting it into a cloud chatbot, but integration payloads contain business data (customer names, emails, order details, credentials), and that data usually isn't yours to send to a third party.

The people who would pay for this are freelance integration consultants and small dev shops that work with client data and can't, or won't, paste it into a cloud AI. Payload Doctor gives them the speed of an AI assistant without the data leaving their laptop.

A local, private assistant for integration developers. Paste a failing JSON/XML payload and its error, and an open-weight model running on your own machine explains what went wrong and how to fix it.

`127.0.0.1` only.

```
# 1. Install Ollama (https://ollama.com), then pull a model
ollama pull qwen3.5:4b      # or a smaller one: llama3.2:3b

# 2. Run the app
npm install
npm start                            # http://127.0.0.1:3000
```

Options (environment variables): `MODEL` (default `qwen3.5:4b`), `PORT` (default `3000`), `OLLAMA_HOST` (default `http://127.0.0.1:11434`).

`src/redact.ts` masks secrets and personal data, using the same placeholder for the same value (`[EMAIL_1]`).` src/prompt.ts` builds the prompt and adds…`qwen3.5:4b`, an open-weight model, running locally through The model is only part of what makes it work. Most of the reliability comes from the code around it:

`JSON.parse` first and tells the model whether the payload is valid.`npm run eval` runs a file of test cases through the model and reports PASS or FAIL, so I can change the prompt or the model and see what happens.
The test cases cover problems I see often in integration work: a wrong date format with a missing required field, a trailing comma in JSON, a SOAP namespace mismatch, an upstream gateway timeout, and an expired auth token. All of them use fake data.

**Results:** 5 of 5 test cases passed on `qwen3.5:4b`, each on the first attempt with no retry needed.

**Where the small model struggled:** the answers were right from the start, but my first run was far too slow. Two cases took 107 and 179 seconds, and the SOAP namespace case hit my 180-second timeout and failed. The model was spending most of that time on hidden "thinking" before it replied. Because the model is open and runs locally, I could change that directly: I turned off its thinking mode and raised the request timeout. The same cases then ran in 31 to 42 seconds, and the SOAP case passed.

**Known limits:** redaction is pattern-based, so it won't catch things like names or account numbers. Treat the answer as a second opinion, not a verdict.

Because of what this tool is
