-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathopenenv_entrypoint.sh
More file actions
43 lines (40 loc) · 1.21 KB
/
openenv_entrypoint.sh
File metadata and controls
43 lines (40 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env bash
set -euo pipefail
# Generate pi models.json from env vars (if agent config is provided)
if [ -n "${FSWE_AGENT_API_URL:-}" ]; then
mkdir -p /root/.pi/agent
cat > /root/.pi/agent/models.json <<MODELS_EOF
{
"providers": {
"openai-compat": {
"baseUrl": "${FSWE_AGENT_API_URL}",
"api": "openai-completions",
"apiKey": "${FSWE_AGENT_API_KEY:-}",
"compat": {
"supportsDeveloperRole": false,
"supportsReasoningEffort": false
},
"models": [
{
"id": "${FSWE_AGENT_MODEL:-qwen-3.5-27b}",
"name": "${FSWE_AGENT_MODEL:-qwen-3.5-27b}",
"reasoning": true,
"input": ["text"],
"contextWindow": 131072,
"maxTokens": 65536
}
]
}
}
}
MODELS_EOF
echo "Generated /root/.pi/agent/models.json for provider=openai-compat model=${FSWE_AGENT_MODEL:-qwen-3.5-27b}"
fi
# Start the task timer (budget countdown from the base workspace)
if [ -x /app/timer.sh ]; then
FRONTIER_TIMER_BOOTSTRAP=1 env -u BASH_ENV -u ENV /app/timer.sh &
fi
# Start the OpenEnv FastAPI server
cd /opt/openenv
exec uvicorn frontier_swe_env.server.app:app \
--host 0.0.0.0 --port 8000 --log-level info