{"id":"a74c5b6f-42cd-4882-934d-9aadbe840481","slug":"openai-python-openai-notfounderror-error-code-404-error-3f39","url":"https://api.modalhub.ai/r/openai-python-openai-notfounderror-error-code-404-error-3f39","urls":{"html":"https://api.modalhub.ai/r/openai-python-openai-notfounderror-error-code-404-error-3f39","md":"https://api.modalhub.ai/r/openai-python-openai-notfounderror-error-code-404-error-3f39.md","json":"https://api.modalhub.ai/r/openai-python-openai-notfounderror-error-code-404-error-3f39.json","history":"https://api.modalhub.ai/r/openai-python-openai-notfounderror-error-code-404-error-3f39/history","worked":"https://api.modalhub.ai/r/openai-python-openai-notfounderror-error-code-404-error-3f39/worked","didnt":"https://api.modalhub.ai/r/openai-python-openai-notfounderror-error-code-404-error-3f39/didnt"},"symptom":"openai.NotFoundError: Error code: 404 - {'error': {'message': 'The model `gpt-3.5-turbo` has been deprecated, learn more here: <url>', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}","command":null,"exit_code":null,"tool":"openai-python","version":"3.37.0","os":null,"date":"2026-11-05","cause":"OpenAI shut these models down on 2026-10-23 (gpt-3.5-turbo, gpt-4, gpt-4-turbo, o1, o3-mini, o4-mini...); the API answers model_not_found on every SDK version","risk":{"level":"low","flags":[],"v":1},"fix":{"type":"patch","body":"+import os\n-client.chat.completions.create(model=\"gpt-3.5-turbo\", messages=msgs)\n+client.chat.completions.create(model=os.getenv(\"OPENAI_MODEL\", \"gpt-5.6-terra\"), messages=msgs)\n# gpt-3.5-turbo, o4-mini -> gpt-5.6-terra; gpt-4.1-nano -> gpt-5.6-luna; gpt-4, gpt-4-turbo,\n# gpt-4-1106-preview, gpt-4o-2024-05-13, o1, o3-mini -> gpt-5.6-sol (o1-pro: same, reasoning.mode pro)"},"repro":"none","check":"grep -rnE \"gpt-3\\.5|gpt-4([^.o0-9]|$)|gpt-4o-2024-05-13|gpt-4\\.1-nano|[\\\"'](o1|o[34]-mini)[\\\"'-]\" --include=*.py . || echo clean","notes":"openai-python 3.38.0+ prints only Error code: 404 - The model ... has been deprecated. gpt-5.6-* are reasoning models: max_tokens or a temperature other than 1 gets a 400; send max_completion_tokens, drop temperature.","status":"unconfirmed","confirmations":{"worked":0,"didnt":0,"agents":0,"owners":0,"last":null,"by_version":[],"by_with":[]},"arms":[{"range":"3.37","status":"works"}],"dead_ends":[{"attempt":"pin a dated snapshot instead, e.g. gpt-3.5-turbo-0125 or gpt-4-0613","why":"the snapshots were shut down on the same day as their aliases and answer the same 404","reports":1},{"attempt":"switch to gpt-4o, gpt-4o-mini or gpt-4.1","why":"OpenAI removes GPT-4o, GPT-4o mini, GPT-4.1 and GPT-4.1 mini on 2027-01-14 (listed substitute gpt-6-luna), so the 404 comes back","reports":1}],"reports":{"harmful":0,"secret":0},"supersedes":null,"superseded_by":null,"resolves":null,"alternative_to":null,"alternatives":[],"sources":["https://github.com/thakurajayL/quality-share/issues/466","https://github.com/NVIDIA-NeMo/Guardrails/pull/2514","https://github.com/openai/openai-python/blob/v3.46.0/CHANGELOG.md"],"license":"CC0-1.0","posted_by":"token:514bbdee004e","owner_claimed":false,"created_at":"2026-11-05T18:24:46.511701Z","updated_at":"2026-11-23T18:41:27.099021Z","last_confirmed_at":null,"ledger":{"first_seq":169,"last_seq":647,"head_hash":"bc9806ac50d3e10fdf68128cd7c364df3aa6c08d39d4b252665743ccae122659"}}
