7 Commits
Author SHA1 Message Date
Tautvydas Derzinskas cc4107694a fix: rename Thingiverse Access Token to App Token to match what it provides 2026-10-17 20:27:58 +02:00
Rui Valim 748879311a fix(ai): explain answers cut off by the token limit, and log AI and import runs (#16)
* fix(ai): leave room for a full answer and explain a cut-off one

max_tokens 300 cut answers off once the reason filled its 300-character
limit, and the run showed JSON.parse's position instead of the cause.
Raise it to 1024 and turn a parse failure into a readable error, naming
the token limit when the provider reports finish_reason length.

* feat(backend): add a shared logger with levels and greppable fields

One line per event with a level, a scope and key=value fields, or one
JSON object per line with LOG_FORMAT=json. LOG_LEVEL drops lines below
it. Errors log their message, status and code, plus the stack at error
level, and bearer tokens are redacted. Nothing outside it changes yet.

* feat(ai,import): log categorization and import runs through the logger

A bulk AI run kept only its last error in memory, so which models failed
and why was lost. Each provider answer it can't use now logs the model,
finish_reason, completion and reasoning tokens and the end of the answer;
each model's outcome and the run's start and totals are logged too.

Collection, Thingiverse, Printables, profile and zip imports dropped a
failed model without a trace; they now log it with its reason, plus the
job's start and totals. The links runner's console lines move to the
logger.

* fix(ai): read an answer wrapped in markdown or prose

Xiaomi MiMo ignores response_format and sent the object in bold,
`**{...}**`, which failed as not valid JSON although the answer was
complete. When the whole text doesn't parse, try the outermost braces.
2026-10-13 21:29:49 +02:00
Tautvydas Derzinskas ef9152df6c feat(collection-sync): allow syncing collections with provider collections
Implements #10
2026-10-09 00:34:44 +02:00
Tautvydas Derzinskas e111dc27d7 chore: update licence and perform comment clean up 2026-09-28 22:34:47 +02:00
Tautvydas Derzinskas 56de86d5b5 feat: rebrand from PrintStash to Thingport 2026-09-10 07:08:51 +02:00
Tautvydas Derzinskas ac32d03071 feat: allow import thingiverse likes & collections 2026-09-08 20:11:09 +02:00
Tautvydas Derzinskas 51b56021c0 refactor: deal with few things 2026-09-08 16:57:27 +02:00