Files
zeekayandHanzo Dev 8285327e61 feat(sandbox): profiles, and a CPU cap that outlives the timeout
A restricted policy hides the interpreters a model-run command needs, so its first import
fails. `--agent` and `--enable-code-execution` now pick a developer profile that opens
the toolchain roots; everything else stays restricted, and explicit flags still win.

The CPU rlimit could fire before the execution timeout reported anything. It is now
raised to cover the timeout wherever rlimits apply, and code execution defaults to 60s.

The example config documents the profile, and a test loads it, since nothing did.


Co-authored-by: Hanzo Dev <[email protected]>
2026-09-15 15:46:16 -07:00

46 lines
1.0 KiB
TOML

command = "serve"
[server]
host = "0.0.0.0"
port = 1234
[runtime]
max_seqs = 32
enable_search = true
search_embedding_model = "embedding-gemma"
# code_exec_permission = "auto" # "auto" | "ask" | "deny"
[paged_attn]
mode = "auto"
# OS-level sandbox applied to model-generated code execution.
# mode = "auto"|"on"|"off" (auto = on for Linux/macOS, no-op elsewhere)
# profile = "developer"|"restricted" (developer is the default once agent or code tools are on)
# network defaults to "full" for developer and "loopback" for restricted.
# Limits and network override the profile defaults when set.
[sandbox]
mode = "auto"
profile = "developer"
max_memory_mb = 2048
max_cpu_secs = 600
max_procs = 64
# network = "loopback" # "none" | "loopback" | "full"
[[models]]
kind = "auto"
model_id = "meta-llama/Llama-3.2-3B-Instruct"
[models.quantization]
in_situ_quant = "4"
[[models]]
kind = "multimodal"
model_id = "Qwen/Qwen2-VL-2B-Instruct"
[models.multimodal]
max_num_images = 4
[[models]]
kind = "embedding"
model_id = "google/embeddinggemma-300m"