Skip to content

fix(openai): move nav translation off gpt-4 before it shuts down - #89

Merged
bnbong merged 1 commit into
bnbong:mainfrom
brunobuddy:fix/move-nav-translation-off-gpt-4-before-it-d973
Oct 26, 2026
Merged

bnbong merged 1 commit into
bnbong:mainfrom
brunobuddy:fix/move-nav-translation-off-gpt-4-before-it-d973

Conversation

@brunobuddy

Copy link
Copy Markdown
Contributor

Problem

The nav translation script's AI fallback calls gpt-4, which OpenAI shuts down, so untranslated nav items would stay in English.

OpenAI: gpt-4 stops working (in effect since 23 Oct 2026, source).

Fix

This moves the call to gpt-5.6-sol, the replacement OpenAI names, using max_completion_tokens (raised to 1000 so reasoning fits) and dropping temperature, which reasoning models reject.

  • scripts/update_nav_translations.py:135

How I checked

The calls now follow Openai's announcement.

python3 -m py_compile scripts/update_nav_translations.py passes.

Not checked

Could not call the API: the 1000-token cap and the default reasoning effort of gpt-5.6-sol are untested, and translations may differ from gpt-4's.

  • scripts/update_nav_translations.py:199: calls translate_nav_item; no model named here
  • scripts/update_nav_translations.py:242: calls the updater; no model named here

I found this while building Okapi, which watches the APIs a project calls and flags the changes that break them. Happy to chat if that is useful for FastAPI-fastkit, and no worries if not.

The nav translation script's AI fallback calls gpt-4, which OpenAI shuts
down, so untranslated nav items would stay in English. This moves the
call to gpt-5.6-sol, the replacement OpenAI names, using
max_completion_tokens (raised to 1000 so reasoning fits) and dropping
temperature, which reasoning models reject.
@bnbong

bnbong commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Thanks for catching this. I confirmed the gpt-4 shutdown and the gpt-5.6-sol replacement against OpenAI's deprecation page, and the parameter changes match what reasoning models require. The script only runs manually and already falls back to the original text on API errors, so the untested call is low risk.

One optional tweak I may add after merging: reasoning_effort="low", so a one-word translation does not spend most of the 1000-token budget on reasoning.

Merging once CI finishes. Thanks again.

@bnbong bnbong added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 26, 2026
@bnbong
bnbong merged commit 6958e3d into bnbong:main Oct 26, 2026
7 checks passed
@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants