Skip to content

Replace the retired gpt-3.5-turbo default for openai.com - #342

Open
alexcastgonz (pcbeingused333) wants to merge 1 commit into
Azure-Samples:mainfrom
pcbeingused333:fix/openaicom-default-chat-model
Open

alexcastgonz (pcbeingused333) wants to merge 1 commit into
Azure-Samples:mainfrom
pcbeingused333:fix/openaicom-default-chat-model

Conversation

@pcbeingused333

Copy link
Copy Markdown

Purpose

With OPENAI_CHAT_HOST=openaicom and no OPENAICOM_CHAT_MODEL, the app fell back to gpt-3.5-turbo. OpenAI shut that model down on 2026-10-23, so the default chat model now fails.

This changes the fallback to gpt-5.4 in src/backend/fastapi_app/dependencies.py, the OPENAICOM_CHAT_MODEL value in infra/main.bicep, .env.sample and the tests, and adds a test for the fallback.

OpenAI's suggested replacement for gpt-3.5-turbo is gpt-5.6-terra, but the chat requests always send temperature (rag_simple.py, rag_advanced.py, default 0.3), and gpt-5.6-terra defaults to medium reasoning effort, which does not accept it. gpt-5.4 defaults to no reasoning, accepts temperature, and is already the default for the Azure host in this repo.

Does this introduce a breaking change?

[ ] Yes
[x] No

Type of change

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

Code quality checklist

  • The current tests all pass for the file touched (tests/test_dependencies.py, 5 passed; the full suite was not run).
  • I added tests that prove my fix is effective or that my feature works
  • I ran python -m pytest --cov to verify 100% coverage of added lines (not run; the only non-test change is one string literal in dependencies.py, which the new test exercises)
  • I ran python -m ty check to check for type errors (not run)
  • I either used the pre-commit hooks or ran ruff manually on my code (ruff check and ruff format --check on the touched files)

This change was prepared with AI assistance (Claude Code).

OpenAI shut gpt-3.5-turbo down on 2026-10-23. With
OPENAI_CHAT_HOST=openaicom and no OPENAICOM_CHAT_MODEL, the app fell
back to it and the chat calls failed. Use gpt-5.4, the same model as
the Azure default, in the fallback, the Bicep setting, the sample env
file and the tests, and add a test for the fallback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant