Prefer OPENHARNESS_<PROVIDER>_API_KEY variables over provider-native globals while resolving API-key auth. Keep provider-native variables as fallback and avoid applying unrelated native keys across active profiles.
Forward the OpenHarness-scoped auth/provider environment variables to spawned teammates.
Based-on: #93
Forward OpenHarness config/data env vars to spawned teammates and apply CLI permission_mode overrides to Settings.permission.mode so full_auto survives sub-agent startup paths.
Fixes#274
Both built-in agents previously set model="haiku", which caused
subprocess spawning to fail for users running any non-Anthropic provider
(OpenAI, Bedrock, custom base URLs, etc.) because the literal string
"haiku" is not a valid model on those APIs.
Changes:
- Explore and claude-code-guide now use model="inherit", consistent
with the existing Plan and verification built-in agents.
- build_inherited_cli_flags now skips the --model flag when the value
is "inherit", so the subprocess inherits the parent model via the
OPENHARNESS_MODEL env var that build_inherited_env_vars already
forwards. Previously "inherit" was passed verbatim as a model name,
which would have also broken Plan and verification agents.
Tests added:
- build_inherited_cli_flags: model="inherit" and model=None produce no
--model flag; a real model name is included as expected.
- Builtin agent definitions: Explore and claude-code-guide must not
reference Anthropic-only model aliases; Plan, verification, Explore,
and claude-code-guide must all use None or "inherit".
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>