From df8dea4fcbdd4351914e2c8b09dd5321470b6bd0 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 11 Feb 2026 11:24:01 -0600 Subject: [PATCH] Update GPT-5 to GPT-5.2 and lower default reasoning effort to low Swap model ID from gpt-5 to gpt-5.2 across all backend services, frontend components, and documentation. Change default reasoning effort from medium to low for faster responses. Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 2 +- backend/app/routes/focus_group_ai.py | 6 +-- .../services/focus_group_response_service.py | 2 +- backend/app/services/llm_service.py | 52 +++++++++---------- .../services/persona_modification_service.py | 4 +- .../discussionGuideMarkdown-eMXneipz.js | 0 dist/index.html | 2 +- .../ai-recruiter/AIRecruiterForm.tsx | 2 +- .../focus-group-session/SetupTab.tsx | 12 ++--- .../persona/PersonaModificationModal.tsx | 4 +- src/pages/FocusGroupSession.tsx | 34 ++++++------ 11 files changed, 60 insertions(+), 60 deletions(-) mode change 100755 => 100644 dist/assets/discussionGuideMarkdown-eMXneipz.js mode change 100755 => 100644 dist/index.html diff --git a/CLAUDE.md b/CLAUDE.md index 40d1f8ef..adf92ccc 100755 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -44,7 +44,7 @@ Focus group sessions can run autonomously with AI-driven conversations: ### LLM Integration Multi-model support through `llm_service.py`: - **Google Gemini** (`gemini-3-pro-preview`) - Default model -- **OpenAI** (`gpt-4.1`, `gpt-5`) - Alternative models +- **OpenAI** (`gpt-4.1`, `gpt-5.2`) - Alternative models - Prompts are stored as markdown templates in `/backend/prompts/` ## Code Style Guidelines diff --git a/backend/app/routes/focus_group_ai.py b/backend/app/routes/focus_group_ai.py index 7788f01a..1bbd6799 100755 --- a/backend/app/routes/focus_group_ai.py +++ b/backend/app/routes/focus_group_ai.py @@ -76,7 +76,7 @@ async def generate_ai_response(): # Get the LLM model and GPT-5 parameters for this focus group llm_model = focus_group.get('llm_model') - reasoning_effort = focus_group.get('reasoning_effort', 'medium') + reasoning_effort = focus_group.get('reasoning_effort', 'low') verbosity = focus_group.get('verbosity', 'medium') # Force debug logging to file @@ -189,8 +189,8 @@ Be genuine and specific in your feedback, drawing on your personal experiences a conversation_context=multimodal_context['conversation_context'], temperature=temperature, model_name=llm_model, - reasoning_effort=reasoning_effort if llm_model == 'gpt-5' else None, - verbosity=verbosity if llm_model == 'gpt-5' else None + reasoning_effort=reasoning_effort if llm_model == 'gpt-5.2' else None, + verbosity=verbosity if llm_model == 'gpt-5.2' else None ) else: print(f"💬 Using standard response generation (no visual context)") diff --git a/backend/app/services/focus_group_response_service.py b/backend/app/services/focus_group_response_service.py index 67da7b3d..d21e2d67 100755 --- a/backend/app/services/focus_group_response_service.py +++ b/backend/app/services/focus_group_response_service.py @@ -49,7 +49,7 @@ async def generate_persona_response( print(f"🎭 Generating persona response for {persona.get('name', 'Unknown')}") print(f" - focus_group_id: {focus_group_id}") print(f" - current_topic: {current_topic[:50]}...") - if llm_model == 'gpt-5': + if llm_model == 'gpt-5.2': print(f" - llm_model: {llm_model} (reasoning_effort: {reasoning_effort or 'medium'}, verbosity: {verbosity or 'medium'}) [using Responses API]") else: print(f" - llm_model: {llm_model or 'default (gemini-3-pro-preview)'}") diff --git a/backend/app/services/llm_service.py b/backend/app/services/llm_service.py index 75ac3739..3e64b0ed 100755 --- a/backend/app/services/llm_service.py +++ b/backend/app/services/llm_service.py @@ -50,7 +50,7 @@ DEFAULT_MODEL = "gemini-3-pro-preview" SUPPORTED_MODELS = { 'gemini-3-pro-preview': 'gemini', 'gpt-4.1': 'openai', - 'gpt-5': 'openai' + 'gpt-5.2': 'openai' } class LLMServiceError(Exception): @@ -167,29 +167,29 @@ class LLMService: max_tokens: Maximum number of tokens to generate model_name: Optional model name to use system_prompt: Optional system prompt to define the role of the AI - reasoning_effort: GPT-5 only - Controls thinking time (minimal/low/medium/high) - verbosity: GPT-5 only - Controls response length (low/medium/high) - + reasoning_effort: GPT-5.2 only - Controls thinking time (minimal/low/medium/high) + verbosity: GPT-5.2 only - Controls response length (low/medium/high) + Returns: The generated text response - + Raises: LLMServiceError: If there's an issue with the generation """ logger = logging.getLogger(__name__) max_retries = 3 last_error = None - + actual_model = model_name or DEFAULT_MODEL provider = LLMService._get_model_provider(model_name) - + for attempt in range(max_retries): attempt_num = attempt + 1 logger.debug(f"LLM content generation attempt {attempt_num}/{max_retries} using {provider} provider") - + try: if provider == 'openai': - if actual_model == 'gpt-5': + if actual_model == 'gpt-5.2': # Use OpenAI Responses API for GPT-5 input_content = prompt if system_prompt: @@ -205,7 +205,7 @@ class LLMService: if reasoning_effort: reasoning_config["effort"] = reasoning_effort else: - reasoning_config["effort"] = "medium" # Default + reasoning_config["effort"] = "low" # Default kwargs["reasoning"] = reasoning_config # Add text configuration with verbosity @@ -398,9 +398,9 @@ class LLMService: max_tokens: Maximum tokens to generate model_name: Optional model name to use system_prompt: Optional system prompt to define the role of the AI - reasoning_effort: GPT-5 only - Controls thinking time (minimal/low/medium/high) - verbosity: GPT-5 only - Controls response length (low/medium/high) - + reasoning_effort: GPT-5.2 only - Controls thinking time (minimal/low/medium/high) + verbosity: GPT-5.2 only - Controls response length (low/medium/high) + Returns: A dictionary parsed from the JSON response @@ -438,9 +438,9 @@ class LLMService: max_tokens: Maximum tokens to generate model_name: Optional model name to use system_prompt: Optional system prompt to define the role of the AI - reasoning_effort: GPT-5 only - Controls thinking time (minimal/low/medium/high) - verbosity: GPT-5 only - Controls response length (low/medium/high) - + reasoning_effort: GPT-5.2 only - Controls thinking time (minimal/low/medium/high) + verbosity: GPT-5.2 only - Controls response length (low/medium/high) + Returns: A list of dictionaries parsed from the JSON array response @@ -530,8 +530,8 @@ class LLMService: }) logger.debug(f"Successfully loaded image for OpenAI: {image_path}") - if actual_model == 'gpt-5': - # Use Responses API for GPT-5 multimodal + if actual_model == 'gpt-5.2': + # Use Responses API for GPT-5.2 multimodal # Note: GPT-5 Responses API supports multimodal input input_content = [{"role": "user", "content": [{"type": "input_text", "text": prompt}]}] # Add images to the content array @@ -544,7 +544,7 @@ class LLMService: kwargs = { "model": actual_model, "input": input_content, - "reasoning": {"effort": "medium"}, # Default reasoning for multimodal + "reasoning": {"effort": "low"}, # Default reasoning for multimodal "text": { "verbosity": "medium", # Default verbosity for multimodal "format": {"type": "text"} @@ -677,12 +677,12 @@ class LLMService: temperature: Controls randomness in generation max_tokens: Maximum tokens to generate model_name: Optional model name to use - reasoning_effort: GPT-5 only - Controls thinking time (minimal/low/medium/high) - verbosity: GPT-5 only - Controls response length (low/medium/high) - + reasoning_effort: GPT-5.2 only - Controls thinking time (minimal/low/medium/high) + verbosity: GPT-5.2 only - Controls response length (low/medium/high) + Returns: The generated text response - + Raises: LLMServiceError: If there's an issue with generation """ @@ -756,8 +756,8 @@ class LLMService: } }) - if actual_model == 'gpt-5': - # Use Responses API for GPT-5 contextual multimodal + if actual_model == 'gpt-5.2': + # Use Responses API for GPT-5.2 contextual multimodal input_content = [{"role": "user", "content": [{"type": "input_text", "text": full_prompt}]}] # Add images to the content array for img_content in image_content: @@ -769,7 +769,7 @@ class LLMService: kwargs = { "model": actual_model, "input": input_content, - "reasoning": {"effort": reasoning_effort or "medium"}, + "reasoning": {"effort": reasoning_effort or "low"}, "text": { "verbosity": verbosity or "medium", "format": {"type": "text"} diff --git a/backend/app/services/persona_modification_service.py b/backend/app/services/persona_modification_service.py index 487681c7..aa7d3cfa 100755 --- a/backend/app/services/persona_modification_service.py +++ b/backend/app/services/persona_modification_service.py @@ -188,8 +188,8 @@ class PersonaModificationService: prompt=final_prompt, temperature=0.3, # Lower temperature for consistent modifications model_name=llm_model, - reasoning_effort=reasoning_effort if llm_model == 'gpt-5' else None, - verbosity=verbosity if llm_model == 'gpt-5' else None + reasoning_effort=reasoning_effort if llm_model == 'gpt-5.2' else None, + verbosity=verbosity if llm_model == 'gpt-5.2' else None ) # Parse JSON response diff --git a/dist/assets/discussionGuideMarkdown-eMXneipz.js b/dist/assets/discussionGuideMarkdown-eMXneipz.js old mode 100755 new mode 100644 diff --git a/dist/index.html b/dist/index.html old mode 100755 new mode 100644 index 8bff0d06..b50b672c --- a/dist/index.html +++ b/dist/index.html @@ -7,7 +7,7 @@ - + diff --git a/src/components/ai-recruiter/AIRecruiterForm.tsx b/src/components/ai-recruiter/AIRecruiterForm.tsx index 84731201..0662019a 100755 --- a/src/components/ai-recruiter/AIRecruiterForm.tsx +++ b/src/components/ai-recruiter/AIRecruiterForm.tsx @@ -348,7 +348,7 @@ export default function AIRecruiterForm({ onSubmit, isGenerating }: AIRecruiterF Gemini 3 Pro (Slow, best for most tasks) GPT-4.1 (Fast, best for speed) - GPT-5 (Slow, best for complex tasks) + GPT-5.2 (Slow, best for complex tasks) diff --git a/src/components/focus-group-session/SetupTab.tsx b/src/components/focus-group-session/SetupTab.tsx index a0020e9d..4c4c7c78 100755 --- a/src/components/focus-group-session/SetupTab.tsx +++ b/src/components/focus-group-session/SetupTab.tsx @@ -157,7 +157,7 @@ export function SetupTab({ Gemini 3 Pro (Slow, best for most tasks) GPT-4.1 (Fast, best for speed) - GPT-5 (Slow, best for complex tasks) + GPT-5.2 (Slow, best for complex tasks) @@ -169,7 +169,7 @@ export function SetupTab({ /> {/* GPT-5 specific parameters */} - {selectedModel === "gpt-5" && ( + {selectedModel === "gpt-5.2" && ( <> - Controls how much time GPT-5 spends thinking before responding + Controls how much time GPT-5.2 spends thinking before responding
- Controls how much time GPT-5 spends thinking before responding + Controls how much time GPT-5.2 spends thinking before responding
@@ -220,10 +220,10 @@ export function SetupTab({ - Controls how detailed and lengthy GPT-5's responses will be + Controls how detailed and lengthy GPT-5.2's responses will be
- Controls how much time GPT-5 spends thinking before responding + Controls how much time GPT-5.2 spends thinking before responding
diff --git a/src/components/persona/PersonaModificationModal.tsx b/src/components/persona/PersonaModificationModal.tsx index 7d6957b3..8a9958fd 100755 --- a/src/components/persona/PersonaModificationModal.tsx +++ b/src/components/persona/PersonaModificationModal.tsx @@ -229,7 +229,7 @@ export default function PersonaModificationModal({ Gemini 3 Pro (Slow, best for most tasks) GPT-4.1 (Fast, best for speed) - GPT-5 (Slow, best for complex tasks) + GPT-5.2 (Slow, best for complex tasks) @@ -241,7 +241,7 @@ export default function PersonaModificationModal({ /> {/* GPT-5 specific parameters */} - {form.watch("llm_model") === "gpt-5" && ( + {form.watch("llm_model") === "gpt-5.2" && ( <> {/* Reasoning Effort Parameter */} { try { const updateData: any = { llm_model: newModel }; - // Only include GPT-5 parameters if the model is GPT-5 - if (newModel === 'gpt-5') { + // Only include GPT-5.2 parameters if the model is GPT-5.2 + if (newModel === 'gpt-5.2') { updateData.reasoning_effort = reasoningEffort || selectedReasoningEffort; updateData.verbosity = verbosity || selectedVerbosity; } @@ -812,14 +812,14 @@ const FocusGroupSession = () => { setFocusGroup(prev => prev ? { ...prev, llm_model: newModel, - reasoning_effort: newModel === 'gpt-5' ? (reasoningEffort || selectedReasoningEffort) : prev?.reasoning_effort, - verbosity: newModel === 'gpt-5' ? (verbosity || selectedVerbosity) : prev?.verbosity + reasoning_effort: newModel === 'gpt-5.2' ? (reasoningEffort || selectedReasoningEffort) : prev?.reasoning_effort, + verbosity: newModel === 'gpt-5.2' ? (verbosity || selectedVerbosity) : prev?.verbosity } : null); toastService.success('AI Model Updated', { description: `Focus group will now use ${ newModel === 'gemini-3-pro-preview' ? 'Gemini 3 Pro' : newModel === 'gpt-4.1' ? 'GPT-4.1' : - newModel === 'gpt-5' ? 'GPT-5' : newModel + newModel === 'gpt-5.2' ? 'GPT-5.2' : newModel } for AI responses` }); setShowModelSettings(false); @@ -1935,7 +1935,7 @@ const FocusGroupSession = () => { {focusGroup.llm_model === 'gpt-4.1' ? 'GPT-4.1' : - focusGroup.llm_model === 'gpt-5' ? 'GPT-5' : 'Gemini 3 Pro'} + focusGroup.llm_model === 'gpt-5.2' ? 'GPT-5.2' : 'Gemini 3 Pro'} @@ -2303,7 +2303,7 @@ const FocusGroupSession = () => { Current Model: {focusGroup?.llm_model === 'gpt-4.1' ? 'GPT-4.1' : - focusGroup?.llm_model === 'gpt-5' ? 'GPT-5' : 'Gemini 3 Pro'} + focusGroup?.llm_model === 'gpt-5.2' ? 'GPT-5.2' : 'Gemini 3 Pro'} @@ -2319,13 +2319,13 @@ const FocusGroupSession = () => { Gemini 3 Pro (Slow, best for most tasks) GPT-4.1 (Fast, best for speed) - GPT-5 (Slow, best for complex tasks) + GPT-5.2 (Slow, best for complex tasks) - {/* GPT-5 specific parameters - only show when GPT-5 is selected */} - {selectedModel === "gpt-5" && ( + {/* GPT-5.2 specific parameters - only show when GPT-5.2 is selected */} + {selectedModel === "gpt-5.2" && ( <> {/* Reasoning Effort Parameter */}
@@ -2342,10 +2342,10 @@ const FocusGroupSession = () => {

- Controls how much time GPT-5 spends thinking before responding + Controls how much time GPT-5.2 spends thinking before responding

-Controls how thoroughly GPT-5 thinks and how detailed responses are +Controls how thoroughly GPT-5.2 thinks and how detailed responses are

@@ -2363,10 +2363,10 @@ Controls how thoroughly GPT-5 thinks and how detailed responses are

- Controls how detailed and lengthy GPT-5's responses will be + Controls how detailed and lengthy GPT-5.2's responses will be

-Controls how thoroughly GPT-5 thinks and how detailed responses are +Controls how thoroughly GPT-5.2 thinks and how detailed responses are

@@ -2375,7 +2375,7 @@ Controls how thoroughly GPT-5 thinks and how detailed responses are

Gemini 3 Pro: Google's advanced model, great for creative and analytical tasks.

GPT-4.1: OpenAI's latest model, excellent for conversational and reasoning tasks.

-

GPT-5: OpenAI's newest model with advanced reasoning and customizable response styles.

+

GPT-5.2: OpenAI's newest model with advanced reasoning and customizable response styles.

@@ -2395,14 +2395,14 @@ Controls how thoroughly GPT-5 thinks and how detailed responses are selectedVerbosity, currentModel: focusGroup?.llm_model, isDisabled: isUpdatingModel || (selectedModel === focusGroup?.llm_model && - (selectedModel !== 'gpt-5' || + (selectedModel !== 'gpt-5.2' || (selectedReasoningEffort === focusGroup?.reasoning_effort && selectedVerbosity === focusGroup?.verbosity))) }); updateFocusGroupModel(selectedModel, selectedReasoningEffort, selectedVerbosity); }} disabled={isUpdatingModel || (selectedModel === focusGroup?.llm_model && - (selectedModel !== 'gpt-5' || + (selectedModel !== 'gpt-5.2' || (selectedReasoningEffort === (focusGroup?.reasoning_effort || 'medium') && selectedVerbosity === (focusGroup?.verbosity || 'medium'))))} >