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

推荐订阅源

V
Visual Studio Blog
量子位
大猫的无限游戏
大猫的无限游戏
Hugging Face - Blog
Hugging Face - Blog
S
SegmentFault 最新的问题
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
Google DeepMind News
Google DeepMind News
小众软件
小众软件
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog
雷峰网
雷峰网
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell

Hacker News - Newest: "AI"

AI can't read an investor deck AI as an attorney? Student uses ChatGPT, Gemini to sue UW over alleged racial discrimination Hacking MCP Servers in AI Systems – The Rug Pull: Tool Changes After Approval GitHub - MeepCastana/KubeezCut: Free Web based video editor Can AI judge journalism? A Thiel-backed startup says yes, even if it risks chilling whistleblowers Coming soon: 10 Things That Matter in AI Right Now DARPA built an AI to fact-check enemy weapons claims What explains heterogeneity in AI adoption? When AI Meets Muscle: Context-Aware Electrical Stimulation Promises a New Way to Guide Human Movements - Department of Computer Science AI Changed How We Build. It Did Not Change What Matters. Linux rules on using AI-generated code - Copilot is OK, but humans must take 'full responsibility for the… Meta spins up AI version of Mark Zuckerberg to engage with employees Code Mode: Let Your AI Write Programs, Not Just Call Tools | TanStack Blog GitHub - Delavalom/graft: Go framework for building AI agents. Type-safe tools, multi-provider (OpenAI, Anthropic, Gemini, Bedrock), zero vendor SDKs. India's TCS tops estimates, says new AI models did not dent services demand Gen Z's fading AI hype Strong feeling: we are in a folded AI reality GitHub - machinarii/total-recall-catalog: A reference catalog of latest knowledge retrieval, memory & RAG systems GitHub - mensfeld/code-on-incus: Give each AI agent its own isolated machine with root, Docker, and systemd. Active defense detects and stops threats automatically.. Quantization, LoRA, and the 8% Problem: Benchmarking Local LLMs for Production AI Iran war: We spoke to the man making Lego-style AI videos that experts say are powerful propaganda Powell, Bessent discussed Anthropic's Mythos AI cyber threat with major U.S. banks GitHub - immartian/bellamem: Persistent belief-graph memory for AI agents. Retrieves decisive context by importance — not recency, not RAG, not /compact. recursive-mode: The Repo-Native Operating System for AI Engineering After the attack on Sam Altman's home, will AI CEO's go on the offensive? The biggest advance in AI since the LLM Opus 4.6 vs GPT 5.4 One Prompt Unity World Generation Test “AI polls” are fake polls Client Challenge Can AI be a 'child of God'? Inside Anthropic's meeting with Christian leaders
A cheaper and safer agentic AI workflow
Dan Gheorghe Haiduc · 2026-06-22 · via Hacker News - Newest: "AI"

I recently tried agentic coding for real. It cost $0.034 and finished in 3 minutes. It made two mistakes. In my personal human attempt, I took an hour, and made four mistakes.

Cheaper model services

I heard about GLM-5.2, and a lot of benchmarks are saying it's on par with the leading proprietary AIs of just 3 months ago. On the same benchmark site I had discovered GMI Cloud, a model service.

I created an account and received $5 in free credits last year. I see the minimum deposit is $10 nowadays. That's fine for me too.

I create an API key on their service.

I am not too keen on giving a Singaporean model hosted by a US company on data centers scattered throughout the world access to my private data. So I installed Debian in a VirtualBox image, and installed pi and the Guest Additions on it. Then I shared a copy of my project as a Shared Folder. Nothing else.

I configured pi and unleashed GLM-5.2 on the folder. 5 minutes and $0.435 later, the agentic sanity test worked. I asked it to look through various data files of various formats and create an index.tsv with information of interest. It did a perfect job.

Optimizing even further

So did Qwen3.6-35B-A3B-Q4_K_XL from Unsloth on my CPU, but it took more than an hour (and my time and interactivity is worth way more than $0.435 per hour). But how cheap could I go? Looking at what else GMI has to offer, DeepSeek V4 Flash catches my eye. It looks like it's a tiny bit more verbose than GLM-5.2, so the same number of tokens per task, but less than a 10th of the cost. Can it still perform my task?

I replace zai-org/GLM-5.2-FP8 with deepseek-ai/DeepSeek-V4-Flash and rerun the test.

Done in 3 minutes and $0.034. It shows a tiny bit of imperfection: it made 2 mistakes. Some irregular data series are shown as "daily" though they've got 5-ish-day and 2-ish-day periods. But other than that it's fine. I also noticed deepseek-ai/DeepSeek-V4-Pro, which is somewhere in the middle. Zero mistakes on my test, but took 2 mins 27s and $0.229. I think this is the one I will keep instead of GLM, but I will mostly use V4-Flash.

My ~/.pi/agent/models.json ended up like so:

{
  "providers": {
    "ollama": {
      "baseUrl": "https://api.gmi-serving.com/v1",
      "api": "openai-completions",
      "apiKey": "Almost free but not free. Very, very cheap.",
      "compat": {
        "supportsDeveloperRole": false,
        "supportsReasoningEffort": false
      },
      "models": [
            {
          "id": "deepseek-ai/DeepSeek-V4-Flash",
          "reasoning": true,
          "contextWindow": 262144
        },
            {
          "id": "deepseek-ai/DeepSeek-V4-Pro",
          "reasoning": true,
          "contextWindow": 262144
        }
      ]
    }
  }
}

Especially considering that I made 4 mistakes, and that it took me a bit more than an hour. Curse the mm/dd/yyyy format! It seems I have been thoroughly bested at that task. I feel like adjusting my career path and keeping up with the times.

Bonus: Go even cheaper: Every so often, my models stumbles into a huge one-line JSON, and runs up the token count filling up pi's 50KB DEFAULT_MAX_BYTES limit. I changed that limit to 5KB, significantly reducing input token count. There is a ticket to introduce this as a setting, but it was auto-closed. The files to modify (with the pi version as of writing this) are:

~/.local/share/pi-node/node-v22.22.3-linux-x64/lib/node_modules/@earendil-works/pi-coding-agent/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js
~/.local/share/pi-node/node-v22.22.3-linux-x64/lib/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/truncate.js

I modified both (not sure if I needed to). Prompt tokens for DeepSeek-V4-Flash went from 604k to 431k, and total cost went from $0.034 to $0.026 for my particular test.

The future

My work now changed significantly. No longer do I manually copy paste tiny code segments, instead I ask the agent what to do, then compare the agent's shared directory with the main one. I do this with PyCharm for its good diff directory interface, but you can do it with Meld as well.

So there you have it. I am reaping the AI rewards, while refusing to give in to vendor lock-in. I despise closed ecosystems and enshittification. When Anthropic started pushing for Claude Code exclusivity, I found that anticompetitive. Also, arbitrary and sudden price increases are reckless while open weights models are just a few months behind. They are desperately trying to extract value from rapidly devaluing models. If the breakneck pace slows down, their value evaporates. The moat they are trying to build is actually slowing themselves down.

The hardware is where it's at. Companies like GMI and DeepInfra provide flexible value. And the hardware depreciates in at least a few years, rather than 3 months. I don't know how to monetize models sustainably, however. Maybe crowdfunding? Non-profits? Public utilities like firefighters?

TL;DR / summary

  1. Get a model API — Create an account at GMI Cloud (or any provider like DeepInfra).
  2. Create an API key at their console.
  3. Isolate the environment (warmly recommended, for privacy) — Install Debian in VirtualBox (or any other sandbox you prefer).
  4. Install the agent — Inside the VM, install pi. Modify the hardcoded DEFAULT_MAX_BYTES.
  5. Configure the provider — Edit ~/.pi/agent/models.json to add an OpenAI-compatible provider pointing to the API endpoint.
  6. Run a sanity check — Give the agent a task and check results.
  7. Set up your review workflow - share a copy to the VM, and keep reviewing code between the two copies.
  8. ???
  9. Profit!