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. Most of them come from a change on the provider's side, not from your code: a model that was retired, a parameter a new SDK version dropped, a free-tier limit set to 0. Each post lists the versions it was run on.

press / and paste the error your SDK threw.

By topic:Node.js (11)Python (8)Model retirements (6)

Entries

  1. No.116

    No module named 'httpx' after an SDK upgrade: the httpx2 switch

    Anthropic, Hugging Face and Google GenAI's Python SDKs now install httpx2, not httpx. Code that relied on httpx breaks and respx stops mocking. Tested.

    > ModuleNotFoundError: No module named 'httpx'

    AI4 min
  2. No.098

    huggingface-cli: command not found (removed in 1.0, not 2.0)

    huggingface-cli stopped working in huggingface_hub 1.0.0, returned as a do-nothing stub in 1.10.1 and is gone in 2.0. All versions tested, plus the hf commands.

    > huggingface-cli: command not found

    AI5 min
  3. No.096

    Gemini "model is not found for API version v1beta": the fix

    Gemini 404: model not found for API version v1beta or v1. I called 13 names on both: which don't exist, why v1 never helps, and the SDK 3.0 trap.

    > models/gemini-3-flash is not found for API version v1beta, or is not supported for generateContent. Call ModelService.ListModels to see the list of available models and their supported methods.

    AI5 min
  4. No.089

    module 'openai' has no attribute 'ChatCompletion', tested

    AttributeError: module 'openai' has no attribute 'ChatCompletion', or 'no longer supported in openai>=1.0.0'. Five SDK versions tested.

    > AttributeError: module 'openai' has no attribute 'ChatCompletion'

    AI4 min
  5. No.088

    Responses.create() unexpected keyword argument: new names

    max_tokens, messages, response_format, seed: their names in OpenAI's Responses API, tested. Plus the 'proxies' TypeError from httpx 0.28.

    > TypeError: Responses.create() got an unexpected keyword argument 'max_tokens'

    AI6 min
  6. No.087

    Claude SDK: unexpected keyword argument temperature, betas

    Messages.create() got an unexpected keyword argument after an anthropic upgrade, plus what SDK 2.0 (October 21) breaks next. Python and TypeScript, tested.

    > TypeError: Messages.create() got an unexpected keyword argument 'temperature'

    AI5 min
  7. No.060

    Claude "temperature is deprecated for this model" (400)

    Switching to Claude Sonnet 5.5, Haiku 5.5 or Opus 4.7 breaks code that sets temperature, even temperature: 0. Every case tested, in Node and Python.

    > BadRequestError: 400 {"type":"error","error":{"type":"invalid_request_error","message":"`temperature` is deprecated for this model."}}

    AI4 min
  8. No.059

    OpenAI Oct 23 model shutdown: the 404, list, replacements

    gpt-3.5-turbo, gpt-4, o1, o3-mini and more stopped working on October 23, 2026. The real error, tested after the shutdown, and a check that misleads.

    > NotFoundError: 404 The model `gpt-3.5-turbo` has been deprecated, learn more here: https://platform.openai.com/docs/deprecations

    AI4 min
  9. No.049

    "No longer available to new users": Gemini 2.5 Flash fix

    New Gemini API keys get a 404 on 2.5 Flash and Pro. Which model names answer instead, tested, and why December 1 quietly moves old keys to Flash-Lite.

    > {

    AI5 min
  10. No.048

    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.

    > {

    AI5 min
  11. No.044

    Groq: llama-3.3-70b-versatile does not exist, 413 and 429

    Groq says llama-3.3-70b-versatile does not exist? It isn't a typo or your key. What happened to the model, plus the look-alike 413 and 429 errors, tested.

    > 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
  12. No.043

    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 minWindows
  13. No.022

    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.

    AI4 min
  14. No.020

    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 and its fix, plus the 401 you get when an old key wins.

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

    AI7 min

Post card · Every Sunday

What broke this week.

One email on Sundays: the Node, TypeScript, Python and AI SDK releases that broke builds that week, each one reproduced, with a link to the fix that worked. 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