Back to articles
Debugging a 400 Error: How a Silent API Gateway Update Broke My LLM Agent
How-ToTools

Debugging a 400 Error: How a Silent API Gateway Update Broke My LLM Agent

via Dev.toDavid Yan

As an SDET (Software Development Engineer in Test), I spend a lot of time breaking things. But there is a special kind of frustration when an environment that worked perfectly yesterday suddenly throws a fatal error today, despite zero changes to your local code or configuration. This is the story of how a silent, server-side API validation update completely broke my local AI agent workflow, and how I debugged it by diving into the raw JSON payloads. If you are building AI agents using third-party LLM gateways or Model Context Protocol (MCP) tools, this debugging journey might save you hours of pulling your hair out. The Setup & The Incident I was using Claude Code CLI (v2.1.69) , but instead of routing it to Anthropic’s official API, I pointed the base URL to Zhipu AI's Anthropic-compatible endpoint ( https://open.bigmodel.cn/api/anthropic ), powered by their glm-5.1 model. This is a common, cost-effective architecture for developers testing local AI agents. Everything was running smo

Continue reading on Dev.to

Opens in a new tab

Read Full Article
5 views

Related Articles