Skip to content

Commit c9c5463

Browse files
committed
auto_run cannot be set over the server
1 parent 5af6f9d commit c9c5463

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

interpreter/core/async_core.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,10 @@ async def set_settings(payload: Dict[str, Any]):
533533
for key, value in payload.items():
534534
print(f"Updating settings: {key} = {value}")
535535
if key in ["llm", "computer"] and isinstance(value, dict):
536+
if key == "auto_run":
537+
return {
538+
"error": f"The setting {key} is not modifiable through the server due to security constraints."
539+
}, 403
536540
if hasattr(async_interpreter, key):
537541
for sub_key, sub_value in value.items():
538542
if hasattr(getattr(async_interpreter, key), sub_key):

interpreter/core/llm/run_function_calling_llm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def run_function_calling_llm(llm, request_params):
5454
if "content" in delta and delta["content"]:
5555
if function_call_detected:
5656
# More content after a code block? This is a code review by a judge layer.
57+
# print("Code safety review:", delta["content"])
5758
if delta["content"].strip() == "<SAFE>":
5859
yield {"type": "review", "format": "safe", "content": ""}
5960
elif "<UNSAFE>" in delta["content"]:

0 commit comments

Comments
 (0)