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 <noreply@anthropic.com>
This commit is contained in:
michael 2026-02-11 11:24:01 -06:00
parent d4ce5d99bc
commit b0445de18b
11 changed files with 60 additions and 60 deletions

View file

@ -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

View file

@ -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)")

View file

@ -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)'}")

View file

@ -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"}

View file

@ -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

0
dist/assets/discussionGuideMarkdown-eMXneipz.js vendored Executable file → Normal file
View file

2
dist/index.html vendored Executable file → Normal file
View file

@ -7,7 +7,7 @@
<meta name="description" content="Lovable Generated Project" />
<meta name="author" content="Lovable" />
<meta property="og:image" content="/og-image.png" />
<script type="module" crossorigin src="/semblance/assets/index-CBWMgQjQ.js"></script>
<script type="module" crossorigin src="/semblance/assets/index-DJEoWfJ1.js"></script>
<link rel="stylesheet" crossorigin href="/semblance/assets/index-BXi7zFOG.css">
</head>

View file

@ -348,7 +348,7 @@ export default function AIRecruiterForm({ onSubmit, isGenerating }: AIRecruiterF
<SelectContent>
<SelectItem value="gemini-3-pro-preview">Gemini 3 Pro (Slow, best for most tasks)</SelectItem>
<SelectItem value="gpt-4.1">GPT-4.1 (Fast, best for speed)</SelectItem>
<SelectItem value="gpt-5">GPT-5 (Slow, best for complex tasks)</SelectItem>
<SelectItem value="gpt-5.2">GPT-5.2 (Slow, best for complex tasks)</SelectItem>
</SelectContent>
</Select>
<FormDescription>

View file

@ -157,7 +157,7 @@ export function SetupTab({
<SelectContent>
<SelectItem value="gemini-3-pro-preview">Gemini 3 Pro (Slow, best for most tasks)</SelectItem>
<SelectItem value="gpt-4.1">GPT-4.1 (Fast, best for speed)</SelectItem>
<SelectItem value="gpt-5">GPT-5 (Slow, best for complex tasks)</SelectItem>
<SelectItem value="gpt-5.2">GPT-5.2 (Slow, best for complex tasks)</SelectItem>
</SelectContent>
</Select>
<FormDescription>
@ -169,7 +169,7 @@ export function SetupTab({
/>
{/* GPT-5 specific parameters */}
{selectedModel === "gpt-5" && (
{selectedModel === "gpt-5.2" && (
<>
<FormField
control={form.control}
@ -191,10 +191,10 @@ export function SetupTab({
</SelectContent>
</Select>
<FormDescription>
Controls how much time GPT-5 spends thinking before responding
Controls how much time GPT-5.2 spends thinking before responding
</FormDescription>
<div className="text-xs text-amber-600 font-medium mt-1">
Controls how much time GPT-5 spends thinking before responding
Controls how much time GPT-5.2 spends thinking before responding
</div>
<FormMessage />
</FormItem>
@ -220,10 +220,10 @@ export function SetupTab({
</SelectContent>
</Select>
<FormDescription>
Controls how detailed and lengthy GPT-5's responses will be
Controls how detailed and lengthy GPT-5.2's responses will be
</FormDescription>
<div className="text-xs text-amber-600 font-medium mt-1">
Controls how much time GPT-5 spends thinking before responding
Controls how much time GPT-5.2 spends thinking before responding
</div>
<FormMessage />
</FormItem>

View file

@ -229,7 +229,7 @@ export default function PersonaModificationModal({
<SelectContent>
<SelectItem value="gemini-3-pro-preview">Gemini 3 Pro (Slow, best for most tasks)</SelectItem>
<SelectItem value="gpt-4.1">GPT-4.1 (Fast, best for speed)</SelectItem>
<SelectItem value="gpt-5">GPT-5 (Slow, best for complex tasks)</SelectItem>
<SelectItem value="gpt-5.2">GPT-5.2 (Slow, best for complex tasks)</SelectItem>
</SelectContent>
</Select>
<FormDescription>
@ -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 */}
<FormField

View file

@ -797,8 +797,8 @@ const FocusGroupSession = () => {
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 = () => {
<Bot className="h-3 w-3 text-slate-500 mr-1" />
<Badge variant="secondary" className="text-xs">
{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'}
</Badge>
</div>
</div>
@ -2303,7 +2303,7 @@ const FocusGroupSession = () => {
<span className="text-sm font-medium">Current Model:</span>
<Badge variant="secondary">
{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'}
</Badge>
</div>
@ -2319,13 +2319,13 @@ const FocusGroupSession = () => {
<SelectContent>
<SelectItem value="gemini-3-pro-preview">Gemini 3 Pro (Slow, best for most tasks)</SelectItem>
<SelectItem value="gpt-4.1">GPT-4.1 (Fast, best for speed)</SelectItem>
<SelectItem value="gpt-5">GPT-5 (Slow, best for complex tasks)</SelectItem>
<SelectItem value="gpt-5.2">GPT-5.2 (Slow, best for complex tasks)</SelectItem>
</SelectContent>
</Select>
</div>
{/* 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 */}
<div>
@ -2342,10 +2342,10 @@ const FocusGroupSession = () => {
</SelectContent>
</Select>
<p className="text-xs text-slate-600 mt-1">
Controls how much time GPT-5 spends thinking before responding
Controls how much time GPT-5.2 spends thinking before responding
</p>
<p className="text-xs text-amber-600 font-medium mt-1">
Controls how thoroughly GPT-5 thinks and how detailed responses are
Controls how thoroughly GPT-5.2 thinks and how detailed responses are
</p>
</div>
@ -2363,10 +2363,10 @@ Controls how thoroughly GPT-5 thinks and how detailed responses are
</SelectContent>
</Select>
<p className="text-xs text-slate-600 mt-1">
Controls how detailed and lengthy GPT-5's responses will be
Controls how detailed and lengthy GPT-5.2's responses will be
</p>
<p className="text-xs text-amber-600 font-medium mt-1">
Controls how thoroughly GPT-5 thinks and how detailed responses are
Controls how thoroughly GPT-5.2 thinks and how detailed responses are
</p>
</div>
</>
@ -2375,7 +2375,7 @@ Controls how thoroughly GPT-5 thinks and how detailed responses are
<div className="text-xs text-slate-600">
<p><strong>Gemini 3 Pro:</strong> Google's advanced model, great for creative and analytical tasks.</p>
<p><strong>GPT-4.1:</strong> OpenAI's latest model, excellent for conversational and reasoning tasks.</p>
<p><strong>GPT-5:</strong> OpenAI's newest model with advanced reasoning and customizable response styles.</p>
<p><strong>GPT-5.2:</strong> OpenAI's newest model with advanced reasoning and customizable response styles.</p>
</div>
</div>
@ -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'))))}
>