Point Gemini 3.7 Flash at one Lahebo NestJS module

Google shipped a cheaper coding workhorse on August 13. Here is the five-step swap I would run on Lahebo subscription code — not on the whole monorepo.

Gemini 3.7 Flash is $0.75 / $3.75 per million tokens through 31 Dec 2026, then it doubles. I would try it on Lahebo’s billing module, where a wrong query costs real money.

Step 1: Pin the model id in one client

Do not change every caller. Create one helper so Lahebo, WebPasal, and a future agent share the same id.

import { GoogleGenAI } from "@google/genai";

export const gemini = new GoogleGenAI({
  apiKey: process.env.GEMINI_API_KEY,
});

export const FLASH_MODEL = "gemini-3.7-flash";

Step 2: Drop the old sampling knobs

If you are coming from 3.5 Flash or 3.1 Pro, remove temperature, top_p, top_k, and candidate_count. thinking_budget becomes thinking_level.

import { FLASH_MODEL, gemini } from "./gemini";

export async function reviewNestModule(source: string) {
  const response = await gemini.models.generateContent({
    model: FLASH_MODEL,
    contents: `Review this NestJS billing module for N+1 queries:\n\n${source}`,
    config: {
      thinkingConfig: { thinkingLevel: "medium" },
    },
  });

  return response.text;
}

Step 3: Feed it one real file from Lahebo

Start with the Stripe subscription service, not the whole repo. You want a finding you can verify in Postgres, not a generic lecture.

Step 4: Log cost per successful task