LLM API Blog

Blog

Insights on AI coding, Claude Code optimization, and cost-effective development

Base URL checker & setup generator → · Client integration guides → · Cost calculator → · Token counter →

Tutorial

Using Cline and Roo Code with a Claude-Compatible API

Step-by-step setup for pointing Cline and Roo Code — the VS Code AI coding extensions — at an Anthropic-compatible relay. Provider settings, base URL, model IDs, and the gotchas with OpenAI-compatible vs native Anthropic mode.

2026-06-04 7
Yazhou Hu
Engineering Notes

A 15-Second CPU Stall From One Unclosed XML Tag

Postmortem on a relay process that pegged a single core for fifteen seconds straight. Catastrophic regex backtracking on user-controlled input. Three-character fix, three-layer defense (bounded quantifier + per-request watchdog + nginx next_upstream).

2026-05-06 9
Yazhou Hu
Engineering Notes

Tool-Use IDs in the Wild: When the Same ID Appears Twice

Long Claude Code sessions sometimes produced duplicate `tool_use_id` values from the upstream model. Naive fixes break round-trip correlation; the working answer is occurrence-counter dedup with two-direction translation. With diagnostic dumps for the cases that still slip.

2026-05-06 8
Yazhou Hu
Guide

Claude Code Budget Guide for Solo Developers in 2026

Practical 2026 budget guide for solo developers using Claude Code: choosing between Pro (¥59), Max (¥259), Ultra (¥979) and metered API, plus context and caching habits that cut usage.

2026-04-23 6
Yazhou Hu
Guide

Claude Code Tool Use: A Complete Developer Guide

Deep dive into Claude Code's six core tools (Read, Edit, Write, Bash, Grep, Glob), how the model decides which tool to call, parallel tool calls, and how to debug when tool use fails.

2026-04-23 11
Yazhou Hu