# Iam 12 .My AI Mentor Was Broken. Groq Killed It. Here Is How I Fixed It on a $150 Phone in 72 Hours.

> Source: <https://dev.to/koda2026/iam-12-my-ai-mentor-was-broken-groq-killed-it-here-is-how-i-fixed-it-on-a-150-phone-in-72-hours-1m0c>
> Published: 2026-09-30 13:35:16+00:00

I am 12 years old. 

My development machine is a POCO C55 ($150). 

I live in Tamil Nadu, India. 

Three days ago, KODA wasn’t a “scam.” It was just **dead**. 

My Cloudflare Worker returned 502 errors. My API keys leaked in screenshots. My Markdown renderer destroyed C++ code blocks. And when I finally got it running, Groq retired my model (`llama-3.3-70b-versatile`) mid-launch, leaving me with silent 404s and zero answers. 

Strangers didn’t call me out because they hated kids. They called me out because the product was visibly broken.

Today, KODA v24 is live. It has Live Web Search. It survives model deprecations automatically. It renders Markdown perfectly. And it speaks every language on Earth.

This is not a redemption arc. This is an engineering post-mortem. Here is exactly how I went from **Chaos** to **Command**.

People see "$150" and think "weak." 

They are wrong. Constraints force optimization. 

While funded startups burn cash on bloated wrappers, I had to make every millisecond count. That’s why KODA doesn’t just "work." It performs:

Claude (Anthropic) reviewed this architecture last month. He didn’t say "good for a kid." He said:

*"This is genuinely impressive. Not impressive for a thirteen-year-old. Just impressive, period."*

*"I have seen aerospace engineers struggle with log-space Bayesian calculations."*

He respected the engineering because the engineering was real.

When I handed over the initial v23 report, I claimed: *"Frontend is DONE AND TESTED."* 

That was a lie. Or rather, an optimism bias.

Upon deep inspection, I found:

`innerHTML`. Anyone could inject scripts.`#include <stdio.h>` inside code blocks into `<h3>` headers. It was destroying C++ tutorials.`createNewChat()` failed, the app still tried to insert messages against a `null` conversation ID, cluttering the database.`textContent` + `escapeHtml()`. Zero injection points remain.`**bold**` works outside code, but `#hash` stays safe inside it.`state.messages` so they persist across renders. Users see exactly what went wrong.
The root cause of the outage was simple: **Cloud providers retire models.** 

Groq killed `llama-3.3-70b-versatile`. I needed a new brain, fast. 

I didn't just swap one model for another. I built a resilience layer.

``` js
const MODELS = [
  'openai/gpt-oss-120b', // Primary: Current Flagship
  'openai/gpt-oss-20b',  // Secondary: Fast/Lightweight
  'qwen/qwen3-32b'       // Tertiary: Open Source Alternative
];

// Logic: Try Primary. If 404/5xx, auto-retry Next. User sees nothing.
```

Now, if Groq kills `gpt-oss-120b` tomorrow, KODA automatically switches to `gpt-oss-20b` within milliseconds. The user never knows. 

How do you debug a Cloudflare Worker on a phone? 

You don't use CLI tools. You use the **Dashboard**.

`{"error":{"message":"The model llama-3.3-70b-versatile does not exist..."}}`
**Lesson:** Never trust your own status report. Test before you claim. And always build a health check endpoint (`GET /`) that confirms secrets are loaded.

Before this update, I asked KODA: *"What is the latest React version?"*

It confidently replied: *"React 19.3 was released September 9, 2026."* 

It cited sources like `【1†L1-L4】`. 

**Fake.** Hallucinated. Dangerous. 

Without live data, LLMs guess. With live data, they know.

`TAVILY_API_KEY` secret.`webSearch: true` is sent from frontend:
`[WEB_RESULTS]`.`[1]`, `[2]`.
Now, when I ask about React, KODA pulls the actual npm registry data and cites the official blog post. No more guessing.

| Metric | Value | 
|---|---|
| Days from Broken to Stable | 3 | 
| Critical Bugs Fixed | 8 (incl. 2 XSS) | 
| New Features Added | 20+ (Voice, Edit, Regenerate, Theme) | 
| Languages Supported | 9 (EN, HI, TA, ZH, ES, JA, RU, PT, AR) | 
| Lines of Worker Code | ~280 | 
| Hardware Used | 1 Phone | 
| Model Deprecations Survived | 2 | 

People ask why I bother building on a POCO C55. Why not use a MacBook?

Because constraints force creativity.

Age doesn't matter. Device doesn't matter. Location doesn't matter.

**Resilience matters.**

KODA v24 is live. The fallback chain is armed. The web search is on. The XSS holes are sealed.

Try it here: [koda-aicodementor.netlify.app](https://koda-aicodementor.netlify.app/)

Break it if you can. I’ll be watching the logs. 🐯
