You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit aa20446
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(knowledge): tighten image extraction after a full review
- Every Gemini attempt takes its own admission, and 429/503 records a provider
cooldown for the key; the retry delay is read from the body's RetryInfo when
no Retry-After header is sent.
- The image is base64-encoded once per extraction, rotated upright even when it
already fits, and flattened onto white before a JPEG fallback.
- Cost goes through calculateBillableModelCost; both indexing charges share one
recordIndexingUsage helper.
- Reconciliation waits until queued image removal finishes, and the removal walks
by id instead of rescanning from the start.
- The per-sync image cap is at least 1, so a sync can always finish.
- canExtractImages lives with the extractor; isSemanticImage treats an undeclared
policy as OCR, so callers drop their fallbacks.
- Tests: unique embedding vectors, restored pool keys, waits for dispatched syncs,
fake timers in finally, native noise fixtures; drops mock-only assertions.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/platform/self-hosting/environment-variables.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -193,7 +193,7 @@ See [Observability](/platform/self-hosting/observability).
193
193
| Variable | Description |
194
194
|----------|-------------|
195
195
|`KB_IMAGE_EXTRACTION_MODEL`| Gemini model that reads Confluence image attachments into searchable text. Defaults to `gemini-3.8-flash`; a value that is not a Gemini 3 model in the catalog falls back to the default. Needs `GEMINI_API_KEY` (or a workspace Gemini key); without one, image attachments are left out of syncs |
196
-
|`KB_IMAGE_EXTRACTIONS_PER_SYNC`| New or changed images one connector sync sends for reading. Defaults to `500`; the rest wait for the next sync, which reports as partial |
196
+
|`KB_IMAGE_EXTRACTIONS_PER_SYNC`| New or changed images one connector sync sends for reading, at least `1`. Defaults to `500`; the rest wait for the next sync, which reports as partial |
197
197
|`KB_CONFIG_VISION_REQUESTS_PER_MINUTE`| Image reads per minute per Gemini key, shared by every sync on the deployment. Defaults to `300`; lower it to match a key with a smaller Gemini quota |
198
198
|`KB_EMBEDDING_MODEL`| Embedding model for new knowledge bases. Defaults to `text-embedding-3-small`; use `ollama/<model>` for a model on your own Ollama. An unrecognised hosted model id falls back to the default, but an `ollama/` id is taken at face value — if that model is not on the server, knowledge-base creation fails rather than falling back |
199
199
|`EMBEDDING_OUTPUT_DIMS`| Vector width new knowledge bases are stored at: `384`, `768`, `1024`, `1536` (default), or `3072`. It must be a width the chosen model can emit; anything else falls back to `1536` with a warning |
0 commit comments