Skip to content

Unify timeout env vars: OPENAI_TIMEOUT_MS + AGENTMEMORY_LLM_TIMEOUT_MS #446

@rohitg00

Description

@rohitg00

Two timeout env vars now active across the provider surface after v0.9.17 + #379:

Same value, different names. Confusing for ops.

Proposal

  1. Make AGENTMEMORY_LLM_TIMEOUT_MS the canonical name.
  2. OpenAIProvider.call() reads OPENAI_TIMEOUT_MS first (back-compat), then falls back to AGENTMEMORY_LLM_TIMEOUT_MS, then 60s.
  3. README documents both in the OpenAI section; quick-start / .env.example shows only AGENTMEMORY_LLM_TIMEOUT_MS.
  4. Long-term: per-provider override pattern AGENTMEMORY_<PROVIDER>_TIMEOUT_MS if users ask. Out of scope for now.

Files

  • src/providers/openai.ts — line where OPENAI_TIMEOUT_MS is read
  • README.md — both env tables
  • .env.example — single source of truth

Acceptance

  • Setting only AGENTMEMORY_LLM_TIMEOUT_MS=30000 bounds OpenAI provider to 30s.
  • Setting both prefers OPENAI_TIMEOUT_MS (back-compat).
  • Setting neither uses 60s default.
  • New unit test in test/fetch-timeout.test.ts covering the precedence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions