[GH-ISSUE #895] Country not supported #587

Closed
opened 2026-03-02 11:51:05 +03:00 by kerem · 4 comments
Owner

Originally created by @MatthK on GitHub (Jan 17, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/895

Describe the Bug

I just installed the system yesterday with a Docker Compose setup. I pointed the OP AI interface to a local Open WebUI setup that I have. However, that throws an error saying that the Country, region or territory not supported.

Log file entry in the hoarder-web container

2025-01-16T10:37:34.715Z info: [inference][25] Starting an inference job for bookmark with id "xfrv6nvgwkij3h20ejl0xad3"
2025-01-16T10:37:34.729Z error: [inference][25] inference job failed: Error: 403 Country, region, or territory not supported
Error: 403 Country, region, or territory not supported
    at APIError.generate (/app/apps/workers/node_modules/.pnpm/openai@4.67.1_zod@3.22.4/node_modules/openai/error.js:51:20)
    at OpenAI.makeStatusError (/app/apps/workers/node_modules/.pnpm/openai@4.67.1_zod@3.22.4/node_modules/openai/core.js:291:33)
    at OpenAI.makeRequest (/app/apps/workers/node_modules/.pnpm/openai@4.67.1_zod@3.22.4/node_modules/openai/core.js:335:30)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async OpenAIInferenceClient.inferFromText (/app/apps/workers/node_modules/.pnpm/@hoarder+shared@file+packages+shared_better-sqlite3@11.3.0/node_modules/@hoarder/shared/inference.ts:2:1964)
    at async inferTagsFromText (/app/apps/workers/openaiWorker.ts:6:3029)
    at async inferTags (/app/apps/workers/openaiWorker.ts:6:3264)
    at async Object.runOpenAI [as run] (/app/apps/workers/openaiWorker.ts:6:6686)
    at async Runner.runOnce (/app/apps/workers/node_modules/.pnpm/liteque@0.3.0_better-sqlite3@11.3.0/node_modules/liteque/dist/runner.js:2:2578)

My .env file looks as follows:

HOARDER_VERSION=release
NEXTAUTH_SECRET=secret-string
MEILI_MASTER_KEY=secret-string
MEILI_ADDR=http://local-domain:7700
NEXTAUTH_URL=http://local-domain:3581
OLLAMA_BASE_URL=http://local-domain:11434/api
INFERENCE_TEXT_MODEL=llama3.1
INFERENCE_IMAGE_MODEL=llava
INFERENCE_CONTEXT_LENGTH=4096
OPENAI_API_KEY=API-Key
DISABLE_SIGNUPS=true

Steps to Reproduce

  1. Regenerate the AI tags for all bookmarks

Expected Behaviour

The saved item should get processed without error

Screenshots or Additional Context

No response

Device Details

No response

Exact Hoarder Version

v0.21.0

Have you checked the troubleshooting guide?

  • I have checked the troubleshooting guide and I haven't found a solution to my problem
Originally created by @MatthK on GitHub (Jan 17, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/895 ### Describe the Bug I just installed the system yesterday with a Docker Compose setup. I pointed the OP AI interface to a local Open WebUI setup that I have. However, that throws an error saying that the `Country, region or territory not supported`. Log file entry in the hoarder-web container ``` 2025-01-16T10:37:34.715Z info: [inference][25] Starting an inference job for bookmark with id "xfrv6nvgwkij3h20ejl0xad3" 2025-01-16T10:37:34.729Z error: [inference][25] inference job failed: Error: 403 Country, region, or territory not supported Error: 403 Country, region, or territory not supported at APIError.generate (/app/apps/workers/node_modules/.pnpm/openai@4.67.1_zod@3.22.4/node_modules/openai/error.js:51:20) at OpenAI.makeStatusError (/app/apps/workers/node_modules/.pnpm/openai@4.67.1_zod@3.22.4/node_modules/openai/core.js:291:33) at OpenAI.makeRequest (/app/apps/workers/node_modules/.pnpm/openai@4.67.1_zod@3.22.4/node_modules/openai/core.js:335:30) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async OpenAIInferenceClient.inferFromText (/app/apps/workers/node_modules/.pnpm/@hoarder+shared@file+packages+shared_better-sqlite3@11.3.0/node_modules/@hoarder/shared/inference.ts:2:1964) at async inferTagsFromText (/app/apps/workers/openaiWorker.ts:6:3029) at async inferTags (/app/apps/workers/openaiWorker.ts:6:3264) at async Object.runOpenAI [as run] (/app/apps/workers/openaiWorker.ts:6:6686) at async Runner.runOnce (/app/apps/workers/node_modules/.pnpm/liteque@0.3.0_better-sqlite3@11.3.0/node_modules/liteque/dist/runner.js:2:2578) ``` My `.env` file looks as follows: ``` HOARDER_VERSION=release NEXTAUTH_SECRET=secret-string MEILI_MASTER_KEY=secret-string MEILI_ADDR=http://local-domain:7700 NEXTAUTH_URL=http://local-domain:3581 OLLAMA_BASE_URL=http://local-domain:11434/api INFERENCE_TEXT_MODEL=llama3.1 INFERENCE_IMAGE_MODEL=llava INFERENCE_CONTEXT_LENGTH=4096 OPENAI_API_KEY=API-Key DISABLE_SIGNUPS=true ``` ### Steps to Reproduce 1. Regenerate the AI tags for all bookmarks ### Expected Behaviour The saved item should get processed without error ### Screenshots or Additional Context _No response_ ### Device Details _No response_ ### Exact Hoarder Version v0.21.0 ### Have you checked the troubleshooting guide? - [x] I have checked the troubleshooting guide and I haven't found a solution to my problem
kerem closed this issue 2026-03-02 11:51:05 +03:00
Author
Owner

@kamtschatka commented on GitHub (Jan 17, 2025):

Sounds like OpenAI simply does not support your location? https://help.openai.com/en/articles/8983035-why-can-t-i-sign-up-due-to-unsupported-country

<!-- gh-comment-id:2597637403 --> @kamtschatka commented on GitHub (Jan 17, 2025): Sounds like OpenAI simply does not support your location? https://help.openai.com/en/articles/8983035-why-can-t-i-sign-up-due-to-unsupported-country
Author
Owner

@MatthK commented on GitHub (Jan 17, 2025):

I'm not using OpenAI. It's a self hosted Ollama instance. And it works when accessing Ollama via WebUI.

<!-- gh-comment-id:2597666447 --> @MatthK commented on GitHub (Jan 17, 2025): I'm not using OpenAI. It's a self hosted Ollama instance. And it works when accessing Ollama via WebUI.
Author
Owner

@MohamedBassem commented on GitHub (Jan 17, 2025):

@MatthK remove the openai api key from your env variable. This takes precedence over ollama IIRC

<!-- gh-comment-id:2597669046 --> @MohamedBassem commented on GitHub (Jan 17, 2025): @MatthK remove the openai api key from your env variable. This takes precedence over ollama IIRC
Author
Owner

@MatthK commented on GitHub (Jan 17, 2025):

Ok, that did the trick. Once I delete the OPENAI_API_KEY=API-Key it worked. Thank you very much.

<!-- gh-comment-id:2598371839 --> @MatthK commented on GitHub (Jan 17, 2025): Ok, that did the trick. Once I delete the `OPENAI_API_KEY=API-Key` it worked. Thank you very much.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#587
No description provided.