Skip to content
Nilay Kabariya

Part 03 of the notebook

AI

AI

AI SDKs and APIs, run for real: the errors they throw, reproduced and fixed. AI SDKs and APIs break in their own ways. Every error here was reproduced with the exact SDK version, and the fix was verified before it was written up.

press / and paste the error your SDK threw.

By topic:Node.js (7)

  1. No.051

    Gemini 2.5 Flash "no longer available to new users" (404)

    Code that worked yesterday 404s with a new API key. Every old Gemini model name tested: three different messages, and why the model list won't warn you.

    > {

    AI3 min
  2. No.050

    Gemini API 429 RESOURCE_EXHAUSTED: why your limit is 0

    Gemini's 429 hides three different limits, and one of them never resets. Each hit on purpose with a free key, plus the 503 high demand error.

    > {

    AI4 min
  3. No.046

    Fix: Groq API error 413, 429 and model_not_found

    Groq's 413 and 429 need different fixes. Its old Llama models now just say not found. All three reproduced on the free tier, with the fix for each.

    > 413 Request too large for model `openai/gpt-oss-20b` in organization `org_…` service tier `on_demand` on tokens per minute (TPM): Limit 8000, Requested 30074, please reduce your message size and try again.

    AI4 min
  4. No.045

    Fix: APIConnectionError "Connection error." (OpenAI, Anthropic)

    OpenAI's and Anthropic's SDKs both say only Connection error. Five real causes reproduced, from a local model that isn't running to antivirus HTTPS scanning.

    > APIConnectionError: Connection error.

    AI5 min
  5. No.024

    Fix: Could not resolve authentication method (Anthropic / Claude SDK)

    Anthropic's SDK can't find your key. The old and new wording, ANTHROPIC_API_KEY vs ANTHROPIC_AUTH_TOKEN, and the 401 you get when a key is in the wrong one.

    > Error: Could not resolve authentication method. Expected either apiKey or authToken to be set.

    AI2 min
  6. No.023

    Fix: OpenAI 401 Incorrect API key provided (AuthenticationError)

    OpenAI rejects a key you just copied. How to read which key was really sent from the error itself, why an old key can beat your .env, and the fix.

    > AuthenticationError: 401 Incorrect API key provided: sk-old-s*****************1111.

    AI3 min
  7. No.021

    Fix: The OPENAI_API_KEY environment variable is missing or empty

    OpenAI's SDK or Codex CLI says your key is missing, though it's in .env. Every wording, in JavaScript, Python and Codex, and the fix for each.

    > OpenAIError: The OPENAI_API_KEY environment variable is missing or empty; either provide it,

    AI4 min

Post card · Newsletter

Get the next fix in your inbox.

One short email when a new entry is published. No spam, never shared, and you can leave any time.

— Nilay

or follow by RSSor on X

By subscribing you agree to the privacy note. One click to leave.

tip: paste the exact error text