feat: forward model config env vars to sandbox in execute_skillsvars to sandbox in execute_skills#547
Open
tinawenqiao wants to merge 1 commit intovolcengine:mainfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: feat: forward model config env vars to sandbox in execute_skills
Problem
When
execute_skillsinvokes the remote AIO sandbox, it only passes these environment variables:The sandbox then falls back to the default model baked into its Docker image (e.g.,
doubao-seed-2-0-lite), completely ignoring any model configuration set in the local.envoragentkit.yaml.This means users who configure a custom model (e.g., OpenAI, Anthropic, or a third-party proxy) via
MODEL_AGENT_NAME/MODEL_AGENT_PROVIDER/MODEL_AGENT_API_BASE/MODEL_AGENT_API_KEYcannot use that model inside the sandbox.Scenario
User configures
.env:Local Agent works fine with gpt-4o-mini. But when
execute_skillsinvokes the sandbox, the sandbox's internal agent still usesdoubao-seed-2-0-litebecause these env vars are not forwarded.Solution
Forward model-related environment variables to the sandbox via
env_vars, so the sandbox's internal agent respects the same model configuration as the local agent.The sandbox's
VeADKConfig(inconfig.py) already reads these env vars at startup — we just need to pass them through.Changes
In
veadk/tools/builtin_tools/execute_skills.py, after theenv_varsdict construction, inject model configuration:Backward Compatibility
if key not in envcheck in the sandbox wrapper code ensures existing env vars in the sandbox image are not overwritten.