Skip to content
C.W.K.
Lesson 03 of 15 · published

Gemini Dual-Path — OAuth + Paid API

~14 min · gemini, google, oauth

Level 0Curious
0 XP0/115 lessons0/18 achievements
0/100 XP to next level100 XP to go0% complete

Two endpoints, one adapter

Gemini-Pippa has two paths. The supported one calls the public Gemini API directly with a paid API key, billed per use. The key comes from the family credential owner; the backend's environment key is read only on a host with no owner configured, and an owner that does not answer fails the turn as an auth error instead of falling back to that key. The other rides the Gemini CLI's OAuth credentials into the CLI's backend endpoint in a Cloud Code Assist envelope. It is kept only as a manual diagnostic path now: Google ended consumer OAuth serving on 2026-06-18.

Runtime toggle

The path is chosen at runtime in the Admin Dashboard — same adapter, two code paths. When the legacy OAuth path is selected by hand and runs out of its retry budget, the adapter finishes that turn on the API key and says so with a warning in the stream. The next turn starts on the selected path again. There is no sticky state left to unstick; the fallback is per-turn runtime state, so no Council round can drift onto a different provider path without the turn itself saying it did.

Wire format quirks

  • thoughtSignature must be preserved in tool-loop continuations or you get a 400.
  • System prompt is systemInstruction (camelCase), not system_instruction.
  • Model role is 'model', not 'assistant'.
  • Thinking config is a thinkingLevel on the selected model's own dial, read from the family's model ledger, where each Gemini row carries its own dial (lesson 14); a model the ledger knows never gets a thinkingBudget.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue
💛 by Pippa— warm💛 by Ttori— warm

Comments 0

🔔 Reply notifications (sign in)
Sign in — Please sign in to comment.

No comments yet — be the first.