hermes-agent/gateway
Frederick 7dd00bb47d fix(api_server): close divergence gaps from gateway/run.py
Three parity fixes between the API server and the native gateway's
agent-runtime resolution, integrated with the provider-aware request
routing that landed in #70853:

- Session-persisted model is honored: POST /api/sessions {"model": ...}
  stores a model that the chat handlers previously fetched and threw
  away. A stored value that matches a model_routes alias goes through
  the route path (route provider/credentials apply); a raw model string
  threads through as session_model, pinning the session's turns ahead
  of per-request body values but below an explicit session /model
  override.
- Empty-model recovery: provider-catalog default when config has no
  model.default but a provider resolved, plus last-known-good model
  recovery (#35314) keyed on gateway_session_key only (never ephemeral
  session_id — no unbounded growth from one-off requests).
- Provider auth failures surface as controlled responses: RuntimeError
  from _resolve_runtime_agent_kwargs() is re-raised as a dedicated
  _ProviderAuthResolutionError at the call site, caught narrowly in
  _run_agent() and the /v1/runs executor to return run.py's response
  shape instead of an undifferentiated 500 (session-chat endpoints
  previously returned a raw aiohttp 500 with no JSON body).

Salvaged from PR #57947 by @FvanW; session-model route-alias resolution
from PR #59941 by @kaishi00.

Co-authored-by: kaishi00 <kaishi00@users.noreply.github.com>
2026-07-24 11:53:46 -07:00
..
assets
…
builtin_hooks
…
platforms fix(api_server): close divergence gaps from gateway/run.py 2026-07-24 11:53:46 -07:00
relay fix(gateway): deliver relay-backed homes after restart 2026-07-24 10:45:13 -07:00
__init__.py
…
authz_mixin.py fix(relay): restore streaming delivery, Slack command parity, and status clearing (salvage of #69716) (#69747) 2026-07-23 12:51:13 +10:00
cgroup_cleanup.py
…
channel_directory.py fix(slack): resolve channel IDs to human-readable names 2026-07-23 12:01:24 -07:00
code_skew.py
…
config.py fix(gateway): deliver relay-backed homes after restart 2026-07-24 10:45:13 -07:00
cwd_placeholder.py
…
dead_targets.py
…
delivery.py fix(gateway): deliver relay-backed homes after restart 2026-07-24 10:45:13 -07:00
delivery_ledger.py fix(state): refuse WAL on SQLite builds with the WAL-reset bug 2026-07-23 17:32:38 +05:30
display_config.py fix(slack): quiet Slack display defaults — no heartbeat/busy-ack breadcrumbs in channels 2026-07-23 11:34:11 -07:00
drain_control.py
…
hooks.py
…
kanban_watchers.py fix(kanban): advance notify cursor only after a successful wake self-post 2026-07-23 11:55:17 -07:00
memory_monitor.py
…
message_timestamps.py
…
mirror.py
…
pairing.py
…
platform_registry.py
…
profile_routing.py
…
readiness.py
…
response_filters.py
…
restart.py
…
restart_loop_guard.py
…
rich_sent_store.py
…
run.py fix(windows): sweep remaining unguarded text-mode subprocess sites codebase-wide 2026-07-24 11:45:57 -07:00
runtime_footer.py
…
scale_to_zero.py
…
session.py fix(gateway): unify legacy-Slack-key recovery on the claim-once path 2026-07-23 12:00:34 -07:00
session_context.py fix(kanban): keep delegated results in worker turn 2026-07-23 08:33:55 -07:00
shutdown_forensics.py fix: add explicit UTF-8 encoding to all subprocess text=True calls (#53428) 2026-07-24 11:45:57 -07:00
shutdown_watchdog.py
…
slash_access.py
…
slash_commands.py fix(gateway): deliver relay-backed homes after restart 2026-07-24 10:45:13 -07:00
status.py fix: add explicit UTF-8 encoding to all subprocess text=True calls (#53428) 2026-07-24 11:45:57 -07:00
status_phrases.py
…
sticker_cache.py
…
stream_consumer.py fix(gateway): balance code fences on every remaining chunk-split path 2026-07-23 11:50:28 -07:00
stream_dispatch.py
…
stream_events.py
…
systemd_notify.py
…
turn_lease.py
…
wake.py fix(gateway): deliver kanban/delegate wake-ups to api_server sessions 2026-07-23 11:55:17 -07:00
whatsapp_identity.py
…