Spaces:
Running
Running
Commit ·
5d45d14
1
Parent(s): 3b7a6b9
Fix: look for hardware_flavor at top level of tool_args, not nested
Browse files- agent/core/agent_loop.py +2 -2
agent/core/agent_loop.py
CHANGED
|
@@ -55,8 +55,8 @@ def _needs_approval(tool_name: str, tool_args: dict, config: Config | None = Non
|
|
| 55 |
return False
|
| 56 |
|
| 57 |
# Check if this is a CPU-only job
|
| 58 |
-
|
| 59 |
-
hardware_flavor =
|
| 60 |
is_cpu_job = hardware_flavor in CPU_FLAVORS
|
| 61 |
|
| 62 |
if is_cpu_job:
|
|
|
|
| 55 |
return False
|
| 56 |
|
| 57 |
# Check if this is a CPU-only job
|
| 58 |
+
# hardware_flavor is at top level of tool_args, not nested in args
|
| 59 |
+
hardware_flavor = tool_args.get("hardware_flavor") or tool_args.get("flavor") or tool_args.get("hardware") or "cpu-basic"
|
| 60 |
is_cpu_job = hardware_flavor in CPU_FLAVORS
|
| 61 |
|
| 62 |
if is_cpu_job:
|