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.

)} diff --git a/frontend/src/lib/models.ts b/frontend/src/lib/models.ts index 7476377..61bffcc 100644 --- a/frontend/src/lib/models.ts +++ b/frontend/src/lib/models.ts @@ -16,21 +16,25 @@ export const CODE_GENERATION_MODEL_DESCRIPTIONS: { isPaid: boolean; }; } = { - "gpt-4o-2024-05-13": { name: "GPT-4o 🌟", inBeta: false, isPaid: false }, + "gpt-4o-2024-05-13": { name: "GPT-4o", inBeta: false, isPaid: false }, "claude-3-5-sonnet-20240620": { - name: "Claude 3.5 Sonnet 🌟", + name: "Claude 3.5 Sonnet", inBeta: false, isPaid: false, }, "gpt-4-turbo-2024-04-09": { - name: "GPT-4 Turbo (Apr 2024)", + name: "GPT-4 Turbo (deprecated)", inBeta: false, isPaid: false, }, gpt_4_vision: { - name: "GPT-4 Vision (Nov 2023)", + name: "GPT-4 Vision (deprecated)", + inBeta: false, + isPaid: false, + }, + claude_3_sonnet: { + name: "Claude 3 (deprecated)", inBeta: false, isPaid: false, }, - claude_3_sonnet: { name: "Claude 3 Sonnet", inBeta: false, isPaid: false }, };