Repository navigation
[0.8.15] - 2026-09-20
Added
- SOCKS5 proxy for LLM requests (
cli/src/index.ts): LLM API calls now route through a SOCKS5 tunnel whenproxy.socks5/AIH_SOCKS5_PROXYis set.buildRealLlminjects asocksFetch-basedfetchImplintoOpenAICompatibleLLM(which already accepts a caller-suppliedfetchImpl), so any provider's requests can go through a SOCKS endpoint — self-hosted networks, corporate egress, or a supported-region exit. No core changes. /socksruntime toggle (cli/src/index.ts,cli/src/tui.ts,cli/src/slash.ts): switch the LLM SOCKS5 proxy on/off without restarting. Bare/socksflips the state (on⇄off);/socks on|offsets it explicitly. AsocksOverridegates thefetchImplinjection (off forces direct even whenaih.jsonhasproxy.socks5), and the TUI status line surfaces aSOCKS on/SOCKS offindicator after the agent tag. Registered as a builtin slash head so it is recognized while busy, with completions and a palette entry.
Fixed
- Bounded network recovery in the agent loop (
core/src/agent-loop.ts): a provider that accepts the connection but never answers (silent timeouts) could make every user message spin for minutes and re-burn the whole retry budget on the next message. A cumulative, TURN-level park cap (MAX_NETWORK_PARK_WAITS, symmetric withMAX_QUOTA_WAITS) now bounds the waits; exceeding it ends the turn honestly with a dedicatednetwork_exhaustedstopReason instead of hanging. The TUI surfaces a clear "network retries exhausted" hint. - Response-header timeout at the adapter (
core/src/seams/llm-openai.ts): a provider that accepts the TCP/SOCKS connection but never returns HTTP headers would hang the fetch forever (TUI spins, noturn/end). ARESPONSE_HEADER_TIMEOUT_MSguard (default 60s,0disables) bounds the header wait and reclassifies the timeout into a message the network-retry path owns, so it folds into the extended retry budget and the turn-level cap above. - Guardian reviewer session parity + event persistence (
cli/src/index.ts): the Guardian's auxiliary review LLM now shares the main loop's conversation-stable session identity (x-opencode-sessionaffinity) across all three call sites (run/workflow/ TUIchat), so it no longer diverges onto a per-instance random id that can surface as provider-side denials. Every review result is also persisted to the session log as a model-invisibleapp/event(source: "guardian/review"), so denial/error outcomes are visible in the JSONL instead of only on the terminal.
Full changelog: https://github.com/summit4you/aih/blob/main/CHANGELOG.md