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
Remove the hard-coded nanobot name from Telegram /start and /help responses and sanitize dangling tool-use turns before continue_pending resumes a session.
`TelegramChannel.send` reads `self.config.reply_to_message` in the
outbound path, but the field was never declared on `TelegramConfig` —
only `ohmo init` (interactive mode) wrote it as a free-form key into
gateway.json. Configs that do not go through the interactive prompt —
`ohmo init --no-interactive`, pre-0.1.9 hand-written gateway.json, the
docs example — never have the key set, so every outbound message
crashes with `AttributeError: 'TelegramConfig' object has no attribute
'reply_to_message'` and the bot appears completely silent to the user.
Add `reply_to_message: bool = True` to `TelegramConfig` so the attribute
always exists. The default matches the interactive `ohmo init` default
(`default=bool(prior.get("reply_to_message", True))` in `ohmo/cli.py`),
so non-interactive and interactive configs that accept defaults behave
identically.
Same shape as #192 (proxy field), which added a missing `TelegramConfig`
attribute the implementation already assumed.
Closes#243
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a built-in NVIDIA NIM OpenAI-compatible workflow that reads NVIDIA_API_KEY, document the backend, and cover auth/profile materialization. Also make Windows shell resolution skip discovered bash executables that cannot run commands, and update the macOS Terminal backspace troubleshooting note to reflect the current fix.
Add qwen profile to default_provider_profiles() with dashscope provider.
Uses OpenAI-compatible API format at dashscope.aliyuncs.com with
qwen-plus as the default model and DASHSCOPE_API_KEY for auth.
The ProviderSpec for dashscope already existed in registry.py but lacked
a ProviderProfile, making it unavailable via 'oh provider list/use'.
- Add built-in `minimax` profile to `default_provider_profiles()` with
`MiniMax-M2.7` as default model and `https://api.minimax.io/v1` base URL
- Add `minimax_api_key` / `MINIMAX_API_KEY` auth source support to
`auth_source_provider_name()`, `default_auth_source_for_provider()`,
and `resolve_auth()` env-var lookup
- Add MiniMax to `_KNOWN_PROVIDERS`, `_AUTH_SOURCES`, `_PROFILE_BY_PROVIDER`,
and auth-status check in `AuthManager`
- Add `minimax` and `minimax_api_key` to CLI provider/auth-source label maps
and `oh auth login` provider list; update default model for
`minimax-anthropic` interactive flow from `minimax-m1` to `MiniMax-M2.7`
- Add `MiniMax-M2.7` / `MiniMax-M2.7-highspeed` model suggestions to the
React UI model picker
- Add unit tests for MiniMax profile, auth-source mapping, env-var resolution,
and profile materialisation
Co-authored-by: octo-patch <octo-patch@github.com>
When setting ANTHROPIC_MODEL or OPENHARNESS_MODEL environment variables
in terminals with formatting (e.g., bold text), ANSI escape sequences like
\x1b[1m can be inadvertently included in the model name. This causes the
API to receive an invalid model name like 'claude-opus-4-6[1m]' instead of
'claude-opus-4-6', resulting in a 404 error.
Changes:
- Add strip_ansi_escape_sequences() helper function
- Apply stripping in _apply_env_overrides() for env vars
- Apply stripping in merge_cli_overrides() for CLI args
- Add comprehensive tests for ANSI escape handling
Fixes#113
- Add OPENAI_BASE_URL to env override chain
- Fix resolve_auth() to check provider-specific env var before flat api_key
- Infer provider=openai when api_format=openai
- Prefix bare version models (e.g. '5.4' -> 'gpt-5.4') for OpenAI providers
- Fix 4 pre-existing test env var leaks
- Preserved main's credential_slot logic while adopting new env-var-first priority
Co-authored-by: siaochuan <siaochuan@users.noreply.github.com>
Root cause: _apply_env_overrides() only checked ANTHROPIC_BASE_URL and
OPENHARNESS_BASE_URL, ignoring OPENAI_BASE_URL. Users with OpenAI-compatible
relay services (e.g. relay.nf.video) that set OPENAI_BASE_URL had their
base_url left as None in settings, sending requests to api.openai.com
instead of their relay — causing 401 errors.
Fix:
- Add OPENAI_BASE_URL to the env override chain (after ANTHROPIC_BASE_URL,
before OPENHARNESS_BASE_URL) so relay base URLs are explicitly captured
in settings rather than relying solely on the OpenAI SDK's env var
detection.
- Fix 4 pre-existing test failures caused by OPENAI_API_KEY / ANTHROPIC_*
env vars leaking into test assertions. Tests now use monkeypatch to
isolate from the host environment.
- Add tests for OPENAI_BASE_URL pickup and ANTHROPIC_BASE_URL precedence.
When a user has an Anthropic API key stored in settings.json and
switches to --api-format openai, resolve_auth() blindly returned the
flat self.api_key (Anthropic key) before checking provider-specific
environment variables. This sent the wrong credential to the OpenAI
endpoint, causing 401 errors.
Fix: check the auth_source-specific environment variable (e.g.
OPENAI_API_KEY) before falling back to the flat api_key field.
This ensures the correct credential is used when multiple providers
are configured.
8 turns is too conservative for most agentic workflows — tool-heavy
tasks routinely need 20+ turns. 32 gives reasonable headroom while
still preventing runaway loops.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
A lightweight open-source Python implementation of the Agent Harness architecture.
44x lighter than Claude Code (11K vs 512K lines), 98% core tool coverage.
- 43 tools with Pydantic validation and parallel execution
- Skills system compatible with anthropics/skills (17+ tested)
- Plugin system compatible with claude-code/plugins (12+ tested)
- API retry with exponential backoff
- Multi-level permissions with path rules
- React/Ink TUI with "Oh my Harness!" branding
- 114 unit tests + 6 E2E test suites
- MIT License