hermes-agent/tests
teknium1 4068f20ce9 fix(anthropic): deep scan fixes — auth, retries, edge cases
Fixes from comprehensive code review and cross-referencing with
clawdbot/OpenCode implementations:

CRITICAL:
- Add one-shot guard (anthropic_auth_retry_attempted) to prevent
  infinite 401 retry loops when credentials keep changing
- Fix _is_oauth_token(): managed keys from ~/.claude.json are NOT
  regular API keys (don't start with sk-ant-api). Inverted the logic:
  only sk-ant-api* is treated as API key auth, everything else uses
  Bearer auth + oauth beta headers

HIGH:
- Wrap json.loads(args) in try/except in message conversion — malformed
  tool_call arguments no longer crash the entire conversation
- Raise AuthError in runtime_provider when no Anthropic token found
  (was silently passing empty string, causing confusing API errors)
- Remove broken _try_anthropic() from auxiliary vision chain — the
  centralized router creates an OpenAI client for api_key providers
  which doesn't work with Anthropic's Messages API

MEDIUM:
- Handle empty assistant message content — Anthropic rejects empty
  content blocks, now inserts '(empty)' placeholder
- Fix setup.py existing_key logic — set to 'KEEP' sentinel instead
  of None to prevent falling through to the auth choice prompt
- Add debug logging to _fetch_anthropic_models on failure

Tests: 43 adapter tests (2 new for token detection), 3197 total passed
2026-03-12 17:14:22 -07:00
..
agent merge: resolve conflicts with origin/main 2026-03-12 00:29:04 -07:00
cron
fakes
gateway feat(gateway): thread-aware free-response routing for Discord 2026-03-11 09:15:31 -07:00
hermes_cli chore(skills): clean up PR #862 — simplify manifest guard, DRY up tests 2026-03-12 08:08:22 -07:00
honcho_integration
integration chore: remove nous-api provider (API key path) 2026-03-11 20:14:44 -07:00
skills
tools feat: add 'View full command' option to dangerous command approval (#887) 2026-03-12 06:27:21 -07:00
__init__.py
conftest.py fix: skip hanging tests + add global test timeout 2026-03-12 01:23:28 -07:00
test_413_compression.py fix: skip hanging tests + add global test timeout 2026-03-12 01:23:28 -07:00
test_860_dedup.py
test_agent_loop_tool_calling.py fix: skip hanging tests + add global test timeout 2026-03-12 01:23:28 -07:00
test_agent_loop_vllm.py test: skip atropos-dependent tests when atroposlib not installed 2026-03-11 06:52:55 -07:00
test_agent_loop.py fix: guard all atroposlib imports for CI without atropos installed 2026-03-11 06:52:55 -07:00
test_anthropic_adapter.py fix(anthropic): deep scan fixes — auth, retries, edge cases 2026-03-12 17:14:22 -07:00
test_api_key_providers.py
test_atomic_json_write.py
test_auth_codex_provider.py
test_auth_nous_provider.py
test_auxiliary_config_bridge.py fix: update all test mocks for call_llm migration 2026-03-11 21:06:54 -07:00
test_batch_runner_checkpoint.py
test_cli_init.py
test_cli_loading_indicator.py
test_cli_model_command.py feat: unified /model and /provider into single view 2026-03-11 23:06:06 -07:00
test_cli_provider_resolution.py refactor: remove LLM_MODEL env var dependency — config.yaml is sole source of truth 2026-03-11 22:04:42 -07:00
test_codex_execution_paths.py
test_codex_models.py
test_display.py
test_external_credential_detection.py
test_fallback_model.py refactor: route main agent client + fallback through centralized router 2026-03-11 21:38:29 -07:00
test_file_permissions.py
test_flush_memories_codex.py fix: update all test mocks for call_llm migration 2026-03-11 21:06:54 -07:00
test_hermes_state.py
test_honcho_client_config.py
test_insights.py
test_managed_server_tool_support.py fix: guard all atroposlib imports for CI without atropos installed 2026-03-11 06:52:55 -07:00
test_model_provider_persistence.py
test_model_tools.py
test_personality_none.py
test_provider_parity.py
test_quick_commands.py
test_reasoning_command.py fix: /reasoning command — add gateway support, fix display, persist settings (#1031) 2026-03-12 05:38:19 -07:00
test_resume_display.py
test_run_agent_codex_responses.py
test_run_agent.py feat: native Anthropic provider with Claude Code credential auto-discovery 2026-03-12 15:47:45 -07:00
test_runtime_provider_resolution.py chore: remove nous-api provider (API key path) 2026-03-11 20:14:44 -07:00
test_timezone.py test(cron): add regression tests for _ensure_aware timezone conversion 2026-03-11 08:42:04 -07:00
test_tool_call_parsers.py fix: guard all atroposlib imports for CI without atropos installed 2026-03-11 06:52:55 -07:00
test_toolset_distributions.py
test_toolsets.py
test_trajectory_compressor.py
test_worktree.py