Skip to content

bug: VertexSynthesizer HTTP timeout (120s) too short for large curation prompts #77

Closed

Description

@mpeter

Summary

dewey curate fails with context deadline exceeded (Client.Timeout exceeded while awaiting headers) for vaults with rich content. The VertexSynthesizer HTTP client is configured with a 120-second timeout, but large curation extraction prompts (30K-40K input tokens) consistently take 120-260 seconds to complete on Vertex AI.

Reproduction

Configure a knowledge store with 9-10 documents containing rich markdown (dossiers, agreements — ~34K input tokens). Run dewey curate. Observe:

❌ <store>: LLM extraction failed: vertex AI request: Post "https://...": 
context deadline exceeded (Client.Timeout exceeded while awaiting headers)

Timing: the failure occurs at exactly 120 seconds, confirming the HTTP client timeout is the cause.

Root Cause

llm/vertex.go:

client: &http.Client{
    Timeout: 120 * time.Second, // Match OllamaSynthesizer timeout.
},

The Ollama timeout is appropriate for local inference. Vertex AI with Claude Sonnet processing 34K input tokens takes 120-260 seconds — regularly exceeding the cap.

Fix

Increase the Vertex HTTP client timeout to 300 seconds. Vertex API calls have different latency characteristics than local Ollama inference and warrant a longer timeout.

Timeout: 300 * time.Second,

Context

Discovered on Vertex AI with claude-sonnet-4-6@default in us-east5. A direct curl to the same endpoint with the same payload completes in 85-261 seconds depending on load. The 120s Dewey timeout consistently cuts off large extractions.

Activity

  1. added
    next-release
    bug
    on Aug 14, 2026
  2. jflowers commented on Aug 17, 2026

    @jflowers
    Contributor

    Triage Assessment

    Field Value
    Verdict Valid bug
    Severity Medium
    Fix Status Fixed in PR #79 (merged 2026-07-29)

    Summary: The Divisor review panel unanimously validated this as an objective, reproducible bug. The root cause — a hardcoded 120s HTTP client timeout insufficient for Vertex AI processing large curation prompts (120-260s observed) — is correctly identified, and the fix (120s → 300s) in PR #79 is architecturally sound.

    Key findings from the panel:

    Recommendation: Close this issue — the reported bug is fully resolved by PR #79.

    This triage was performed by the Divisor review panel.

  3. added this to the release v0.16.0 milestone on Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugnext-release

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions