Add explicit User-Agent to Ollama API calls

Node's default fetch sends a bare User-Agent that Google's CDN

fronting ollama.com rejects with 403. curl worked because it

sends curl/. Fixes organize (and search LLM ranking).

Signed-off-by: William Mantly <wmantly@gmail.com>
This commit is contained in:
2026-07-20 12:29:09 -04:00
parent 40a39b2d14
commit 47a930eddb
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -26,6 +26,7 @@ async function chatJSON(system, user){
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${conf.ollama.apiKey}`,
'User-Agent': 'tpbproxy/1.0 (organize; +https://github.com/wmantly/tpbproxy)',
},
body: JSON.stringify({
model: conf.ollama.model,
+1
View File
@@ -194,6 +194,7 @@ async function rankReleases(candidates, meta){
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${conf.ollama.apiKey}`,
'User-Agent': 'tpbproxy/1.0 (search; +https://github.com/wmantly/tpbproxy)',
},
body: JSON.stringify(body),
});