[GH-ISSUE #945] AI Tagging Not Working #624

Closed
opened 2026-03-02 11:51:23 +03:00 by kerem · 1 comment
Owner

Originally created by @paulr24 on GitHub (Jan 29, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/945

Describe the Bug

I'm using Perplexity API, which seems to be OpenAI compatible, and while it is working for the summarize feature, AI tagging is not working.

Steps to Reproduce

My AI settings are as follows:

OPENAI_BASE_URL: https://api.perplexity.ai
OPENAI_API_KEY: [redacted]
INFERENCE_IMAGE_MODEL: sonar-pro
INFERENCE_TEXT_MODEL: sonar-pro

Expected Behaviour

AI tagging

Screenshots or Additional Context

Here is a portion of my logs that seem to indicate an OpenAI failure:

2025-01-29T15:17:04.067Z error: [inference][33] inference job failed: Error: 400 ["At body -> response_format -> ResponseFormatText -> type: Input should be 'text'", "At body -> response_format -> ResponseFormatJSONSchema -> type: Input should be 'json_schema'", "At body -> response_format -> ResponseFormatJSONSchema -> json_schema: Field required", "At body -> response_format -> ResponseFormatRegex -> type: Input should be 'regex'", "At body -> response_format -> ResponseFormatRegex -> regex: Field required"]

Error: 400 ["At body -> response_format -> ResponseFormatText -> type: Input should be 'text'", "At body -> response_format -> ResponseFormatJSONSchema -> type: Input should be 'json_schema'", "At body -> response_format -> ResponseFormatJSONSchema -> json_schema: Field required", "At body -> response_format -> ResponseFormatRegex -> type: Input should be 'regex'", "At body -> response_format -> ResponseFormatRegex -> regex: Field required"]

at APIError.generate (/app/apps/workers/node_modules/.pnpm/openai@4.67.1_zod@3.22.4/node_modules/openai/error.js:45: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)

Device Details

Synology DS920+

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 @paulr24 on GitHub (Jan 29, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/945 ### Describe the Bug I'm using Perplexity API, which seems to be OpenAI compatible, and while it is working for the summarize feature, AI tagging is not working. ### Steps to Reproduce My AI settings are as follows: OPENAI_BASE_URL: https://api.perplexity.ai OPENAI_API_KEY: [redacted] INFERENCE_IMAGE_MODEL: sonar-pro INFERENCE_TEXT_MODEL: sonar-pro ### Expected Behaviour AI tagging ### Screenshots or Additional Context Here is a portion of my logs that seem to indicate an OpenAI failure: 2025-01-29T15:17:04.067Z error: [inference][33] inference job failed: Error: 400 ["At body -> response_format -> ResponseFormatText -> type: Input should be 'text'", "At body -> response_format -> ResponseFormatJSONSchema -> type: Input should be 'json_schema'", "At body -> response_format -> ResponseFormatJSONSchema -> json_schema: Field required", "At body -> response_format -> ResponseFormatRegex -> type: Input should be 'regex'", "At body -> response_format -> ResponseFormatRegex -> regex: Field required"] Error: 400 ["At body -> response_format -> ResponseFormatText -> type: Input should be 'text'", "At body -> response_format -> ResponseFormatJSONSchema -> type: Input should be 'json_schema'", "At body -> response_format -> ResponseFormatJSONSchema -> json_schema: Field required", "At body -> response_format -> ResponseFormatRegex -> type: Input should be 'regex'", "At body -> response_format -> ResponseFormatRegex -> regex: Field required"] at APIError.generate (/app/apps/workers/node_modules/.pnpm/openai@4.67.1_zod@3.22.4/node_modules/openai/error.js:45: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) ### Device Details Synology DS920+ ### 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:24 +03:00
Author
Owner

@Sapphire5381 commented on GitHub (Feb 3, 2025):

Same for me. Summarizing works, but AI tagging does not.

I'm using Nano-GPT with gpt-4o-mini.

<!-- gh-comment-id:2631612682 --> @Sapphire5381 commented on GitHub (Feb 3, 2025): Same for me. Summarizing works, but AI tagging does _not_. I'm using Nano-GPT with gpt-4o-mini.
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#624
No description provided.