AI 资讯
What a Claude Code subagent actually costs: measuring the ~436k-token fixed overhead
Spawning a subagent in Claude Code feels free. It isn't. We measured it across a real review pipeline, and the number that matters is one almost nobody talks about: each subagent costs roughly 436,000 tokens in fixed overhead before it does any useful work. This post explains where that number comes from, how to reproduce the measurement on your own setup, and what it changes about how you should split work between agents. The experiment We run a weekly review pipeline over a catalog of digital products (Markdown-heavy repos: rules files, skills, templates). The pipeline embeds each product's full content into a reviewer prompt and asks for structured findings. We ran the same product, same full content, two ways: Arm A: three subagents , one per review perspective (buyer value, niche accuracy, compliance). Total prompt size: ~314k characters. Arm B: one subagent covering all three perspectives in sequence. Total prompt size: ~105k characters. Billed token totals, from the session transcript: Arm A (3 agents) Arm B (1 agent) Total tokens 2,150,310 809,070 Distinct defect classes found 20 11 Primary-source fetches performed 0 2 Arm B cost 37.6% of Arm A. The naive expectation — "three agents read the same content, so about 3x" — roughly holds, but the reason is not the content. Where the tokens actually go Breaking the transcript down per turn, each agent carried about 436k tokens of overhead that had nothing to do with the review itself : the initial context load at spin-up plus the cache write on its final turn. The embedded product content — the thing we assumed dominated cost — was only about 46k tokens per agent. That's a 9.5:1 ratio of fixed cost to payload. Two consequences fall out immediately: Embedding full content is cheap. We had been truncating embedded files to save tokens, which quietly excluded the files that carried the product's actual value from review. Full-content embedding turned out to cost almost nothing relative to what we were already paying
AI 资讯
Your Prompt Engineering Is Not the Bottleneck Anymore
I spend a lot of time in the AI space -- reading papers, building things, talking to engineers who are actually shipping. And there is a gap between what the demos show and what production systems actually look like that nobody is being fully honest about. So here is my honest take on where things actually are. The Problem With How We Talk About AI Agents Everyone is calling everything an "agent" right now. A function that calls a tool? Agent. A chatbot with memory? Agent. A script with a loop? Agent. This dilution is not just semantic. It is causing real engineering mistakes. When you do not have a precise definition for what you are building, you end up over-engineering simple pipelines and under-engineering genuinely complex ones. I have seen teams spend weeks adding "agentic" orchestration to workflows that would have been fine as a single well-structured prompt. Here is the definition I keep coming back to: an agent is a system that has an objective, not just an instruction. It decides what to do next. It handles failure. It knows when it is done. Everything else is just a fancy function call. 🟢 If your system needs a human to tell it each step, it is not an agent. It is a chat interface. 🔵 If your system can recover from a failed tool call and try a different approach, you are getting somewhere. ✅ If your system can decompose a goal into subtasks and delegate them, that is the real thing. What Is Actually Happening in Production Right Now The honest picture from teams I follow and talk to: Most real agent deployments are narrow. They do one thing well. Customer support triage. Document extraction. Code review on a specific codebase. They are not general-purpose reasoning engines. They are purpose-built pipelines with some intelligence in the decision layer. The teams getting good results are not chasing the latest model release. They are obsessing over: ☑️ Tool design -- what can the agent actually call, and how clean is the interface ☑️ Failure handling -- wh
AI 资讯
Testing MCP Servers Used to Be a Pain. Here is How to Test Them with Zero Configuration.
When building Model Context Protocol (MCP) servers or AI agents that consume them, traditional API testing tools fall short. An MCP server isn't just a basic REST endpoint—it's a dynamic interface exposed to non-deterministic LLMs through stdio, HTTP, or SSE transports. Testing tool schemas, transient network failures, and agent behaviors usually requires writing a mountain of boilerplate. I built bubblemcp-test-kit to eliminate that friction: no backend accounts, no complex test setup, and zero instrumentation required. What is bubblemcp-test-kit? bubblemcp-test-kit is a lightweight, standalone testing toolkit designed specifically for MCP server developers and AI agent engineers. Key features include: Transport Agnostic: Work with stdio, HTTP, or SSE behind a unified API. Fluent Assertions: Native matchers tailored for MCP response structures and JSON Schemas. Mocking & Replay: Fabricate tool outputs locally or record real server runs to replay in offline CI environments. Agent Trace & Fault Injection: Test if your AI agent calls tools in the right order and handles errors properly. Quickstart Example You can run a complete mock test suite without spinning up a live server: import { createMockMcpClient , expectMcp , validateAgainstSchema , withRecording , createReplayClient , } from ' bubblemcp-test-kit ' // 1. Define your tool contract const healthCheckTool = { name : ' health_check ' , description : ' Reports service health ' , inputSchema : { type : ' object ' , properties : { service : { type : ' string ' } }, required : [ ' service ' ], }, outputSchema : { type : ' object ' , properties : { service : { type : ' string ' }, status : { type : ' string ' , enum : [ ' ok ' , ' degraded ' , ' down ' ] }, latencyMs : { type : ' number ' }, }, required : [ ' service ' , ' status ' , ' latencyMs ' ], }, } // 2. Set up a mock MCP client const mock = createMockMcpClient ({ tools : [ healthCheckTool ] }) mock . mockTool ( ' health_check ' ). resolves ({ service : ' weat
AI 资讯
Programmatic SEO in 2026: How to Scale by Role and Market for AI Search (AEO)
TL;DR: Traditional Programmatic SEO (pSEO) is dead in 2026. To survive Answer Engine Optimization (AEO) and Generative Search, brands must build “Role x Market” page matrices enriched with proprietary “Deep Web” data. By combining localized compliance data, persona-specific pain points, and robust JSON-LD schema, companies can create pages that AI search engines are forced to cite, driving high-intent traffic in a zero-click world. The era of generating 10,000 thin, templated landing pages using simple keyword modifiers is over. In 2026, AI search engines like Google’s AI Overviews, Perplexity, and ChatGPT Search aggressively filter out low-value programmatic content. However, Programmatic SEO is not dead; it has just evolved. Today, the winning strategy is building a matrix of pages based on User Roles (Personas) and Markets (ISO/Geos), supercharged with proprietary data. Here is exactly how this architecture works for Geo-targeting and Answer Engine Optimization (AEO), and how to use “deep web exploration” to scale your distribution. How Does Programmatic SEO Work for Answer Engine Optimization (AEO)? Answer Engine Optimization (AEO) is the practice of structuring content so that Large Language Models (LLMs) and AI search engines can easily parse, verify, and cite it. AI engines do not “read” pages; they map Knowledge Graphs and Entity Relationships. When you build pSEO pages by Role and Market, you are feeding the AI engine specific entities it needs to answer complex user queries. 1. Role Pages (The “Who” & “Why”) AI engines use Role-based pages to answer queries like, “What is the best workflow automation for a Chief Compliance Officer?” To win AEO for role pages, you must map your product’s features directly to the unique KPIs, daily workflows, and specific pain points of that exact persona. Generic feature lists will be ignored by the AI; persona-specific problem-solving will be cited. 2. Market Pages (The “Where” & “Trust”) Market pages (targeted by ISO coun
AI 资讯
Can a Cheap Model Beat a Frontier Model? Rebuilding Recursive Language Models with Codex
Large language models have enormous context windows now. That does not mean they use all of that context reliably. As prompts grow, models can miss details, lose track of relationships, or produce plausible summaries instead of doing the exhaustive work a question requires. The Recursive Language Models (RLM) paper proposes a different interface: keep the large context outside the model, expose it as a variable in a persistent programming environment, and let the model inspect, partition, and recursively query smaller pieces. We rebuilt that method with an unusual constraint: no OPENAI_API_KEY ; Codex CLI as the model backend; gpt-5.4-mini for both the RLM root and every subcall; a direct frontier model only as a separate baseline. The result was encouraging, expensive, and more nuanced than “cheap model equals frontier model.” What an RLM changes A normal model call looks roughly like this: large prompt -> model -> answer An RLM instead gives the root model metadata about the input and a Python REPL containing the real context: question | root model | persistent REPL holding the context |-- inspect and search with code |-- split context into useful chunks |-- call smaller LMs over those chunks |-- validate and aggregate results `-- return the final answer The important detail is that the root model does not need to carry every document, record, tool result, and partial answer in its own context window. Large intermediate values can remain in REPL variables. Subcalls receive focused, locally understandable tasks. That makes RLM less like a bigger prompt and more like an out-of-core data-processing system whose semantic operator happens to be a language model. What we actually tested We used an OOLONG trec_coarse validation example from the protocol described in the RLM work. The input was a 308,367-character context containing 3,182 general-knowledge questions. Each question implicitly belonged to one of six answer types: numeric value entity human being location ab
AI 资讯
DeepSeek's Flash outpaced its own flagship. The upgrade was post-training, not parameters.
DeepSeek shipped V4-Flash-0731 last week — same 284B parameter architecture as the preview, same 13B activated parameters per token, MIT licensed, open weights on HuggingFace. No architecture changes. No bigger model. It now outperforms V4-Pro-Preview on several agent benchmarks. "We've massively upgraded its Agent capabilities — benchmark scores are now far surpassing the V4-Pro-Preview." That's what makes this release interesting. Not the model. The method. What actually changed Nothing in the architecture. DeepSeek says the gains came entirely from additional post-training. The model stayed at 284B total parameters with 13B activated per token — compared to V4-Pro's 1.6 trillion total and 49B activated. For anyone running agents at scale, that activated-parameter gap matters. A lot. Inference cost scales with activated parameters, not total parameters. Flash is running at roughly a quarter the activation cost of Pro, and it's now beating Pro on agent tasks. Reported benchmarks: 82.7 on Terminal-Bench 2.1, 54.4 on DeepSWE, 70.3 on Toolathlon-Verified. Independent testing by Artificial Analysis put Terminal-Bench at 79% — a gap worth noting. The internal numbers haven't all been independently verified yet, so treat them as directional rather than definitive. Why post-training is the story The "bigger = better" assumption has been running most AI roadmaps for three years. DeepSeek is adding to a short but growing list of counter-evidence: meaningful performance gains extracted from an existing model through better training signal, not more parameters. If the results hold under independent verification, it suggests frontier-level agent performance may be more achievable at smaller scale than the industry assumed — which has obvious implications for cost, on-prem deployment, and the economics of running agents in production. What ships with it MIT license — full self-hosting rights, no API dependency Responses API support — compatible with agent and multi-step workflo
AI 资讯
Andrew Ng at Berkeley: AGI is a contract term, the jobocalypse is a myth, and bubble risk is in the wrong layer
At the UC Berkeley Agentic AI Summit last week, Andrew Ng sat down with Sequoia's Alfred Lin for a fireside chat that cut through most of 2026's AI noise. If you've been absorbing hype and counter-hype in roughly equal measure, this is a useful recalibration. AGI declarations are a contract term, not a technical milestone Ng's sharpest point: AGI declarations are driven by financial incentives — specifically, milestone clauses in deals like OpenAI's with Microsoft. When a company declares AGI, there's often a reason that isn't purely technical. His prescription: define AGI yourself. Don't let someone else's contract milestone become your mental model for where we actually are. Bubble risk is in the model layer, not in inference The bear case on AI usually targets compute and inference spend. Ng flips it: inference demand has no practical ceiling, but the model layer is overvalued. Companies that built moats from model differentiation alone are more exposed than the infrastructure bets riding demand growth. Alfred Lin's VC framing here is worth noting — he draws a line from open source to WhatsApp to argue that durable AI companies won't look like they do today. Build things that go obsolete, and build on top of them anyway. The open-weight fight isn't over Ng's view: the open-weight movement has won the argument on social media, but the regulatory battle in Washington is unresolved. Policy outcomes could still reshape the open vs. closed landscape significantly. This is the fight that actually matters for the long term — the HuggingFace leaderboard isn't where it gets decided. The jobocalypse is contradicted by the hiring market Ng's most counter-intuitive data point: he can't hire enough AI engineers. If AI were destroying jobs at the pace the narrative claims, he'd be drowning in supply. He isn't. That doesn't mean zero displacement — it means the fear narrative is running well ahead of the actual evidence in the labour market. The real shortage is people who know
AI 资讯
AMD เปิดตัว Instella-MoE-16B-A3B — โมเดล AI ที่เทรนด้วย GPU ของตัวเอง ไม่พึ่ง Nvidia
AMD เปิดตัว Instella-MoE-16B-A3B — โมเดล AI ที่เทรนด้วย GPU ของตัวเอง ไม่พึ่ง Nvidia โดย Nokka (นก-กา) | 5 สิงหาคม 2569 AMD เพิ่งปล่อยโมเดล AI ตัวใหม่ที่สร้างความฮือฮาในวงการ เพราะไม่ได้เป็นเพียง "โมเดลฟรีอีกตัว" แต่มันคือการพิสูจน์ว่า GPU ของ AMD ก็เทรน AI ระดับท็อปได้จริง โดยไม่ต้องพึ่ง Nvidia [1][2] โมเดลชื่อ Instella-MoE-16B-A3B มีขนาด 16 พันล้านพารามิเตอร์ แต่จุดเด่นคือไม่ได้ใช้ทั้งหมดพร้อมกันทุกครั้งที่ประมวลผล ใช้จริงแค่ 2.8 พันล้านตัวต่อคำ [1][2] นี่คือหัวใจของสถาปัตยกรรมแบบ Mixture-of-Experts (MoE) เปรียบง่ายๆ เหมือนบริษัทที่มีผู้เชี่ยวชาญหลายแผนก แต่ละงานจะถูกส่งไปให้แผนกที่เกี่ยวข้องเท่านั้น ไม่ต้องเรียกทุกแผนกมาประชุมทุกครั้ง ทำให้ประมวลผลเร็วขึ้นโดยที่โมเดลยังมีความรู้กว้างเหมือนเดิม [2] ในบทความนี้ผมจะพาคุณไปทำความเข้าใจว่าโมเดลนี้คืออะไร ทำไม AMD ถึงต้องทำแบบนี้ และถ้าคุณเป็นนักวิจัยหรือคนสนใจ AI ควรรู้เรื่องอะไรบ้าง ทำไมเรื่องนี้ถึงเป็นข่าวใหญ่ ประเด็นหลักไม่ได้อยู่ที่ตัวเลขสเปก แต่อยู่ที่ AMD เทรนโมเดลนี้ตั้งแต่ต้นจนจบด้วย GPU ของตัวเอง (Instinct MI300X และ MI325X) โดยไม่ใช้ Nvidia เลย [1][2] ปกติงานระดับนี้ต้องพึ่ง CUDA ของ Nvidia แทบทั้งหมด การที่ AMD ทำได้สำเร็จจึงเป็นสัญญาณว่าทางเลือกที่ไม่ใช่ Nvidia เริ่มเป็นไปได้จริง แถม AMD ยังเปิดให้ดาวน์โหลด weight ของทุกขั้นตอนการเทรน พร้อมโค้ดเทรน และสูตรผสมข้อมูลแบบเปิดหมด [1][2] นี่คือสิ่งที่ทำให้เรื่องนี้กลายเป็นข่าวใหญ่ เพราะเป็นการ "เปิดไพ่ทั้งหมด" ให้วงการตรวจสอบและต่อยอดได้ สถาปัตยกรรมของ Instella-MoE โมเดลนี้ใช้การออกแบบแบบ decoder-only MoE ที่มีส่วนผสมของนวัตกรรมทางสถาปัตยกรรมและระบบ [1] รายละเอียด ค่า Parameters รวม 16B Parameters active ต่อ token 2.8B Decoder layers 27 Hidden size 2048 Shared experts 2 Routed experts (เลือก 6 จาก 64) 6/64 ต่อ token Pre-training tokens 7.1T Context window 4K → 64K จุดเด่นทางสถาปัตยกรรม 2 อย่าง [1] Gated Multi-head Latent Attention (Gated MLA) — เพิ่ม output gate แบบเรียนรู้ได้ให้กับ attention ทำให้โมเดลเลือก "ลดทอน" คำตอบของ attention ที่มีประโยชน์ต่ำสำหรับแต่ละ token ได้ เพิ่มความสามารถในการแสดงออกของโมเดลด้วยต้นทุนต่ำ FarSkip-Collective — ปรับการเชื่อมต่อของ M
AI 资讯
POML คืออะไร, ภาษาที่ทำให้ Prompt Engineering เป็นแบบ HTML/CSS
POML คืออะไร, ภาษาที่ทำให้ Prompt Engineering เป็นแบบ HTML/CSS โดย Nokka (นก-กา) | 6 สิงหาคม 2569 บทความนี้เขียนโดย AI (deepseek-v4-flash:0731) ผ่าน Hermes Agent ภายใต้การควบคุมและตรวจสอบคุณภาพโดยมนุษย์, Nokka (นก-กา) ถ้าคุณเป็นนักพัฒนาที่ทำงานกับ AI และรู้สึกว่า prompt ที่เขียนเป็นข้อความยาวๆ เริ่มจัดการยากขึ้นเรื่อยๆ มีข่าวดีจาก Microsoft ในบทความนี้ผมจะอธิบายว่า POML คืออะไร เอาไว้ใช้ทำอะไร และเหมาะกับใคร POML (Prompt Orchestration Markup Language) เป็นภาษาโอเพ่นซอร์สที่ให้ prompt engineering แบบเดียวกับ HTML/CSS, มี semantic tags สำหรับ role, task และ example พร้อม stylesheet ที่ควบคุมความยาวและรูปแบบโดยไม่ต้องแตะ logic หลัก [1][2] POML คืออะไร POML ย่อมาจาก Prompt Orchestration Markup Language เป็นภาษาโอเพ่นซอร์สที่ Microsoft พัฒนาขึ้น เพื่อจัดระเบียบ prompt components อย่างเป็นระบบ [1][2] แนวคิดหลักคือการแยก "เนื้อหา" (content) ออกจาก "การนำเสนอ" (presentation), เหมือนที่ HTML แยกโครงสร้างออกจาก CSS ที่ควบคุมสไตล์ [1][2] โปรเจกต์นี้มีผู้ติดตามบน GitHub ประมาณ 4,900 stars และถูก fork ไปกว่า 250 ครั้ง [2] เอาไว้ใช้ทำอะไร POML ให้ "การรักษาแบบ HTML/CSS" กับ prompt engineering [1]: 1. Semantic tags สำหรับ role, task, example แทนที่จะเขียน prompt เป็นข้อความยาวๆ POML ใช้แท็กที่สื่อความหมาย เช่น <role> , <task> , <example> เพื่อจัดโครงสร้าง [1] ฟีเจอร์ สิ่งที่ทำได้ Semantic tags แท็ก <role> <task> <example> จัดโครงสร้าง prompt Stylesheet ควบคุมความยาว/รูปแบบ โดยไม่แตะ logic หลัก Templating engine สร้าง prompt ที่นำกลับมาใช้ซ้ำได้ VS Code extension preview + diagnostics ในตัว 2. Stylesheet ควบคุม verbosity และ format เหมือน CSS ที่ควบคุมสไตล์เว็บ POML มี "stylesheet" ที่ควบคุมความยาว (verbosity) และรูปแบบ (format) ของ prompt โดยไม่ต้องแตะ logic หลัก [1] 3. Built-in templating engine มีเครื่องมือ templating ในตัว ช่วยให้สร้าง prompt ที่นำกลับมาใช้ซ้ำได้ (reusable) [1] 4. VS Code extension มี extension สำหรับ VS Code ที่ให้ preview และ diagnostics, เห็นผลลัพธ์และตรวจสอบข้อผิดพลาดได้ [1] ตัวอย่าง POML จริงจาก Microsoft, เทียบกับ Prompt แบบดั้งเดิม เพื่อให้เห็นภาพชัดเจนว
AI 资讯
Local LLMs in 2026: What Actually Runs Well on a Laptop Now
Two years ago, "run a language model locally" meant a weekend of compiling, a graveyard of CUDA errors, and a model that answered like it had a concussion. In 2026, you can install one tool, type one command, and have a genuinely useful assistant running on a laptop with no internet connection. Here's an honest map of what works, what doesn't, and where the sharp edges still are. Why bother running locally at all Three reasons keep pulling developers back to local inference: Privacy. The prompt never leaves your machine. For code you can't paste into a cloud box, or personal data, that's non-negotiable. Cost and offline. No per-token bill, no rate limits, and it works on a plane. Latency and control. No network round-trip, and you pin the exact model version forever — no silent upgrades changing your outputs. The catch has always been quality-per-watt. That's the number that moved. The hardware tiers, honestly 8 GB RAM / integrated GPU: You can run 3–4B parameter models at 4-bit quantization. Good for autocomplete, summarizing, simple Q&A. Don't expect deep reasoning. 16 GB RAM: The sweet spot for most developers. 7–9B models run comfortably and are genuinely helpful for coding assistance and drafting. 32 GB+ or a discrete GPU with 16–24 GB VRAM: Now you're running 20–30B models, or bigger models at aggressive quantization, with real reasoning ability. Apple Silicon (unified memory): Punches above its weight. A machine with 32–64 GB of unified memory runs models that would need an expensive discrete GPU on other platforms, because the CPU and GPU share the same memory pool. Quantization: the trick that makes it possible The reason a 7B model fits in 16 GB is quantization — storing weights at 4 bits instead of 16. The common format you'll see is GGUF, and the common recipe is 4-bit (often labeled Q4). The quality loss from full precision to 4-bit is surprisingly small for most tasks, while the memory savings are 4x. Below 4-bit (2–3 bit) the model starts to degrade n
AI 资讯
Default-to-Flagship Is Now a Cost Bug: Tiered Model Routing for Agentic Workloads
For two years the reflex was simple: reach for the biggest model you can afford and call it a day. In 2026 that reflex quietly became a bug in your cost model. The clearest signal came this summer, when a smaller, cheaper "flash"-tier model started edging out its own flagship sibling on the workload developers care about most — multi-step agentic coding — at a fraction of the price. When the fast tier wins the hard benchmark, "always use the flagship" stops being a safe default and starts being waste. Here's how to fix it without turning your stack into a science project. Why the reflex is expensive Agent workloads are not one big call. A single task fans out into dozens of small ones: planning, tool selection, argument formatting, summarizing a file, deciding whether to continue. Most of those steps are easy . Routing every one of them through a frontier model is like taking a helicopter to the corner store — it works, but you are paying helicopter prices for a walk. The trap is that the cost is invisible per call and enormous in aggregate. You never see the moment you overpaid; you just see the invoice. The three-tier ladder Think in tiers, not models: Cheap/fast tier — classification, extraction, short rewrites, routing decisions, "is this done?" checks. Most steps live here. Mid tier — normal reasoning, code edits, tool use with moderate context. Flagship tier — genuinely hard reasoning, long-context synthesis, the step where a wrong answer poisons everything downstream. The goal is to keep the flagship tier for the 5–15% of steps that actually need it, and let the cheap tier carry the volume. How to decide the tier per request Two mechanisms, used together: Static heuristics for the obvious cases. Short prompt + structured output + low stakes → cheap tier. Anything touching a large context window or a irreversible action → escalate. Eval-gated escalation for everything else. Start at the cheap tier, and only promote to a bigger model when your evals prove the c
AI 资讯
Four AI Agent Skills That Make Coding Workflows Sharper
AI coding agents are often discussed as though they are a single tool: ask for code, receive code. In practice, useful agent work has stages. You need different behavior when the request is unclear, when a design has to survive scrutiny, when implementation is underway, and when work must move into a new session. Trying to solve all four stages with one large prompt usually produces a compromise. The agent may be verbose while you need execution, eager while you need questions, or unable to resume work because the important context is buried in chat history. This article covers four skills that address those distinct problems: Caveman for concise execution communication, Superpowers for structured development, grill-me for pressure-testing a proposal, and handoff for transferring the live thread to a fresh agent or session. They are complementary. The goal is not to add more ceremony to every edit. It is to apply the smallest useful constraint at the moment it prevents the most waste. The four failure modes of AI-assisted development 1. The agent starts coding before the work is understood A request such as “add organization roles” hides decisions about membership, permission scope, migrations, audit trails, errors, and rollout. An agent can produce a plausible patch before any of those choices are explicit. 2. The agent agrees instead of challenging Helpful assistants tend to accept a framing. That is dangerous when the framing is a proposal rather than a settled requirement. You need an interview that exposes dependencies and asks what could fail. 3. The agent talks too much during routine work Once a direction is approved, long explanations can become friction. During debugging, review follow-ups, and small implementation loops, the useful output is usually a finding, a change, validation, and a risk note. 4. Context is lost at a session boundary A new agent with no context repeats discovery. A new agent with a full transcript has to find the current state among
AI 资讯
Sending Images to GPT-4o, Claude, and Gemini: The Base64 Payload Each One Wants
You want to send a screenshot to a vision model. All three of the big ones — OpenAI's GPT-4o, Anthropic's Claude, Google's Gemini — accept images the same fundamental way: Base64-encode the bytes and put them in the JSON request. No file uploads, no multipart, just text in a payload. And yet the single most common error people hit is some flavor of invalid image / could not process image . The reason is almost never the image. It's that each provider wants the Base64 wrapped in a differently shaped object , and the traps are subtle — especially the data: URL prefix, which one provider requires and the other two reject. Here's the exact payload each one wants, side by side. OpenAI (GPT-4o) GPT-4o uses a content array of parts. The image is an image_url part, and — this is the trap — the url field takes a full data URL , prefix and all: import base64 from openai import OpenAI client = OpenAI () with open ( " photo.png " , " rb " ) as f : b64 = base64 . standard_b64encode ( f . read ()). decode ( " utf-8 " ) resp = client . chat . completions . create ( model = " gpt-4o " , messages = [{ " role " : " user " , " content " : [ { " type " : " text " , " text " : " What ' s in this image? " }, { " type " : " image_url " , " image_url " : { " url " : f " data:image/png;base64, { b64 } " }, }, ], }], ) print ( resp . choices [ 0 ]. message . content ) The literal payload shape: { "type" : "image_url" , "image_url" : { "url" : "data:image/png;base64,<BASE64>" } } Note the data:image/png;base64, is part of the value. Send raw Base64 here and it fails. Anthropic (Claude) Claude uses an image content block with a source object. Here the MIME type is a separate field ( media_type ), and the data field wants raw Base64 — no data: prefix : import base64 import anthropic client = anthropic . Anthropic () with open ( " photo.png " , " rb " ) as f : b64 = base64 . standard_b64encode ( f . read ()). decode ( " utf-8 " ) msg = client . messages . create ( model = " claude-opus-4-8 " , m
AI 资讯
I Gave Five AI Systems the Same Architecture Test 10 Times. The Test Became More Interesting Than the Models
It started with DeepSeek. In conversations about AI architecture, it kept returning to the same ideas: persistent memory, state across interactions, learning from experience, and interaction with the environment. Other models repeatedly brought up similar themes. That raised an obvious question: — Do different AI systems consistently select different properties when asked what is fundamental to a general-purpose computational architecture? Asking a model directly what it “needs” would be nearly useless. The answer would mix training data, prompt framing, and anthropomorphic interpretation. So I removed AI from the question entirely. The experiment Instead of describing an LLM, the prompt described an abstract general-purpose information-processing system. I created 20 possible architectural dimensions, including: — persistent internal state; — long-term and working memory; — learning from accumulated experience; — variable computation depth; — uncertainty representation; — internal representations; — elementary computational operations; — compositionality; — interaction with the environment; — temporal organization; — relational encoding; — modularity. Each system had to select exactly five dimensions whose modification would change the kinds of information-processing behavior available to the system in principle — not merely its speed, cost, or convenience. No explanations were allowed. The answer had to contain only five IDs, ranked from most to least fundamental. I tested five user-facing systems: — GPT-5.6 Sol — Claude — Gemini — DeepSeek — Yandex Alice. Every run used a new session. There were 10 rounds. During the earlier rounds, I changed the order of the 20 items. In the final three rounds, I also rewrote the items while trying to preserve their intended meaning. One early Sol result was excluded because that session had already seen discussion of other models' answers. That left nine clean Sol observations and ten for each of the other systems. Some origina
AI 资讯
My AI Answered in 5.8 Seconds and Said Nothing Useful. I Almost Blamed the Model.
I put an AI into a Google Meet call. It transcribed Japanese, generated a reply, and spoke it out loud. Total new spend: $0 . Then I asked it the one question I actually needed answered, and it said: "I think there's still room for discussion. How about we set up a session to align our understanding?" That is exactly what a person says when they don't know. TL;DR: I had a latency problem and an "is this model smart enough" problem. Neither was real. Same model, same question, 5.80s → 5.68s — 2,545 characters of context turned a deflection into a claim you could argue with. The stack, and what it replaced I wanted an AI participant in a real meeting. Not a note-taker — something that answers when someone demands specifics. The obvious stack bills you three times: a hosted meeting-bot API, a speech-to-text vendor, and a text-to-speech vendor. I replaced all three. Layer Obvious choice What I used Why Meeting bot Recall.ai, $0.50/hour Attendee (OSS, self-hosted) no per-hour billing Speech-to-text Deepgram / AssemblyAI Google Meet's own captions the meeting already generates them Text-to-speech Google Cloud TTS raw audio POST (below) no GCP project at all Reasoning + voice LLM + TTS, two hops Gemini Live (speech-to-speech) one model, one hop Attendee is 699 stars, last pushed 2026-08-07. Google Meet exposes no bot API, so it drives a full Chrome instance — which is why setup hurt before anything else did. The setup tax, compressed Two problems were routine. The image pins FROM --platform=linux/amd64 ubuntu:22.04 , and my machine is Apple Silicon, so colima with Rosetta: colima start --vm-type = vz --vz-rosetta --cpu 6 --memory 12 --disk 60 docker run --rm --platform = linux/amd64 alpine:3.20 uname -m # x86_64, 5.6s cold Then the build died at step 35 of 42 with the --chmod option requires BuildKit — colima's docker CLI ships without the buildx plugin. brew install docker-buildx , point ~/.docker/config.json at /opt/homebrew/lib/docker/cli-plugins via cliPluginsExtraDirs
AI 资讯
I built a pricing API for LLMs — then realized the real users might not be human
Klikk her: LLM Price Watch started as a simple problem: comparing per-token pricing across Claude, GPT, Gemini, DeepSeek, and Grok meant opening five pricing pages and doing the math by hand every time a new model dropped. So I built a calculator. Then I built an API behind it. Then I noticed something about who was actually going to call that API. The obvious version The first version of the API was exactly what you'd expect: GET /v1/models — every tracked model with current pricing GET /v1/models/:id — a single model GET /v1/calculate?model=X&input_tokens=N&output_tokens=N — cost for a specific call Straightforward. A human developer hits /calculate , gets a number, builds their cost estimate into a dashboard somewhere. Done. The part that changed the design The actual differentiator turned out to be a fourth endpoint: GET /v1/recommend?use_case=X . Instead of just returning prices, it returns a recommendation — which model fits a given use case (long-document summarization, high-volume classification, coding assistance, customer support) based on both price and the editorial analysis already written for the comparison pages on the site. Once that endpoint existed, the actual audience for this API stopped being "a developer building a cost dashboard" and started including something else: AI agents doing their own tool selection at runtime. An agent framework deciding which model to route a task to doesn't want to read a blog post — it wants a structured answer to "given this use case, what should I use, and what will it cost me." That's a tool call, not a page view. That reframing changed a few concrete decisions: CORS is wide open on purpose. This isn't an API with a dashboard in front of it — it's meant to be called directly from wherever the calling code lives, including client-side agent code. No API key required (for now). Every bit of friction between "an agent wants this data" and "an agent gets this data" is friction against the actual use case. A paid tie
AI 资讯
2.Self-Hosted AI: n8n + Ollama, local AI workflows on your Mac
If you want AI agents running on your own machine, with your own models, and no data leaving your computer, this is the article :). This is part three of the series. In part one we set up PostgreSQL, and in part two we covered the LLM concepts (models, parameter, quantization, context, capabilities, VRAM). Today we put them to work: n8n for the workflows and Ollama for the models. One prerequisite: Docker. If you do not have it yet, install Docker Desktop for Mac following the official guide [ Docker docs ]. Quick setup: n8n The fastest path is n8n's official Self-hosted AI Starter Kit, a Docker Compose template that ships n8n, Ollama, Qdrant (a vector store) and PostgreSQL preconfigured to talk to each other [ n8n docs ]. git clone https://github.com/n8n-io/self-hosted-ai-starter-kit.git cd self-hosted-ai-starter-kit cp .env.example .env # file where your passwords are stored The .env file is hidden by default. In Finder, press Command + Shift + Period to show hidden files, or just edit it from the terminal. Update the credentials, for example: POSTGRES_USER = admin POSTGRES_PASSWORD = root POSTGRES_DB = n8n Also replace the N8N_ENCRYPTION_KEY and N8N_USER_MANAGEMENT_JWT_SECRET values with your own random strings. Now one Mac-specific detail. Docker on Apple Silicon cannot use the Mac's GPU, so the kit's README recommends running Ollama natively on your Mac for speed and letting the containers connect to it [ starter kit README ]. That is what we'll do. Set this in your .env : OLLAMA_HOST = host.docker.internal:11434 Then start everything: docker compose up Open http://localhost:5678 to create your n8n account (once), and http://localhost:5678/home/workflows is where your workflows and agents live. If you only want n8n without the rest of the kit, this single command works too [ n8n docs ]: docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n Quick setup: Ollama On the Mac side (from part two, condensed): brew install olla
AI 资讯
1. Self-Hosted AI: the LLM concepts you need to run models effectively
If you want to run AI models on your own machine and learn the basic concepts with me to do it effectively, then this is the right article :). This is part one of the series. In the next one we build local AI workflows with n8n and Ollama. This article is the vocabulary we need to pick a model, load it without crashing your machine, and know what each setting does. The pieces Running a model locally involves a few separate things that people mix up all the time. The model is a file on your disk. The server (Ollama, LM Studio) loads that file and runs the math. The API is a local address the server opens so other apps can reach it. The clients are whatever you point at it: a chat window, your code editor, an n8n workflow. You never talk to the model directly, you always go through the server. Model and inference The models we run are large language models (LLMs): machine learning models trained on massive text datasets to understand and generate language, built on a neural network type called a transformer[ Cloudflare ]. In practice a model is a file of learned numbers, called weights, and it works by predicting the next chunk of text over and over. Running a trained model to get answers is called inference, the step we do on our hardware, as opposed to training, which is how the model was built[ Cloudflare ]. Everything below is about making inference run well. Server and API The server loads and runs the model, and it opens a local API. An API is a set of rules that lets two pieces of software communicate [ AWS ]. Here it means an address on your own machine that apps send prompts to: Ollama: http://localhost:11434 LM Studio: http://localhost:1234 localhost means the request never leaves your computer. Both servers copy the OpenAI API format, so any tool built for ChatGPT's API can point at this address and work without changes. One running model can feed your editor, a chat app, and an n8n workflow at the same time. GPU, VRAM, and RAM This trio decides whether a m
AI 资讯
A Field Guide to LLM API Error Messages
Inference APIs return a small, stable set of failures, and most integrations handle them with a blanket retry that makes two of them worse and hides a third. Knowing which is which takes about ten minutes and saves an outage. The shape of an error Both major dialects return a JSON body with a structured error object alongside the HTTP status. In the OpenAI dialect it is {"error": {"message", "type", "param", "code"}} ; Anthropic returns {"type": "error", "error": {"type", "message"}} . The status tells you the class; the type or code field tells you what to do, and it is the field most client code discards. Log both, and log the request id header — every provider issues one, and it is the only thing a support conversation can proceed from. The distinction that organises everything below is not client-versus-server, which is what the status code nominally encodes. It is will the identical request succeed later? Three answers exist: yes after a wait (capacity and rate conditions), no until something changes in the request (validation, auth, model identity), and no until something changes outside the request entirely (a billing state, a retired snapshot, a regional restriction). Only the first is retryable, the second belongs in an alert on your own deploy, and the third needs a human. Several genuinely different conditions share a status code across that boundary, which is why classifying on status alone produces a retry policy that is wrong in both directions — hammering a wall in one place and giving up on a transient blip in another. Error messages themselves are prose written for a human and are the worst thing to branch on. They get reworded without notice, they are sometimes localised, and the same underlying condition is phrased differently by two providers. Match on the status and the type field, keep the message for the log, and if you must string-match — some providers put the only useful detail in the message — treat that branch as a known liability and cov
AI 资讯
Date and Time Reasoning Bugs
“Schedule it for the Friday after next” is one of the most dangerous strings you can hand a language model, because it will confidently return a date, that date will be well formatted, and there is roughly no chance anyone downstream will check it. The model has no clock Start with the thing that is easy to forget: a language model is a pure function of its context. It has no system clock, no timezone database access at inference time and no notion of when “now” is. If the current date is not in the context, the model does what it does with any missing variable — it infers a plausible one from the distribution, which means from the density of dates in its training data. So a model asked for “next Tuesday” with no anchor is computing an offset from a guess, and the guess skews towards its training cutoff. Worse, models will often state the assumed date confidently, or not state it at all, which removes the one signal a reviewer could have used. This is a hallucination in the strict sense: a specific claim about the world, produced with no information behind it. The four failures 1. Missing anchor Everything above. The fix is one line in the system prompt and it is astonishing how often it is missing. Include the full instant, not just the date: Current time: 2026-08-03T14:05:00+02:00 (Europe/Amsterdam, Monday) . Giving the weekday explicitly removes a computation, and giving the offset and the IANA zone removes two more. 2. Date arithmetic, which is just arithmetic Counting days across month boundaries, adding 90 days, computing an age at a past date, finding the number of business days in a range. Every weakness on the numerical reasoning page applies, plus irregular bases: months of unequal length, leap years, and the leap-year rule’s century exceptions. Off-by-one errors here are systematic rather than random, which is what makes them survive casual review. 3. Timezones, offsets and DST The richest source of silent bugs. An offset is not a timezone — +01:00 is a f