Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: replace hardcoded API URLs with URLS/URLBuilder constants (#2942)

LearningCircuitaf2fee4eee83
diff --git a/src/local_deep_research/web/static/js/components/logpanel.js b/src/local_deep_research/web/static/js/components/logpanel.js
index 505f11a11a..10d12def6d 100644
--- a/src/local_deep_research/web/static/js/components/logpanel.js
+++ b/src/local_deep_research/web/static/js/components/logpanel.js
@@ -262,7 +262,7 @@
});
// Fetch the log count from the API and update the indicators
- fetch(`/history/log_count/${researchId}`)
+ fetch(URLBuilder.logCount(researchId))
.then(response => response.json())
.then(data => {
SafeLogger.log('Log count data:', data);
diff --git a/src/local_deep_research/web/static/js/pages/news.js b/src/local_deep_research/web/static/js/pages/news.js
index 6493f7c66b..cfb1dd09b9 100644
--- a/src/local_deep_research/web/static/js/pages/news.js
+++ b/src/local_deep_research/web/static/js/pages/news.js
@@ -423,7 +423,7 @@ async function performAdvancedNewsSearch(query, strategy = 'source-based', model
SafeLogger.log('Sending research request:', requestData);
- const response = await fetch('/api/start_research', {
+ const response = await fetch(URLS.API.START_RESEARCH, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -2116,7 +2116,7 @@ async function monitorResearch(researchId, query = null) {
// First, get the initial status and query
try {
- const statusResponse = await fetch(`/api/research/${researchId}/status`);
+ const statusResponse = await fetch(URLBuilder.researchStatus(researchId));
if (statusResponse.ok) {
const statusData = await statusResponse.json();
query = query || statusData.query || 'News Analysis';
@@ -2165,7 +2165,7 @@ async function monitorResearch(researchId, query = null) {
// Now start polling for updates
const checkInterval = setInterval(async () => {
try {
- const response = await fetch(`/api/research/${researchId}/status`);
+ const response = await fetch(URLBuilder.researchStatus(researchId));
if (response.ok) {
const data = await response.json();
SafeLogger.log('Research status:', data.status, 'Progress:', data.progress);
@@ -2247,7 +2247,7 @@ async function checkActiveNewsResearch() {
}
// Check research status
- const statusResponse = await fetch(`/api/research/${researchId}/status`);
+ const statusResponse = await fetch(URLBuilder.researchStatus(researchId));
if (!statusResponse.ok) {
localStorage.removeItem('active_news_research');
return;
@@ -2292,7 +2292,7 @@ async function pollForNewsResearchResults(researchId, originalQuery, isResume =
const pollInterval = setInterval(async () => {
try {
// Check research status
- const statusResponse = await fetch(`/api/research/${researchId}/status`);
+ const statusResponse = await fetch(URLBuilder.researchStatus(researchId));
if (!statusResponse.ok) {
clearInterval(pollInterval);
showAlert('Failed to check research status', 'error');