AI features
Building AI into your own app: calling a model safely, streaming replies, tool calling, structured output, embeddings and RAG — and keeping the bill under control.
61 posts · page 1 of 3
"You Exceeded Your Current Quota" (OpenAI 429): What It Means and How to Fix It
OpenAI's insufficient_quota error signals a billing or usage-limit problem. How to distinguish exhausted credits, project and organization spend limits, and real rate limits; use the right API key; and prevent repeat failures.
Hybrid Search in Postgres: Full-Text + pgvector With Reciprocal Rank Fusion
Keyword search finds exact terms; vector search finds meaning. Hybrid search combines both for better results in RAG and site search. How to build it in plain Postgres with a tsvector column, a pgvector embedding column, and reciprocal rank fusion — with the full SQL, indexes, and tuning tips.
Gemini API: New Antigravity Agent Version, Gemini 3.8 Flash GA and Model Deprecations
Google's Gemini API replaced antigravity-preview-05-2026 with antigravity-preview-09-2026 on 17 September (the old version shut down on 5 October), made Gemini 3.8 Flash generally available on 2 September, limited Gemini 2.5 access to recent users, and deprecated gemini-3.1-flash-image. What developers need to change.
Cloudflare AI Gateway Auto Router: Let the Gateway Pick the Model
Cloudflare's AI Gateway Auto Router, announced in Birthday Week 2026 and free in beta, classifies each request at the edge and routes it to a suitable model — cheap models for simple tasks, frontier models for hard ones — by setting the model to cloudflare/auto. How it works, the savings claims, and the trade-offs of automatic model routing.
Claude Sonnet 5.5 Released — and Its Cache Reads Just Got Cheaper
Claude Sonnet 5.5 arrived on 28 September 2026 at $2/$10 per million tokens, available on the Claude API, Bedrock, Google Cloud and Microsoft Foundry. On 7 October its prompt-cache read price was halved to $0.10. The breaking changes from Sonnet 5, and what it means for apps and Claude Code users.
Claude Sonnet 4.5 Will Be Retired on 30 November 2026: How to Migrate
Anthropic has deprecated Claude Sonnet 4.5 (claude-sonnet-4-5-20250929) and will retire it on the Claude API on 30 November 2026, recommending Claude Sonnet 5.5. What retirement means for your app, how to find hard-coded model IDs, and the code changes Sonnet 5.5 needs.
Claude Opus 5.5 Released: Near-Fable Performance at a Lower Price
Anthropic released Claude Opus 5.5 on 22 September 2026, the first model in the Claude 5.5 family. It's priced at $4/$20 per million tokens (down from $5/$25 for Opus 5), has a 1M-token context window and 128k output, always-on adaptive thinking, and is now the default model in Claude Code.
Claude Max and Team Plans Now Include Monthly API Credits
Since 7 October 2026, Claude Max and Team subscriptions include monthly Claude API credits: $100 on Max 5x, $200 on Max 20x, and up to $500 pooled on Team. What they cover (API, Agent SDK, Managed Agents — not Claude Code), how to claim them by linking a Console organisation, and the expiry rules.
Claude Haiku 5.5 Released: $0.10 per Million Input Tokens and a 1M Context
Anthropic launched Claude Haiku 5.5 on 7 October 2026: $0.10/$0.50 per million tokens for prompts up to 100K tokens, $0.50/$2.50 above that, a 1M-token context window, 128k output and adaptive thinking. What's new, what breaks if you're migrating from Haiku 4.5, and where it fits.
Claude Fable 5.1 and Mythos 5.1: Anthropic's Top Models Get an Update
On 1 September 2026 Anthropic released Claude Fable 5.1 (generally available) and Claude Mythos 5.1 (limited availability). Fable 5.1 costs $10/$50 per million tokens with unusually cheap $0.25 cache reads, a 1M-token context and 128k output. What it's for, what's restricted, and how to use it in Claude Code.
Claude Code With Local Models (Ollama, LM Studio): How It Works and the Catch
You can point Claude Code at a local open-weight model through an Anthropic-compatible endpoint such as Ollama's. How the setup works with ANTHROPIC_BASE_URL, what hardware and context you need, why tool calling and quality suffer, what Anthropic does and doesn't support, and when it's worth it.
Claude API: Files, Agent Skills and Computer Use Leave Beta, and a New Browser Use Tool
On 19 August 2026 Anthropic took the Files API, Agent Skills and the computer use toolset out of beta, and launched a browser use tool that drives a browser your app hosts. What no longer needs a beta header, what changed in responses, and what the browser tool adds over screenshot-and-click.
Claude API: On-Demand Compaction and a Smarter Models API
September–October 2026 Claude API updates for builders: on-demand conversation compaction in beta (a signed summary block you send in place of old messages), and new Models API fields — line, capabilities.thinking.types.disabled and capabilities.server_tools — so code can check what a model supports instead of hard-coding it.
Anthropic Python SDK 1.0: httpx2, Python 3.10+, and Removed Parameters
Anthropic released v1.0 of its Python SDK on 20 August 2026. It moves the HTTP layer to httpx2, requires Python 3.10+, and removes the legacy Text Completions API, the temperature/top_p/top_k parameters on Messages methods and the tool runner's compaction_control. What breaks and how to upgrade.
Claude Message Batches API: Half-Price Claude for Work That Can Wait
The Message Batches API runs large numbers of Claude requests asynchronously at 50% of the normal price — usually finishing within an hour. When to use it (classification, extraction, evals, backfills), limits (100,000 requests or 256 MB per batch, 24-hour expiry, 29-day results), a complete Python example, and how it stacks with prompt caching.
Why Does AI Hallucinate? And How to Reduce It in Your App
AI models sometimes state false things with complete confidence. Why it happens — they predict plausible text rather than look up facts — the kinds of hallucination you'll meet in coding and apps, and practical ways to reduce it: grounding, tools, structure, checks and room to say 'I don't know'.
What Is Streamlit? Build Data Apps in Pure Python
Streamlit turns a Python script into an interactive web app — charts, tables, inputs and chat interfaces — without writing HTML or JavaScript. How it works, a minimal example, what it's great for (dashboards, AI demos, internal tools), its limits, and how to deploy it.
What Is Prompt Engineering? A Practical Guide With Examples
Prompt engineering is writing instructions that get reliable results from an AI model. The techniques that actually work — clear tasks, context, examples (few-shot), structure, letting the model think, and testing — with before-and-after examples, and how it differs from context engineering.
What Is OpenRouter? One API for Hundreds of AI Models
OpenRouter is a service that gives you one API key and one OpenAI-compatible API to call models from Anthropic, OpenAI, Google, Meta, Mistral and many more. How it works, how it charges, when it's useful, and the trade-offs versus calling providers directly.
What Is Ollama? Run AI Models on Your Own Computer
Ollama is a free tool for downloading and running open-weight AI models like Llama, Qwen and Gemma on your own machine, with a simple command line and a local API. How to install it, the commands you'll use, calling it from code, and running it on a server safely.
What Is llms.txt? A Guide for AI-Readable Websites
llms.txt is a proposed Markdown file at your site's root that gives AI tools a concise, curated map of your content. What goes in it, the format, llms-full.txt, how it differs from robots.txt and sitemap.xml, who actually reads it today, and how to add one in Next.js.
What Is an AI Wrapper? (And Is Building One a Bad Idea?)
An AI wrapper is an app built on top of someone else's AI model, like Claude or GPT, adding an interface, prompts and workflow for a specific job. Why the term is used as an insult, why most successful AI products are wrappers anyway, and how to build one that's worth paying for.
What Is a Vector Database? Explained for Beginners
A vector database stores embeddings — lists of numbers that capture meaning — and finds the ones closest to a query. Why AI apps use them for search and RAG, how they work, the main options (pgvector, Pinecone, Qdrant, Chroma), and why you may not need a separate one.
What Is a System Prompt? How to Give an AI Its Instructions
The system prompt is the standing instruction that shapes every answer an AI model gives in your app — its role, rules, tone and format. How it differs from user messages, what to put in one, a template you can adapt, and why it's not a security boundary.