Skip to content

chore: wire Nous.Finch as default Req pool + bump timeouts to 3 min (…#52

Merged
nyo16 merged 1 commit intomasterfrom
chore/wire-nous-finch-to-req-backends
May 1, 2026
Merged

chore: wire Nous.Finch as default Req pool + bump timeouts to 3 min (…#52
nyo16 merged 1 commit intomasterfrom
chore/wire-nous-finch-to-req-backends

Conversation

@nyo16
Copy link
Copy Markdown
Owner

@nyo16 nyo16 commented May 1, 2026

…0.15.5)

Two small changes in one commit:

  1. Both Req-based HTTP backends (non-streaming and streaming) now actually use the supervised Nous.Finch pool (started by Nous.Application with size: 10, count: 1). Previously they ignored the :finch_name opt that Nous.Provider built and let Req spin up its own default Finch instance — the named pool sat idle. Both backends now read :finch_name from per-call opts, falling back to Application.get_env(:nous, :finch, Nous.Finch). Side note: Req disallows passing both :finch and :connect_options, so connect timeouts are now pool-level (configure on the Finch pool itself if a non-default is needed; receive timeouts still take per-call).

  2. Default timeouts bumped from 60s to 180s (3 min) across the HTTP layer, model defaults, and provider backstops. The 60s default was tripping on reasoning models and longer completions. Local provider defaults stay at 120s (lmstudio/ollama/vllm/sglang), llamacpp moves to 5 min for cold-start weights, streaming timeouts move to 5 min. Per-call :timeout and :receive_timeout continue to override.

Both changes verified end-to-end against running LMStudio: 13/13 pass on a smoke matrix covering both backends in non-streaming and streaming modes (env var dispatch, per-call opt, default), agent-level streaming (Nous.AgentRunner.run/3 with stream: true), Hackney backpressure (mailbox stays at 2 msgs after 2s no-drain), and Stream.take/2 early-exit cleanup. Full mix test: 1640/1640 green.

…0.15.5)

Two small changes in one commit:

1. Both Req-based HTTP backends (non-streaming and streaming) now
   actually use the supervised Nous.Finch pool (started by
   Nous.Application with size: 10, count: 1). Previously they ignored
   the :finch_name opt that Nous.Provider built and let Req spin up
   its own default Finch instance — the named pool sat idle. Both
   backends now read :finch_name from per-call opts, falling back to
   Application.get_env(:nous, :finch, Nous.Finch). Side note: Req
   disallows passing both :finch and :connect_options, so connect
   timeouts are now pool-level (configure on the Finch pool itself if
   a non-default is needed; receive timeouts still take per-call).

2. Default timeouts bumped from 60s to 180s (3 min) across the HTTP
   layer, model defaults, and provider backstops. The 60s default was
   tripping on reasoning models and longer completions. Local
   provider defaults stay at 120s (lmstudio/ollama/vllm/sglang),
   llamacpp moves to 5 min for cold-start weights, streaming
   timeouts move to 5 min. Per-call :timeout and :receive_timeout
   continue to override.

Both changes verified end-to-end against running LMStudio: 13/13 pass
on a smoke matrix covering both backends in non-streaming and
streaming modes (env var dispatch, per-call opt, default), agent-level
streaming (Nous.AgentRunner.run/3 with stream: true), Hackney
backpressure (mailbox stays at 2 msgs after 2s no-drain), and
Stream.take/2 early-exit cleanup. Full mix test: 1640/1640 green.
@nyo16 nyo16 merged commit c336734 into master May 1, 2026
6 checks passed
@nyo16 nyo16 deleted the chore/wire-nous-finch-to-req-backends branch May 1, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant