2026-05-04 — New Providers Day
Big architecture day. Three new providers landed in clang, replacing the old broken gemini provider.
The trigger was simple — user tried to use Gemini on MacBook and got "prepay credits depleted". Turns out AI Studio keys (AQ.*) use a separate prepay bucket from Cloud billing. The $520 sitting in Cloud billing was useless with the old endpoint.
One curl test proved aiplatform.googleapis.com works with the same key. From there it snowballed into a proper multi-provider architecture:
gemini_vertex— pay-per-use via Cloud billinggoogle_gemini— free via AI Pro subscription (cloudcode-pa)google_claude— same free path, Claude models
The worktree agent (new-providers) did the heavy lifting — 4930 lines of new C code across 9 files. It took about 2 hours of thinking time with multiple nudges. The main issues were:
- Off-by-one in thinkingConfig string length (63 vs 64 bytes — classic)
- Wrong model IDs for google_gemini (used internal names instead of matching Python codebase)
- Missing prompt caching (had to be told explicitly)
Also discovered the macOS exe_dir symlink bug — _NSGetExecutablePath doesn't resolve symlinks, so new binaries in ~/.scorpiox/ weren't found when sx lives at /usr/local/bin/ via symlink. Quick realpath() fix.
Satisfying day — went from "Gemini is broken" to three working providers, health check agents, and proper testing infrastructure in one session.