Summary
The gemini agent advertises GOOGLE_API_KEY as its required env var, but setting only GOOGLE_API_KEY on the host does not authenticate the agent — the run fails inside the sandbox with ACP error -32000: Gemini API key is missing or not configured. Setting GEMINI_API_KEY makes it work.
Evidence
benchflow agent show gemini:
and src/benchflow/agents/registry.py → requires_env=["GOOGLE_API_KEY"] for the gemini agent.
But infer_env_key_for_model() returns GEMINI_API_KEY for gemini models (registry.py, ~line 609: if "gemini" in m: return "GEMINI_API_KEY"), and SubscriptionAuth(replaces_env="GEMINI_API_KEY", ...).
Repro
# fails — host has only GOOGLE_API_KEY
export GOOGLE_API_KEY=<key>
benchflow eval create --tasks-dir <tasks> --agent gemini --model gemini-2.5-flash --sandbox docker
# → ACP error -32000: Gemini API key is missing or not configured.
# works — host has GEMINI_API_KEY
export GEMINI_API_KEY=<key>
benchflow eval create --tasks-dir <tasks> --agent gemini --model gemini-2.5-flash --sandbox docker
# → reward 1.0
Impact
A user following benchflow agent show gemini / the requires_env list sets GOOGLE_API_KEY and gets an opaque in-sandbox auth failure.
Suggested fix
Make these consistent — either honor GOOGLE_API_KEY (forward it as the agent-native var the gemini CLI reads), or change requires_env / agent show to advertise GEMINI_API_KEY.
Environment
benchflow @ main, model gemini-2.5-flash, docker sandbox, host Ubuntu 22.04.
Summary
The
geminiagent advertisesGOOGLE_API_KEYas its required env var, but setting onlyGOOGLE_API_KEYon the host does not authenticate the agent — the run fails inside the sandbox withACP error -32000: Gemini API key is missing or not configured.SettingGEMINI_API_KEYmakes it work.Evidence
benchflow agent show gemini:and
src/benchflow/agents/registry.py→requires_env=["GOOGLE_API_KEY"]for the gemini agent.But
infer_env_key_for_model()returnsGEMINI_API_KEYfor gemini models (registry.py, ~line 609:if "gemini" in m: return "GEMINI_API_KEY"), andSubscriptionAuth(replaces_env="GEMINI_API_KEY", ...).Repro
Impact
A user following
benchflow agent show gemini/ therequires_envlist setsGOOGLE_API_KEYand gets an opaque in-sandbox auth failure.Suggested fix
Make these consistent — either honor
GOOGLE_API_KEY(forward it as the agent-native var the gemini CLI reads), or changerequires_env/agent showto advertiseGEMINI_API_KEY.Environment
benchflow @
main, modelgemini-2.5-flash, docker sandbox, host Ubuntu 22.04.