Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)
Python
Add GPT-5.6 Terra as an available low-thinking model
Flightdeck Agentd0709efb8457
diff --git a/backend/agent/providers/openai.py b/backend/agent/providers/openai.pyindex c65cbd92..0ae87052 100644--- a/backend/agent/providers/openai.py+++ b/backend/agent/providers/openai.py@@ -55,7 +55,11 @@ def _convert_message_to_responses_input(def _get_image_detail_for_model(model: Llm) -> str:- if get_openai_api_name(model) in {"gpt-5.5", "gpt-5.6-sol"}:+ if get_openai_api_name(model) in {+ "gpt-5.5",+ "gpt-5.6-sol",+ "gpt-5.6-terra",+ }:return "original"return "high"diff --git a/backend/agent/providers/pricing.py b/backend/agent/providers/pricing.pyindex 5f8be52d..51957385 100644--- a/backend/agent/providers/pricing.py+++ b/backend/agent/providers/pricing.py@@ -27,6 +27,9 @@ MODEL_PRICING: Dict[str, ModelPricing] = {"gpt-5.6-sol": ModelPricing(input=2.50, output=15.00, cache_read=0.25),+ "gpt-5.6-terra": ModelPricing(+ input=2.50, output=15.00, cache_read=0.25+ ),# --- Anthropic ---"claude-sonnet-4-6": ModelPricing(input=3.00, output=15.00, cache_read=0.30, cache_write=3.75diff --git a/backend/llm.py b/backend/llm.pyindex 88320f9d..6db19c40 100644--- a/backend/llm.py+++ b/backend/llm.py@@ -22,6 +22,7 @@ class Llm(Enum):GPT_5_6_SOL_HIGH = "gpt-5.6-sol (high thinking)"GPT_5_6_SOL_XHIGH = "gpt-5.6-sol (xhigh thinking)"GPT_5_6_SOL_MAX = "gpt-5.6-sol (max thinking)"+ GPT_5_6_TERRA_LOW = "gpt-5.6-terra (low thinking)"# ClaudeCLAUDE_SONNET_4_6 = "claude-sonnet-4-6"CLAUDE_OPUS_4_8_LOW = "claude-opus-4-8 (low effort)"@@ -73,6 +74,7 @@ MODEL_PROVIDER: dict[Llm, str] = {Llm.GPT_5_6_SOL_HIGH: "openai",Llm.GPT_5_6_SOL_XHIGH: "openai",Llm.GPT_5_6_SOL_MAX: "openai",+ Llm.GPT_5_6_TERRA_LOW: "openai",# Anthropic modelsLlm.CLAUDE_SONNET_4_6: "anthropic",Llm.CLAUDE_OPUS_4_8_LOW: "anthropic",@@ -135,6 +137,7 @@ OPENAI_MODEL_CONFIG: dict[Llm, dict[str, str]] = {Llm.GPT_5_6_SOL_HIGH: {"api_name": "gpt-5.6-sol", "reasoning_effort": "high"},Llm.GPT_5_6_SOL_XHIGH: {"api_name": "gpt-5.6-sol", "reasoning_effort": "xhigh"},Llm.GPT_5_6_SOL_MAX: {"api_name": "gpt-5.6-sol", "reasoning_effort": "max"},+ Llm.GPT_5_6_TERRA_LOW: {"api_name": "gpt-5.6-terra", "reasoning_effort": "low"},}diff --git a/backend/routes/model_choice_sets.py b/backend/routes/model_choice_sets.pyindex eee7d5c3..dc02b7aa 100644--- a/backend/routes/model_choice_sets.py+++ b/backend/routes/model_choice_sets.py@@ -30,7 +30,7 @@ ALL_KEYS_MODELS_TEXT_CREATE = (ALL_KEYS_MODELS_UPDATE = (Llm.GEMINI_3_FLASH_PREVIEW_MINIMAL,- Llm.GPT_5_4_MINI_LOW,+ Llm.GPT_5_6_TERRA_LOW,)# Key subset fallbacks.diff --git a/backend/tests/test_model_selection.py b/backend/tests/test_model_selection.pyindex 281dc235..faa80bad 100644--- a/backend/tests/test_model_selection.py+++ b/backend/tests/test_model_selection.py@@ -63,7 +63,7 @@ class TestModelSelectionAllKeys:expected = [Llm.GEMINI_3_FLASH_PREVIEW_MINIMAL,- Llm.GPT_5_4_MINI_LOW,+ Llm.GPT_5_6_TERRA_LOW,]assert models == expected@@ -80,7 +80,7 @@ class TestModelSelectionAllKeys:expected = [Llm.GEMINI_3_FLASH_PREVIEW_MINIMAL,- Llm.GPT_5_4_MINI_LOW,+ Llm.GPT_5_6_TERRA_LOW,]assert models == expecteddiff --git a/backend/tests/test_openai_provider_session.py b/backend/tests/test_openai_provider_session.pyindex 75483432..fcf087f5 100644--- a/backend/tests/test_openai_provider_session.py+++ b/backend/tests/test_openai_provider_session.py@@ -251,6 +251,23 @@ async def test_openai_provider_session_uses_gpt_5_6_sol_reasoning_effort(assert first_call["reasoning"] == {"effort": effort, "summary": "auto"}+async def test_openai_provider_session_uses_gpt_5_6_terra_low_reasoning_effort() -> None:+ client = _FakeOpenAIClient()+ session = OpenAIProviderSession(+ client=client, # type: ignore[arg-type]+ model=Llm.GPT_5_6_TERRA_LOW,+ prompt_messages=[{"role": "user", "content": "Build a dashboard."}],+ tools=_test_tools(),+ )++ await session.stream_turn(_noop_event_sink)++ first_call = client.responses.calls[0]+ assert first_call["model"] == "gpt-5.6-terra"+ assert first_call["reasoning"] == {"effort": "low", "summary": "auto"}++@pytest.mark.asyncioasync def test_openai_provider_session_uses_original_image_detail_for_gpt_5_5() -> None:client = _FakeOpenAIClient()diff --git a/frontend/src/lib/models.ts b/frontend/src/lib/models.tsindex 0759274f..a40c82d8 100644--- a/frontend/src/lib/models.ts+++ b/frontend/src/lib/models.ts@@ -17,6 +17,7 @@ export enum CodeGenerationModel {GPT_5_6_SOL_HIGH = "gpt-5.6-sol (high thinking)",GPT_5_6_SOL_XHIGH = "gpt-5.6-sol (xhigh thinking)",GPT_5_6_SOL_MAX = "gpt-5.6-sol (max thinking)",+ GPT_5_6_TERRA_LOW = "gpt-5.6-terra (low thinking)",GPT_5_5_XHIGH = "gpt-5.5 (xhigh thinking)",GPT_5_4_MINI_LOW = "gpt-5.4-mini (low thinking)",GEMINI_3_FLASH_PREVIEW_HIGH = "gemini-3-flash-preview (high thinking)",@@ -85,6 +86,9 @@ export const CODE_GENERATION_MODEL_DESCRIPTIONS: {"gpt-5.6-sol (max thinking)": {name: "GPT 5.6 Sol (max)",},+ "gpt-5.6-terra (low thinking)": {+ name: "GPT 5.6 Terra (low)",+ },"gpt-5.5 (no thinking)": {name: "GPT 5.5 (none)",},