Skip to content

Commit 888c5e3

Browse files
authored
feat(frontend): update frontend (#340)
* init * have all sections on Frontend * update models * add gpt 5 series special param * update * update the full pipeline * clean quick setup * fix eslint errors * clean up * Fix frontend-backend compatibility issues - Expand env_var_map in backend to cover all model options exposed in the frontend selector (GPT-5 variants, GPT-4.1 variants, o3/o4, all Claude 4.x variants, Gemini 2.x variants) - Replace hardcoded http://localhost:5000 URLs with relative paths so the app works in any deployment environment: - DimensionSelectorModal.jsx: /api/suggest-dimensions - LogDisplay.jsx: socket.io now connects via window.location.origin * Fix frontend logic bugs found in pipeline audit - /api/code: backend returns HTTP 200 with success=false when code execution fails; frontend was only checking response.ok/data.error and would incorrectly advance to code_done state. Now also checks data.success === false and surfaces error_details to the user. - generateChildNodes: function uses selectedNode state but was being called with pendingMerge.sourceNode as an argument (ignored). Added optional overrideNode parameter so the caller can pass a node directly, bypassing stale React state. - DimensionSelector.jsx: /api/suggest-dimensions call was missing credentials:include and response.ok check, causing silent failures on backend errors. * Set temperature=1.0 for Thinker and Reviewer to fix reasoning model errors * fix agent sdk
1 parent 4b3ddd6 commit 888c5e3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+12785
-3398
lines changed

backend/app.py

Lines changed: 687 additions & 133 deletions
Large diffs are not rendered by default.

config.template.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#name = "AI Scientist"
1010

1111
# LLM Model
12-
model = "gpt-4o"
12+
model = "gpt-5-mini"
1313

1414
# Temperature for controlling randomness in responses
1515
temperature = 0.75

examples/code.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import os
44
from typing import Any, Dict
55

6-
import _bootstrap
76
from tiny_scientist.budget_checker import BudgetChecker
87

98
# Import the Coder class - assuming it's in a module called "coder"

examples/demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import json
22
import os
33

4-
import _bootstrap
54
from tiny_scientist import TinyScientist
65

76
scientist = TinyScientist(

examples/draw.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import json
44
import os
55

6-
import _bootstrap
76
from tiny_scientist.tool_impls import DrawerTool
87

98

@@ -25,8 +24,8 @@ def parse_args() -> argparse.Namespace:
2524
parser.add_argument(
2625
"--model",
2726
type=str,
28-
default="claude-3-5-sonnet-20241022",
29-
help="LLM model to use (default: claude-3-5-sonnet-20241022)",
27+
default="gpt-5-mini",
28+
help="LLM model to use (default: gpt-5-mini)",
3029
)
3130
parser.add_argument(
3231
"--output",

examples/hf_auto_eval.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import argparse
22

3-
import _bootstrap
43
from tiny_scientist import TinyScientist
54

65

examples/latex_compile.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import _bootstrap
21
from tiny_scientist.utils.llm import create_client
32
from tiny_scientist.utils.output_formatter import ACLOutputFormatter
43
from tiny_scientist.utils.water_marker import WaterMarker
54

6-
client = create_client(model="gpt-4o")
7-
formatter = ACLOutputFormatter(model="gpt-4o", client=client)
5+
client = create_client(model="gpt-5-mini")
6+
formatter = ACLOutputFormatter(model="gpt-5-mini", client=client)
87
watermarker = WaterMarker()
98
formatter._compile_latex(
109
cwd="../latex", output_pdf_path="../latex/output.pdf", timeout=1000

examples/review.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import os.path as osp
55
from typing import Any, List
66

7-
import _bootstrap
87
from tiny_scientist.reviewer import Reviewer
98
from tiny_scientist.utils.llm import AVAILABLE_LLMS
109

examples/think.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import os
55
from typing import Any, Dict, cast
66

7-
import _bootstrap
87
from tiny_scientist.thinker import Thinker
98
from tiny_scientist.utils.input_formatter import InputFormatter
109
from tiny_scientist.utils.llm import AVAILABLE_LLMS

examples/write.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import json
44
import os
55

6-
import _bootstrap
76
from tiny_scientist.writer import Writer
87

98

0 commit comments

Comments
 (0)