fix(server): index & gc queue & llm compatibility (#15528)

fix #15523
fix #15526

#### PR Dependency Tree


* **PR #15528** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved search generation cleanup, provider error reporting, and
reconciliation reliability.
- Retired search resources are cleaned up safely, including after
credential changes.
- Prompt size checks now ignore tool parameters and provide clearer
errors.
- Reserved documents are protected from accidental cleanup, and
malformed identifiers are rejected.

- **Configuration**
- Managed Copilot profiles require explicit, non-duplicated model
assignments.
  - Improved managed provider profile migration.

- **Performance & Reliability**
- Reduced unnecessary search-history cleanup and adjusted
consistency-check intervals.
- Failed reconciliation jobs stop after one attempt and are removed
automatically.

- **Data Updates**
  - Updated legacy AI session prompt names to current labels.
  - Improved cloud load-balancer health-check configuration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2026-08-26 15:57:06 +08:00
committed by GitHub
parent 8e8a781ed1
commit bd095495da
30 changed files with 691 additions and 203 deletions
@@ -0,0 +1,20 @@
UPDATE ai_sessions_metadata
SET prompt_name = CASE prompt_name
WHEN 'Search With AFFiNE AI' THEN 'Chat With AFFiNE AI'
WHEN 'debug:action:dalle3' THEN 'Generate image'
WHEN 'debug:action:fal-sd15' THEN 'Generate image'
WHEN 'debug:action:gpt-image-1' THEN 'Generate image'
WHEN 'debug:action:fal-remove-bg' THEN 'Remove background'
WHEN 'debug:action:fal-upscaler' THEN 'Upscale image'
WHEN 'debug:action:fal-face-to-sticker' THEN 'Convert to sticker'
ELSE prompt_name
END
WHERE prompt_name IN (
'Search With AFFiNE AI',
'debug:action:dalle3',
'debug:action:fal-sd15',
'debug:action:gpt-image-1',
'debug:action:fal-remove-bg',
'debug:action:fal-upscaler',
'debug:action:fal-face-to-sticker'
);