diff --git a/cmd/core-runtime/main.go b/cmd/core-runtime/main.go index 150ade8..16e9b10 100644 --- a/cmd/core-runtime/main.go +++ b/cmd/core-runtime/main.go @@ -120,7 +120,7 @@ func main() { if err != nil { log.Fatal(err) } - researchClient, err := newResearchRuntimeClient(envOr("RESEARCH_RUNTIME_URL", "http://research-runtime:8087"), &http.Client{Timeout: 12 * time.Second}) + researchClient, err := newResearchRuntimeClient(envOr("RESEARCH_RUNTIME_URL", "http://research-runtime:8087"), &http.Client{Timeout: 20 * time.Second}) if err != nil { log.Fatal(err) } @@ -815,7 +815,10 @@ func main() { learnedLexicon := interactiondomain.TaskLexiconFromHistory(conversationHistory) searchQuery := interactiondomain.SearchQueryWithLexicon(part, learnedLexicon) searchQuery = interactiondomain.TravelResearchQuery(searchQuery, conversationHistory, now) - researchCtx, cancelResearch := context.WithTimeout(r.Context(), 8*time.Second) + // The research capability may try its configured source and a + // source-recovery fallback. Its caller must leave enough budget for + // both attempts and evidence evaluation. + researchCtx, cancelResearch := context.WithTimeout(r.Context(), 18*time.Second) result, researchErr := researchClient.SearchWeb(researchCtx, epistemics.WebSearchRequest{ Plan: epistemics.ResearchPlan{ID: epistemics.ResearchPlanID(fmt.Sprintf("plan:%s:%d", planID, index)), Question: searchQuery, SourceClasses: []string{"web-search"}, FreshnessPolicy: "current"}, PropositionKey: fmt.Sprintf("question:%s:%d", utterance.ID, index), Query: searchQuery,