Skip to content

Commit d56efea

Browse files
rootclaude
authored andcommitted
Add Phi Silica tool calling with smart diagnostic selection
- Implement multi-turn tool calling for Phi Silica (planning + analysis) - Add keyword-based diagnostic suggestions (make/model -> comp_system, bios) - Return structured response with actual diagnostics_run from backend - Fix frontend to display actual diagnostics instead of hardcoded defaults - Add context size limits (MAX_DIAGNOSTICS=6, MAX_OUTPUT_CHARS=2000) - Clearer analysis prompts to prevent question rephrasing - Update OpenAI model from gpt-5-nano to gpt-5.2 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d213a47 commit d56efea

File tree

4 files changed

+408
-28
lines changed

4 files changed

+408
-28
lines changed

src-tauri/src/openai_integration.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Remember: Take action FIRST, explain SECOND. Never ask, just do.")
167167

168168
// Create the request
169169
let request = CreateChatCompletionRequestArgs::default()
170-
.model("gpt-5-nano")
170+
.model("gpt-5.2")
171171
.messages(messages.clone())
172172
.tools(vec![diagnostic_tool, get_all_diagnostics_tool])
173173
.tool_choice("auto")
@@ -260,7 +260,7 @@ Remember: Take action FIRST, explain SECOND. Never ask, just do.")
260260

261261
// Create final request to get analysis of diagnostic results
262262
let final_request = CreateChatCompletionRequestArgs::default()
263-
.model("gpt-5-nano")
263+
.model("gpt-5.2")
264264
.messages(messages)
265265
.build()?;
266266

@@ -499,7 +499,7 @@ REMEMBER: The user wants ACTION, not explanations of what you could do. RUN DIAG
499499

500500
// Create request with tools
501501
let request = CreateChatCompletionRequestArgs::default()
502-
.model("gpt-5-nano")
502+
.model("gpt-5.2")
503503
.messages(messages.clone())
504504
.tools(vec![diagnostic_tool])
505505
.tool_choice("auto")
@@ -520,7 +520,7 @@ REMEMBER: The user wants ACTION, not explanations of what you could do. RUN DIAG
520520
if error_msg.contains("401") || error_msg.contains("Unauthorized") {
521521
return Err("Invalid API key. Please check your OpenAI API key is correct and starts with 'sk-'.".to_string());
522522
} else if error_msg.contains("404") {
523-
return Err("Model not found. The model 'gpt-5' may not be available on your account.".to_string());
523+
return Err("Model not found. The model 'gpt-5.2' may not be available on your account.".to_string());
524524
} else if error_msg.contains("429") {
525525
return Err("Rate limit exceeded. Please wait a moment and try again.".to_string());
526526
} else if error_msg.contains("insufficient_quota") {
@@ -598,7 +598,7 @@ REMEMBER: The user wants ACTION, not explanations of what you could do. RUN DIAG
598598

599599
// Get final response with diagnostic results
600600
let final_request = CreateChatCompletionRequestArgs::default()
601-
.model("gpt-5-nano")
601+
.model("gpt-5.2")
602602
.messages(messages)
603603
.build()
604604
.map_err(|e| format!("Failed to build final request: {}", e))?;

0 commit comments

Comments
 (0)