惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
GRAHAM CLULEY
T
Tenable Blog
Know Your Adversary
Know Your Adversary
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Privacy International News Feed
S
Security Affairs
NISL@THU
NISL@THU
O
OpenAI News
Attack and Defense Labs
Attack and Defense Labs
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
Schneier on Security
Schneier on Security
S
SegmentFault 最新的问题
S
Schneier on Security
G
Google Developers Blog
V
V2EX
C
Check Point Blog
U
Unit 42
Google DeepMind News
Google DeepMind News
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
T
The Exploit Database - CXSecurity.com
Recent Announcements
Recent Announcements
M
MIT News - Artificial intelligence
S
Secure Thoughts
博客园 - 司徒正美
Recorded Future
Recorded Future
P
Proofpoint News Feed
Spread Privacy
Spread Privacy
K
Kaspersky official blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
AI
AI
博客园 - 聂微东
N
News and Events Feed by Topic
SecWiki News
SecWiki News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
Vulnerabilities – Threatpost
P
Palo Alto Networks Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Engineering at Meta
Engineering at Meta
Recent Commits to openclaw:main
Recent Commits to openclaw:main
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
The Hacker News
The Hacker News
The Last Watchdog
The Last Watchdog
Project Zero
Project Zero
W
WeLiveSecurity
博客园 - Franky

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
I Was About to Quit Ollama — Then I Deleted One File and Never Looked Back
James Jeremy · 2026-05-03 · via DEV Community

I Was About to Quit Ollama — Then I Deleted One File and Never Looked Back

Last month I almost quit using Ollama entirely. Not because it was slow. Not because the models were bad. Because I was tired of editing the same JSON file for the 47th time.

The Breaking Point

Here's what my evenings looked like:

ollama pull qwen2.5-coder:1.5b — cool, new model.

Then: open ~/.pi/agent/models.json. Scroll to the ollama.models array. Add { "id": "qwen2.5-coder:1.5b" }. Save. Restart pi. Test if it works. It works. Great.

ollama pull gemma3:12b — another one.

Same dance. Same file. Same restart.

ollama pull deepseek-v4-pro — bigger, more interesting.

Same. Fucking. Dance.

By model #12 in a single week, I started dreading the process. Not the models — the paperwork. I was spending more time filling out JSON IDs than actually coding with them. And I started noticing something worse: every time I had to restart pi, I lost my context. My train of thought. The thing I was actually trying to do.

That's when I realized: this isn't a model problem. This is a friction problem.

And friction at the discovery layer kills experimentation dead.

The "Why Doesn't This Exist?" Moment

I assumed someone had already solved this. pi had a concept called "extensions" — dynamic provider registration. I searched the docs, the Discord, npm. Nothing auto-discovered from Ollama's API.

Maybe I missed it. Maybe it's buried somewhere. I asked in the pi Discord. Crickets.

Quick context: this whole thing happened because I was trying something new.

For the past few months I'd been using OpenCode daily. It's solid — inline edits, web search, browser automation, the whole IDE-integrated workflow. I even had ohmyopenagent set up for custom agent behaviors. It felt like having a senior dev sitting next to me who could also Google things and operate a browser. I got used to it. It became my default.

But I kept hearing about pi — this weird minimal terminal harness that looked nothing like what I was used to. No GUI panels. No file tree sidebar. Just a TTY and a blinking cursor. People on Discord kept mentioning it like it was a secret weapon. I was skeptical. Honestly, I thought it sounded like a step backward. Why would I trade an IDE integration for a terminal?

Curiosity won. I installed it on a whim one weekend. Just to confirm my suspicion that it was overhyped.

The first thing that struck me was speed. pi opens in under a second. No electron window, no plugin loading, no "indexing your project." Just — instant. Compared to OpenCode's feature-rich setup — web search, browser automation, ohmyopenagent plugins, the whole IDE integration — pi felt almost comically lightweight. But that lightness turned out to be the point.

The second thing was the session tree. I could fork my conversation at any point, try a different approach, and jump back without losing anything. OpenCode had threads, but this felt different. More like Git branches for your thinking.

Then I found the extension system. Drop a .ts file in a directory and the agent loads it immediately. No npm init. No webpack. No build step. The code runs directly. I tested it by writing a 5-line extension that added a custom command. It worked on the first try. I stared at the terminal and realized this was a completely different category of tool.

That Sunday afternoon — it was raining, I remember because I was annoyed about that too — I was literally just exploring pi's features. Poking around. Not planning to build anything. I discovered you could register providers dynamically at runtime. The docs said pi.registerProvider("ollama", {...}) and I thought: what if I could make ollama pull and pi open into one contiguous action?

Like they were actually connected.

I wasn't planning to build anything that day. I was just trying a new tool. But pi's extension model made it so frictionless that I couldn't resist. I pulled up extensions/index.ts. No plan. No research. No coffee left. Just pure spite-driven development.

The 2-Hour Spite Build (That Actually Took 5 Hours)

I started with the dumbest thing that could work. Five minutes. Maybe ten.

// fetch /api/tags, map names, register provider
const res = await fetch("http://localhost:11434/api/tags");
const { models } = await res.json();
pi.registerProvider("ollama", {
  models: models.map((m) => ({ id: m.name })),
});

Enter fullscreen mode Exit fullscreen mode

It worked. First try. I stared at pi's model list and there they were. All of them. Without touching JSON.

I felt this weird mix of satisfaction and anger. Satisfaction because it worked. Anger because I'd been doing it the hard way for months.

Then reality hit.

Hour 1: Some setups don't expose /api/tags. They only have the OpenAI-compatible /v1/models. So I added a fallback chain. Try one, if it fails, try the other. If both fail, panic (gracefully).

Hour 2: pi startup froze when Ollama wasn't running. Because the extension was waiting for a fetch that would never complete. I had to flip the whole architecture: register from cache immediately (synchronous, never blocks), then kick off live discovery in the background. This meant I was dealing with race conditions between cache registration and live registration. The provider registration API replaces the old one, which is fine, but I had to make sure the user didn't see a flicker or an empty list. Took three attempts to get it smooth.

Hour 3: /api/show returned capabilities: ["vision"] for one of my models. Great, it supports images. I tried sending an image. It failed. The model choked. Ollama's metadata was lying. So I built /ollama-fix — a guided override where you pick a model, pick what's wrong, and it saves a persistent fix. Then /ollama-info to inspect what the final config actually looks like after all overrides.

Hour 4: A friend DMed me. He runs Ollama behind a proxy with three API keys. When one hits rate limits, he manually switches to the next. I added key rotation. Automatic failover on 401/403. I didn't even have this problem myself, but I could feel his pain through the screen.

By dinner I had 800 lines of TypeScript that made my original problem feel ridiculous. I kept thinking: why did I wait this long?

The Architecture Nobody Asked For (But I Needed)

extensions/
├── index.ts         # Cache-first bootstrap — pi opens instantly
├── discovery.ts     # Two APIs, one fallback chain
├── provider.ts      # Mutable state, clean registration
├── config.ts        # env → file → models.json → defaults
├── cache.ts         # Offline survival
├── overrides.ts     # When Ollama lies about capabilities
├── commands.ts      # /ollama-setup /ollama-refresh /ollama-status
├── setup-wizard.ts  # Arrow-key TUI, zero typing required
└── types.ts         # Types I wish I'd written first

Enter fullscreen mode Exit fullscreen mode

The part that still shocks me: zero runtime dependencies.

No Axios. No Lodash. No framework. No utility belt. Just Node.js built-ins and fetch.

Why? Because pi extensions run in the user's Node process. Every dependency is a supply-chain risk that you can't control. I don't want my extension to break because someone upstream published a bad semver minor. I want this thing to still work in 3 years even if half of npm goes down.

My devDependencies are tiny: tsx to run tests, c8 for coverage, prettier so I don't have to think about formatting, and @types/node. That's it. Nothing ships to users.

The Test of "Will I Actually Use This?"

I uninstalled my old manual config. Deleted the models array from my models.json. Forced myself to rely on the extension. Cold turkey.

Day 1: Pulled qwen3-coder:480b, glm-4.7, and nemotron-3-super. All appeared in /model the second pi opened. I smiled. Like, genuinely smiled. I felt like I'd hacked the system.

Day 2: Tried to pull a vision model and test it. It failed on images. /ollama-fix → override input to ["text", "image"] → save → /ollama-refresh. Worked. I didn't have to touch a config file. I just answered questions.

Day 3: Ollama wasn't running. I'd forgotten to start it after a reboot. The extension didn't crash. Didn't hang. It fell back to cache, registered the stale models, and put a little warning in the status. I kept working for 2 hours before I noticed Ollama was still off. When I started it and ran /ollama-refresh, the live models replaced the cached ones instantly. Seamless.

Day 7: Switched from local to a remote endpoint. Usually this means editing a JSON file, copying a URL, praying I didn't typo it. Instead: /ollama-setup → arrow keys to "Base URL" → type the URL → "Test connection" → it verified → "Save & discover" → done. Felt like cheating.

Day 14: A friend asked how I managed my models. I sent him the install command. He ran it. It worked. He didn't ask me anything. That's when I knew it was real — not because I built it, but because it worked without me explaining it.

The Numbers

  • 800 lines of TypeScript
  • 0 runtime dependencies
  • 0 build steps (pi runs .ts directly via tsx)
  • 62 unit tests using only node:test + node:assert
  • 39 models auto-discovered from my local Ollama right now
  • 1 JSON file I haven't touched in 2 weeks

What I Learned (The Hard Way)

1. Cache is not a luxury — it's survival.

Without cache, every network hiccup means zero models and a broken workflow. You can't code. With cache, you get slightly stale data and full productivity. I made cache the primary registration path and live discovery the background upgrade. It feels backwards if you think about it, but it's the only way to never block the user.

2. Interactive UI beats config files by an order of magnitude.

I started with env vars and JSON editing because that's what "serious" tools do. Then I built /ollama-setup — an arrow-key TUI. I thought it was just a convenience. It's not. It's a different category of experience. I use it constantly. Manual JSON editing? Zero times since I built this. I don't even know where my models.json is anymore.

3. Zero dependencies isn't minimalism — it's durability.

The fewer packages you rely on, the longer your code works without maintenance. This extension will work in 2028 even if nobody touches it. That's not aesthetic. That's practical.

4. The best tools don't add features — they remove steps.

This extension does one thing: it deletes the "edit models.json" step from your life. That's it. Everything else is just making that deletion reliable.

Try It (If You Also Hate JSON Maintenance)

# One command
pi install npm:@jamesjfoong/pi-ollama

# Or test drive without installing
pi -e npm:@jamesjfoong/pi-ollama

Enter fullscreen mode Exit fullscreen mode

Then in pi:

  • /ollama-status — see your models
  • /ollama-setup — configure endpoint without touching files
  • /ollama-refresh — update without restart
  • /ollama-fix — correct model capabilities when Ollama metadata is wrong

What's Next

I'm exploring a few things, but I'm being careful not to bloat it:

  • Team model sync: Share model overrides across a team via a URL you can drop in a config
  • Local usage stats: Track which models you actually use (everything stays local, zero telemetry)
  • Model recommendations: Suggest models based on what you're trying to do

If this saves you from config hell like it saved me, sponsoring the project helps me justify more time on spite-driven tooling. Or just star the repo — that's free and also genuinely helpful.



What config file are you tired of editing? I'm collecting pain points for the next zero-maintenance extension.