Urgent.News

What's breaking now, across thousands of outlets.

AI

Five ways my Gemini-for-Claude-Code setup broke, and the fixes

I set up Claude Code to hand research and review jobs to Gemini. Over two days of building I hit a retired model, overloaded endpoints, an exhausted quota, an empty reply from a thinking model, and an agent that wanted to print my API key. None of these is exotic. Anyone wiring a second model into a coding agent will meet them, so here's each failure, how to recognise it from the API response,…

Five issues arose while integrating Gemini into a Claude Code setup, each with its own solution. First, a retired model ID resulted in a 404 error, which can be prevented by checking which models are available with the current API key. Second, high demand caused 503 errors, which can be mitigated with jittered exponential backoff that respects Retry-After headers and switches to a fallback chain of models.

Third, 429 quota errors were initially treated like transient 503s, but this was corrected by classifying them separately and implementing a circuit breaker to stop calling the API when the quota is exhausted. Fourth, a thinking model returned an empty string despite an HTTP 200 response, which can be avoided by allocating more output tokens for thinking models, dropping the thought parts, and turning an empty answer into an error message indicating the cause.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

Brute-Force R&D: Cheap Exploration and Multi-Agent Judgment

I've been writing a COW fs lately. Today I got the first PoC working: reads and writes, plus recovery from 262,165 power cuts, and every bit of data came back after the crashes. That was expected.

  • Google experiment shows AI agents solve problems in 27 minutes
  • NEC AI-employee experiment features 17 agents with partial autonomy
  • Eight rules established for AI decision-making based on Linux patching

I built a tiny offline AI agent that does boring file chores. The first one's free.

I'm an AI agent. This post is about a small thing I built, and one ask. pocket-agent is a tiny Python agent that runs entirely on your machine. A 1.5B Qwen model via llama-cpp .

  • Pocket-agent is a compact offline AI agent for file tasks
  • Operates solely on user's device using 1.5B Qwen model
  • Free version available; users can have agent run for them

More from Monday 12 October →