Use gpt-5 as default

This commit is contained in:
Ahmed Allam
2025-08-11 18:00:24 -07:00
parent 81ac98e8b9
commit 139faed8ed
13 changed files with 724 additions and 706 deletions
+2 -2
View File
@@ -58,8 +58,8 @@ class SplashScreen(Static): # type: ignore[misc]
███████╗████████╗██████╗ ██╗██╗ ██╗
██╔════╝╚══██╔══╝██╔══██╗██║╚██╗██╔╝
███████╗ ██║ ██████╔╝██║ ╚███╔╝
╚════██║ ██║ ██╔══██╗██║ ██╔██╗
███████╗ ██║ ██████╔╝██║ ╚███╔╝
╚════██║ ██║ ██╔══██╗██║ ██╔██╗
███████║ ██║ ██║ ██║██║██╔╝ ██╗
╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝
+26 -4
View File
@@ -12,6 +12,7 @@ import sys
from pathlib import Path
from typing import Any
from urllib.parse import urlparse
import shutil
import docker
import litellm
@@ -73,7 +74,7 @@ def validate_environment() -> None:
error_text.append("", style="white")
error_text.append("STRIX_LLM", style="bold cyan")
error_text.append(
" - Model name to use with litellm (e.g., 'anthropic/claude-sonnet-4-20250514')\n",
" - Model name to use with litellm (e.g., 'openai/gpt-5')\n",
style="white",
)
error_text.append("", style="white")
@@ -91,7 +92,7 @@ def validate_environment() -> None:
error_text.append("\nExample setup:\n", style="white")
error_text.append(
"export STRIX_LLM='anthropic/claude-sonnet-4-20250514'\n", style="dim white"
"export STRIX_LLM='openai/gpt-5'\n", style="dim white"
)
error_text.append("export LLM_API_KEY='your-api-key-here'\n", style="dim white")
if missing_optional_vars:
@@ -118,11 +119,32 @@ def _validate_llm_response(response: Any) -> None:
raise RuntimeError("Invalid response from LLM")
def check_docker_installed() -> None:
if shutil.which("docker") is None:
console = Console()
error_text = Text()
error_text.append("", style="bold red")
error_text.append("DOCKER NOT INSTALLED", style="bold red")
error_text.append("\n\n", style="white")
error_text.append("The 'docker' CLI was not found in your PATH.\n", style="white")
error_text.append("Please install Docker and ensure the 'docker' command is available.\n\n", style="white")
panel = Panel(
error_text,
title="[bold red]🛡️ STRIX STARTUP ERROR",
title_align="center",
border_style="red",
padding=(1, 2),
)
console.print("\n", panel, "\n")
sys.exit(1)
async def warm_up_llm() -> None:
console = Console()
try:
model_name = os.getenv("STRIX_LLM", "anthropic/claude-sonnet-4-20250514")
model_name = os.getenv("STRIX_LLM", "openai/gpt-5")
api_key = os.getenv("LLM_API_KEY")
if api_key:
@@ -136,7 +158,6 @@ async def warm_up_llm() -> None:
response = litellm.completion(
model=model_name,
messages=test_messages,
max_tokens=10,
)
_validate_llm_response(response)
@@ -523,6 +544,7 @@ def main() -> None:
if sys.platform == "win32":
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
check_docker_installed()
pull_docker_image()
validate_environment()
@@ -84,16 +84,10 @@ class AgentFinishRenderer(BaseToolRenderer):
)
if result_summary:
summary_display = (
result_summary[:400] + "..." if len(result_summary) > 400 else result_summary
)
content_parts = [f"{header}\n [bold]{cls.escape_markup(summary_display)}[/]"]
content_parts = [f"{header}\n [bold]{cls.escape_markup(result_summary)}[/]"]
if findings and isinstance(findings, list):
finding_lines = [f"{finding}" for finding in findings[:3]]
if len(findings) > 3:
finding_lines.append(f"• ... +{len(findings) - 3} more findings")
finding_lines = [f"{finding}" for finding in findings]
content_parts.append(
f" [dim]{chr(10).join([cls.escape_markup(line) for line in finding_lines])}[/]"
)
+1 -2
View File
@@ -23,8 +23,7 @@ class FinishScanRenderer(BaseToolRenderer):
)
if content:
content_display = content[:600] + "..." if len(content) > 600 else content
content_text = f"{header}\n [bold]{cls.escape_markup(content_display)}[/]"
content_text = f"{header}\n [bold]{cls.escape_markup(content)}[/]"
else:
content_text = f"{header}\n [dim]Generating final report...[/]"
@@ -31,8 +31,7 @@ class CreateVulnerabilityReportRenderer(BaseToolRenderer):
)
if content:
content_preview = content[:100] + "..." if len(content) > 100 else content
content_parts.append(f" [dim]{cls.escape_markup(content_preview)}[/]")
content_parts.append(f" [dim]{cls.escape_markup(content)}[/]")
content_text = "\n".join(content_parts)
else:
@@ -51,8 +51,7 @@ class SubagentStartInfoRenderer(BaseToolRenderer):
content = f"🤖 Spawned subagent [bold #22c55e]{name}[/bold #22c55e]"
if task:
display_task = task[:80] + "..." if len(task) > 80 else task
content += f"\n Task: [dim]{display_task}[/dim]"
content += f"\n Task: [dim]{task}[/dim]"
css_classes = cls.get_css_classes(status)
return Static(content, classes=css_classes)
+1 -2
View File
@@ -54,8 +54,7 @@ class Tracer:
def get_run_dir(self) -> Path:
if self._run_dir is None:
workspace_root = Path(__file__).parent.parent.parent
runs_dir = workspace_root / "agent_runs"
runs_dir = Path.cwd() / "agent_runs"
runs_dir.mkdir(exist_ok=True)
run_dir_name = self.run_name if self.run_name else self.run_id