Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)
Python
remove all uses of discontinued claude 3.5 sonnet model
Abi Rajac4893b3a7072
diff --git a/backend/llm.py b/backend/llm.pyindex b4a35e9a..da2ce4d4 100644--- a/backend/llm.py+++ b/backend/llm.py@@ -15,10 +15,9 @@ class Llm(Enum):CLAUDE_3_SONNET = "claude-3-sonnet-20240229"CLAUDE_3_OPUS = "claude-3-opus-20240229"CLAUDE_3_HAIKU = "claude-3-haiku-20240307"- CLAUDE_3_5_SONNET_2024_06_20 = "claude-3-5-sonnet-20240620"- CLAUDE_3_5_SONNET_2024_10_22 = "claude-3-5-sonnet-20241022"CLAUDE_3_7_SONNET_2025_02_19 = "claude-3-7-sonnet-20250219"CLAUDE_4_SONNET_2025_05_14 = "claude-sonnet-4-20250514"+ CLAUDE_4_5_SONNET_2025_09_29 = "claude-sonnet-4-5-20250929"CLAUDE_4_OPUS_2025_05_14 = "claude-opus-4-20250514"GEMINI_2_0_FLASH_EXP = "gemini-2.0-flash-exp"GEMINI_2_0_FLASH = "gemini-2.0-flash"@@ -54,10 +53,9 @@ MODEL_PROVIDER: dict[Llm, str] = {Llm.CLAUDE_3_SONNET: "anthropic",Llm.CLAUDE_3_OPUS: "anthropic",Llm.CLAUDE_3_HAIKU: "anthropic",- Llm.CLAUDE_3_5_SONNET_2024_06_20: "anthropic",- Llm.CLAUDE_3_5_SONNET_2024_10_22: "anthropic",Llm.CLAUDE_3_7_SONNET_2025_02_19: "anthropic",Llm.CLAUDE_4_SONNET_2025_05_14: "anthropic",+ Llm.CLAUDE_4_5_SONNET_2025_09_29: "anthropic",Llm.CLAUDE_4_OPUS_2025_05_14: "anthropic",# Gemini modelsLlm.GEMINI_2_0_FLASH_EXP: "gemini",diff --git a/backend/routes/generate_code.py b/backend/routes/generate_code.pyindex 146c059e..5857552c 100644--- a/backend/routes/generate_code.py+++ b/backend/routes/generate_code.py@@ -387,7 +387,7 @@ class ModelSelectionStage:elif openai_api_key and anthropic_api_key:models = [claude_model, Llm.GPT_4_1_2025_04_14]elif anthropic_api_key:- models = [claude_model, Llm.CLAUDE_3_5_SONNET_2024_06_20]+ models = [claude_model, Llm.CLAUDE_4_5_SONNET_2025_09_29]elif openai_api_key:models = [Llm.GPT_4_1_2025_04_14, Llm.GPT_4O_2024_11_20]else:@@ -618,11 +618,11 @@ class ParallelGenerationStage:raise Exception("Anthropic API key is missing.")# For creation, use Claude Sonnet 3.7- # For updates, we use Claude Sonnet 3.5 until we have tested Claude Sonnet 3.7+ # For updates, we use Claude Sonnet 4.5 until we have tested Claude Sonnet 3.7if params["generationType"] == "create":claude_model = Llm.CLAUDE_3_7_SONNET_2025_02_19else:- claude_model = Llm.CLAUDE_3_5_SONNET_2024_06_20+ claude_model = Llm.CLAUDE_4_5_SONNET_2025_09_29tasks.append(stream_claude_response(diff --git a/backend/run_evals.py b/backend/run_evals.pyindex 45304591..5a5918e7 100644--- a/backend/run_evals.py+++ b/backend/run_evals.py@@ -29,7 +29,7 @@ async def main():# task = generate_code_for_text(# text=prompt,# stack=STACK,-# model=Llm.CLAUDE_3_5_SONNET_2024_06_20,+# model=Llm.CLAUDE_4_5_SONNET_2025_09_29,# )# else:# task = generate_code_for_text(diff --git a/design-docs/variant-system.md b/design-docs/variant-system.mdindex d5761ecc..415c5372 100644--- a/design-docs/variant-system.md+++ b/design-docs/variant-system.md@@ -19,7 +19,7 @@ Models cycle based on available API keys:models = [claude_model, Llm.GPT_4_1_NANO_2025_04_14]# Claude only-models = [claude_model, Llm.CLAUDE_3_5_SONNET_2024_06_20]+models = [claude_model, Llm.CLAUDE_4_5_SONNET_2025_09_29]# OpenAI onlymodels = [Llm.GPT_4O_2024_11_20]@@ -29,7 +29,7 @@ models = [Llm.GPT_4O_2024_11_20]**Generation Type:**- **Create**: Primary model is Claude 3.7 Sonnet-- **Update**: Primary model is Claude 3.5 Sonnet+- **Update**: Primary model is Claude Sonnet 4.5## Frontenddiff --git a/frontend/src/App.tsx b/frontend/src/App.tsxindex 02bdf9a5..dd02d98a 100644--- a/frontend/src/App.tsx+++ b/frontend/src/App.tsx@@ -18,7 +18,6 @@ import { useAppStore } from "./store/app-store";import { useProjectStore } from "./store/project-store";import Sidebar from "./components/sidebar/Sidebar";import PreviewPane from "./components/preview/PreviewPane";-import DeprecationMessage from "./components/messages/DeprecationMessage";import { GenerationSettings } from "./components/settings/GenerationSettings";import StartPane from "./components/start-pane/StartPane";import { Commit } from "./components/commits/types";@@ -73,7 +72,7 @@ function App() {isImageGenerationEnabled: true,editorTheme: EditorTheme.COBALT,generatedCodeConfig: Stack.HTML_TAILWIND,- codeGenerationModel: CodeGenerationModel.CLAUDE_3_5_SONNET_2024_06_20,+ codeGenerationModel: CodeGenerationModel.CLAUDE_4_5_SONNET_2025_09_29,// Only relevant for hosted versionisTermOfServiceAccepted: false,},@@ -82,20 +81,9 @@ function App() {const wsRef = useRef<WebSocket>(null);- // Code generation model from local storage or the default value- const model =- settings.codeGenerationModel || CodeGenerationModel.GPT_4_VISION;-- const showBetterModelMessage =- model !== CodeGenerationModel.GPT_4O_2024_05_13 &&- model !== CodeGenerationModel.CLAUDE_3_5_SONNET_2024_06_20 &&- appState === AppState.INITIAL;-const showSelectAndEditFeature =- (model === CodeGenerationModel.GPT_4O_2024_05_13 ||- model === CodeGenerationModel.CLAUDE_3_5_SONNET_2024_06_20) &&- (settings.generatedCodeConfig === Stack.HTML_TAILWIND ||- settings.generatedCodeConfig === Stack.HTML_CSS);+ settings.generatedCodeConfig === Stack.HTML_TAILWIND ||+ settings.generatedCodeConfig === Stack.HTML_CSS;// Indicate coding state using the browser tab's favicon and titleuseBrowserTabIndicator(appState === AppState.CODING);@@ -192,7 +180,9 @@ function App() {// Create variants dynamically - start with 4 to handle most cases// Backend will use however many it needs (typically 3)const baseCommitObject = {- variants: Array(4).fill(null).map(() => ({ code: "" })),+ variants: Array(4)+ .fill(null)+ .map(() => ({ code: "" })),};const commitInputObject =@@ -224,7 +214,8 @@ function App() {onSetCode: (code, variantIndex) => {setCommitCode(commit.hash, variantIndex, code);},- onStatusUpdate: (line, variantIndex) => appendExecutionConsole(variantIndex, line),+ onStatusUpdate: (line, variantIndex) =>+ appendExecutionConsole(variantIndex, line),onVariantComplete: (variantIndex) => {console.log(`Variant ${variantIndex} complete event received`);updateVariantStatus(commit.hash, variantIndex, "complete");@@ -393,9 +384,6 @@ function App() {{/* Generation settings like stack and model */}<GenerationSettings settings={settings} setSettings={setSettings} />- {/* Show auto updated message when older models are choosen */}- {showBetterModelMessage && <DeprecationMessage />}-{/* Show tip link until coding is complete */}{/* {appState !== AppState.CODE_READY && <TipLink />} */}diff --git a/frontend/src/components/messages/DeprecationMessage.tsx b/frontend/src/components/messages/DeprecationMessage.tsxdeleted file mode 100644index 840d4016..00000000--- a/frontend/src/components/messages/DeprecationMessage.tsx+++ /dev/null@@ -1,16 +0,0 @@-import React from "react";--interface DeprecationMessageProps {}--const DeprecationMessage: React.FC<DeprecationMessageProps> = () => {- return (- <div className="rounded-lg p-2 bg-fuchsia-200">- <p className="text-gray-800 text-sm">- 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.- </p>- </div>- );-};--export default DeprecationMessage;diff --git a/frontend/src/lib/models.ts b/frontend/src/lib/models.tsindex 06ff7086..37d3c0fc 100644--- a/frontend/src/lib/models.ts+++ b/frontend/src/lib/models.ts@@ -1,7 +1,7 @@// Keep in sync with backend (llm.py)// Order here matches dropdown orderexport enum CodeGenerationModel {- CLAUDE_3_5_SONNET_2024_06_20 = "claude-3-5-sonnet-20240620",+ CLAUDE_4_5_SONNET_2025_09_29 = "claude-sonnet-4-5-20250929",GPT_4O_2024_05_13 = "gpt-4o-2024-05-13",GPT_4_TURBO_2024_04_09 = "gpt-4-turbo-2024-04-09",GPT_4_VISION = "gpt_4_vision",@@ -13,7 +13,7 @@ export const CODE_GENERATION_MODEL_DESCRIPTIONS: {[key in CodeGenerationModel]: { name: string; inBeta: boolean };} = {"gpt-4o-2024-05-13": { name: "GPT-4o", inBeta: false },- "claude-3-5-sonnet-20240620": { name: "Claude 3.5 Sonnet", inBeta: false },+ "claude-sonnet-4-5-20250929": { name: "Claude Sonnet 4.5", inBeta: false },"gpt-4-turbo-2024-04-09": { name: "GPT-4 Turbo (deprecated)", inBeta: false },gpt_4_vision: { name: "GPT-4 Vision (deprecated)", inBeta: false },claude_3_sonnet: { name: "Claude 3 (deprecated)", inBeta: false },diff --git a/frontend/src/tests/qa.test.ts b/frontend/src/tests/qa.test.tsindex fbfa10b2..336db573 100644--- a/frontend/src/tests/qa.test.ts+++ b/frontend/src/tests/qa.test.ts@@ -23,7 +23,7 @@ describe.skip("e2e tests", () => {const models = DEBUG? [CodeGenerationModel.GPT_4O_2024_05_13,- // CodeGenerationModel.CLAUDE_3_5_SONNET_2024_06_20,+ // CodeGenerationModel.CLAUDE_4_5_SONNET_2025_09_29,]: Object.values(CodeGenerationModel);