diff --git a/backend/routes/generate_code.py b/backend/routes/generate_code.py index d37bc26..fd6049c 100644 --- a/backend/routes/generate_code.py +++ b/backend/routes/generate_code.py @@ -95,6 +95,19 @@ async def stream_code(websocket: WebSocket): except: await throw_error(f"Invalid model: {code_generation_model_str}") raise Exception(f"Invalid model: {code_generation_model_str}") + + # Auto-upgrade usage of older models + if code_generation_model in {Llm.GPT_4_VISION, Llm.GPT_4_TURBO_2024_04_09}: + print( + f"Initial deprecated model: {code_generation_model}. Auto-updating code generation model to GPT-4O-2024-05-13" + ) + code_generation_model = Llm.GPT_4O_2024_05_13 + elif code_generation_model == Llm.CLAUDE_3_SONNET: + print( + f"Initial deprecated model: {code_generation_model}. Auto-updating code generation model to CLAUDE-3.5-SONNET-2024-06-20" + ) + code_generation_model = Llm.CLAUDE_3_5_SONNET_2024_06_20 + exact_llm_version = None print( diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 7726701..86f46a4 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -533,8 +533,8 @@ function App({ navbarComponent }: Props) { {showBetterModelMessage && (
- Now supporting GPT-4o and Claude Sonnet 3.5. Higher quality and - 2x faster. Give it a try! + We no longer support this model. Instead, code generation will + use GPT-4o or Claude Sonnet 3.5, the 2 state-of-the-art models.