Skip to content

Commit 9cff457

Browse files
committed
feat: forward model config env vars to sandbox in execute_skills
1 parent be38ca5 commit 9cff457

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

veadk/tools/builtin_tools/execute_skills.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,17 @@ def execute_skills(
173173
"PYTHONPATH": "$SRV_PYTHONPATH:$PYTHONPATH",
174174
}
175175

176+
# 注入模型配置,让沙箱使用与本地 Agent 相同的模型。
177+
for model_key in [
178+
"MODEL_AGENT_NAME",
179+
"MODEL_AGENT_PROVIDER",
180+
"MODEL_AGENT_API_BASE",
181+
"MODEL_AGENT_API_KEY",
182+
]:
183+
model_val = os.getenv(model_key, "")
184+
if model_val:
185+
env_vars[model_key] = model_val
186+
176187
code = f"""
177188
import subprocess
178189
import os

0 commit comments

Comments
 (0)