hermes-agent/tools
teknium1 07f09ecd83 refactor: route ad-hoc LLM consumers through centralized provider router
Route all remaining ad-hoc auxiliary LLM call sites through
resolve_provider_client() so auth, headers, and API format (Chat
Completions vs Responses API) are handled consistently in one place.

Files changed:

- tools/openrouter_client.py: Replace manual AsyncOpenAI construction
  with resolve_provider_client('openrouter', async_mode=True). The
  shared client module now delegates entirely to the router.

- tools/skills_guard.py: Replace inline OpenAI client construction
  (hardcoded OpenRouter base_url, manual api_key lookup, manual
  headers) with resolve_provider_client('openrouter'). Remove unused
  OPENROUTER_BASE_URL import.

- trajectory_compressor.py: Add _detect_provider() to map config
  base_url to a provider name, then route through
  resolve_provider_client. Falls back to raw construction for
  unrecognized custom endpoints.

- mini_swe_runner.py: Route default case (no explicit api_key/base_url)
  through resolve_provider_client('openrouter') with auto-detection
  fallback. Preserves direct construction when explicit creds are
  passed via CLI args.

- agent/auxiliary_client.py: Fix stale module docstring — vision auto
  mode now correctly documents that Codex and custom endpoints are
  tried (not skipped).
2026-03-11 20:02:36 -07:00
..
environments fix: Modal sandbox eval infra (9 fixes for TBLite baseline) 2026-03-11 06:51:42 -07:00
__init__.py docs: complete Daytona backend documentation coverage 2026-03-06 03:37:05 -08:00
approval.py Merge PR #724: feat: --yolo flag to bypass all approval prompts 2026-03-10 20:56:30 -07:00
browser_tool.py Merge PR #709: fix: close log file handles to prevent resource leaks 2026-03-10 16:26:29 -07:00
checkpoint_manager.py feat: filesystem checkpoints and /rollback command 2026-03-10 00:49:15 -07:00
clarify_tool.py More major refactor/tech debt removal! 2026-02-21 20:22:33 -08:00
code_execution_tool.py fix: head+tail truncation for execute_code stdout 2026-03-11 00:26:13 -07:00
cronjob_tools.py fix: Signal adapter parity pass — integration gaps, clawdbot features, env var simplification 2026-03-08 21:00:21 -07:00
debug_helpers.py refactor: consolidate debug logging across tools with shared DebugSession class 2026-02-21 03:53:24 -08:00
delegate_tool.py feat: configurable subagent provider:model with full credential resolution 2026-03-11 06:12:21 -07:00
file_operations.py Merge PR #533: fix: use regex for search output parsing to handle Windows drive-letter paths 2026-03-09 23:18:42 -07:00
file_tools.py fix: replace debug print() with logger.error() in file_tools 2026-03-11 04:38:07 -07:00
fuzzy_match.py Cleanup time! 2026-02-20 23:23:32 -08:00
homeassistant_tool.py feat: enhance Home Assistant integration with service discovery and setup 2026-03-03 05:16:53 -08:00
honcho_tools.py feat: add Honcho AI-native memory integration 2026-02-26 18:07:17 -05:00
image_generation_tool.py Fix image_generate 'Event loop is closed' in gateway 2026-03-07 16:56:49 -08:00
interrupt.py feat: enhance interrupt handling and container resource configuration 2026-02-23 02:11:33 -08:00
mcp_tool.py fix: handle empty choices in MCP sampling callback 2026-03-10 02:24:53 +03:00
memory_tool.py Fix memory tool entry parsing when content contains section sign 2026-02-28 01:33:41 +03:00
mixture_of_agents_tool.py More major refactor/tech debt removal! 2026-02-21 20:22:33 -08:00
openrouter_client.py refactor: route ad-hoc LLM consumers through centralized provider router 2026-03-11 20:02:36 -07:00
patch_parser.py fix: align _apply_delete comment with actual behavior 2026-02-28 22:58:01 +02:00
process_registry.py Merge PR #457: Use pywinpty for PTY support on Windows 2026-03-09 21:09:56 -07:00
registry.py Merge PR #275: fix(batch_runner): preserve traceback when batch worker fails 2026-03-05 01:44:05 -08:00
rl_training_tool.py fix: call _stop_training_run on early-return failure paths 2026-03-10 17:09:51 -07:00
send_message_tool.py feat: add email gateway platform (IMAP/SMTP) 2026-03-11 06:32:01 -07:00
session_search_tool.py refactor: clean up type hints and docstrings in session_search_tool 2026-03-04 21:25:54 -08:00
skill_manager_tool.py Make skill file writes atomic 2026-03-07 00:49:10 +03:00
skills_guard.py refactor: route ad-hoc LLM consumers through centralized provider router 2026-03-11 20:02:36 -07:00
skills_hub.py fix: review fixes — path traversal guard, trust_style consistency, edge cases 2026-03-06 01:40:01 -08:00
skills_sync.py fix: make skills manifest writes atomic 2026-03-08 23:53:57 -07:00
skills_tool.py refactor: extract shared curses checklist, fix skill discovery perf 2026-03-11 03:06:15 -07:00
terminal_tool.py fix: Modal sandbox eval infra (9 fixes for TBLite baseline) 2026-03-11 06:51:42 -07:00
todo_tool.py fix: escalate read/search blocking, track search loops, filter completed todos 2026-03-08 23:01:21 +03:00
transcription_tools.py refactor: clean up transcription_tools after PR #262 merge 2026-03-04 21:35:04 -08:00
tts_tool.py Improve TTS error handling and logging 2026-03-07 16:53:30 +03:00
vision_tools.py feat: centralized provider router + fix Codex vision bypass + vision error handling 2026-03-11 19:46:47 -07:00
web_tools.py feat: enhance auxiliary model configuration and environment variable handling 2026-03-08 18:06:47 -07:00