A Risk-Tiered Approval Gate for Gemini Function Calling
Handing full autonomy to an agent is unnerving. This walks through a Gemini function-calling loop that routes tool calls into auto-run and hold-for-approval by risk tier, then feeds the result back to the model after a human signs off.
When Your Gemini Agent Has Three Tool Routes and Quietly Picks the Wrong One
Put Function Calling, Code Execution, and Grounding into one agent and the model will sometimes choose the wrong route, while the output still looks perfectly plausible. Here is how I instrument route selection and correct it with phase separation and verification gates, with working code.
Stopping Gemini API Function Calling Loops: Why They Happen and How to Break Them
Your tool-calling agent keeps invoking the same function and never finishes. Here is how to diagnose the loop and bake stop conditions into your prompt, code, and tool responses — including catching regressions when the default model changes and detecting result-based stalls.
Integrating Gemini 3.2 Pro Function Calling into iOS/Android Apps: Production Design Patterns
A practical guide to integrating Gemini 3.2 Pro Function Calling into iOS and Android apps. Includes working SwiftUI, Kotlin, and Python code, plus production patterns proven in a real indie wallpaper app — cost, latency, staged rollout, and regression testing.
Implementing Gemini API Function Calling — Parallel Calls, Tool Chains, and When to Use Managed Agents
Production patterns for Gemini API Function Calling: parallel calls, error handling, and tool chaining, plus when to use Managed Agents and how to pin the tool-selecting model to a GA release.
I Rebuilt My Wallpaper App's Recommendation Engine Using Gemini Function Calling
A hands-on account of integrating Gemini Function Calling into a wallpaper app with 50M+ downloads. Covers schema design, cost estimation, and how I compared Gemini against Claude and GPT-4o for this use case.
Building an AdMob Revenue Anomaly Detector with Gemini API Function Calling
Learn how to build an automatic AdMob revenue anomaly detection system using Gemini API Function Calling — with real Python code, practical tips from 10+ years of indie app development, and Slack alerting integration.
Gemini API Returns 400 When You Set tools and responseSchema Together — Three Designs That Make Function Calling and Structured Output Coexist
You want function calling to fetch external data and a strict JSON shape for the final answer. Setting tools and responseSchema together returns 400. Here's why, plus three production-tested designs that make both work.
Build a Voice + Screen-Share AI Pair Programmer with the Gemini Live API in TypeScript
A practical playbook for wiring the Gemini Live API to getDisplayMedia and a microphone to build an over-the-shoulder AI pair programmer in TypeScript, with cost controls and the gotchas I hit in production.
A Personal Secretary AI on Gemini API and Google Workspace — Auth, Orchestration, and Approval Gates
Designing a personal secretary AI across Gmail and Google Calendar with the Gemini API: OAuth2 scope design, Function Calling orchestration, approval gates for write tools, and ninety days of measured production cost, with full Python code.
Why 'contents must alternate between user and model' Won't Go Away in the Gemini API — and How to Fix It
A focused guide to the Gemini API's 'contents must alternate between user and model' error — what really triggers it, why role names from OpenAI break it, and how to fix Function Calling and system_instruction pitfalls with copy-pasteable code.
Testing Gemini API with Vitest — Mock Patterns and Function Calling Verification for TypeScript Projects
Practical patterns for testing TypeScript code that calls the Gemini API, using Vitest. Covers SDK mocking, Function Calling verification, and streaming response tests, drawn from a setup I run in personal projects.