feat(scripts): TimeWeb smoke test + bump default LLM timeout to 20s
scripts/check-timeweb.js — three probes: plain text, JSON mode, full
fast-advisor stack (registry injection + skill validation). Loads .env,
prints {ok, latency, reply preview} for each. Doesn't touch bot state.
Bumped DEFAULT_TIMEOUT_MS 8s → 20s in runtime/llm/provider.js. TimeWeb's
hosted agent endpoint takes 5-15s for the fast-advisor prompt
(registry block + snapshot context), so 8s was producing spurious
timeouts. OpenAI direct returns much faster; env var TIMEWEB_TIMEOUT_MS
overrides if needed.
Smoke verified live (PR #27 branch):
probe 1: 6.3s, plain prompt → "pepa hears you"
probe 2: 5.4s, JSON mode → {"alive":true,"name":"pepa"}
probe 3: 14.9s, advise() → action=switch_skill, skill=recovery.tunnel-out
(correct registered skill, sensible rationale — registry
injection successfully prevents hallucination)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,11 @@ const ENV = {
|
||||
};
|
||||
|
||||
const DEFAULT_BASE_URL = "https://api.openai.com/v1";
|
||||
const DEFAULT_TIMEOUT_MS = 8000;
|
||||
// 20s default — TimeWeb's hosted agent endpoint takes 5-15s for the
|
||||
// fast-advisor prompt (registry block + snapshot context). 8s was too
|
||||
// tight and produced spurious timeouts in smoke tests. OpenAI direct
|
||||
// returns much faster (<2s); the env var overrides if needed.
|
||||
const DEFAULT_TIMEOUT_MS = 20000;
|
||||
|
||||
export function isAvailable() {
|
||||
return !!process.env[ENV.API_KEY];
|
||||
|
||||
Reference in New Issue
Block a user