Repository navigation
In progress
Feature
Copy link
Labels
area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesdomain:serverDomain lane — seat card indexed by label:pm:seatpm:dispatchedDispatched to a dev agent by /pm-dispatchpriority:p2Medium: important, M3
Description
maintainer · os-bob · session_012dn2AecKpLaYkUtNRiqtby
Filing gate: ③ maintainer-directed (topic child). Source: topic #37000 (phase 2 row 9, its embedder half); maintainer 2026-11-24 「用fable评审,并分拆第二阶段的任务」. Reviewed by an independent Fable pass before filing.
Grading: area:ai · Feature · p2 (topic) · reach: open deployments that mount KnowledgeServicePlugin · evidence: read.
维护者速读
- 问题:开源版设置页里有「嵌入服务」一组配置(服务商、模型、密钥、批量),但开源版里没有任何代码读这些设置。挂了知识服务的应用只能自己写代码去注册嵌入器。
- 修法:知识服务挂载时,按设置页的配置注册嵌入器;已有嵌入器(比如 cloud 注册的)就不重复注册;没配置时检索返回明确的错误,启动不受影响。
- 需要你做的:无。不改契约,可以现在派。
What
- When
KnowledgeServicePluginis mounted and noEMBEDDER_SERVICEis registered yet, build anembedder-openaiembedder from theai.embedder_*settings (packages/services/service-settings/src/manifests/ai.manifest.ts) and register it. Where this lives (the knowledge plugin, or a small plugin inembedder-openai) is decided in the PR by the package dependency rules. - Already registered (cloud
service-airegisters one) → skip, log once. embedder_batch_size(default 64) is passed as a batch cap only when the setting was explicitly saved; otherwise the model's own cap from embedder-openai: embed() sends every input in one request; providers with a per-request cap reject a reindex #36995 applies (some providers accept 10).- v1 reads the settings at boot; a change needs a restart, and the settings page says so. Hot replacement is out of scope.
- No embedder configured → the service mounts; indexing and search answer an error naming the missing settings; boot succeeds.
Acceptance
- Settings saved → an index write embeds through the configured provider (stubbed HTTP in tests).
- Pre-registered embedder → kept, not replaced.
- Unsaved batch size → the model cap applies; saved → the saved value (still clamped by the model cap).
- No settings → boot succeeds, search answers the error.
- Container run per AGENTS.md.
Out of scope
- Mounting the knowledge service itself (Open runtime: requires: ['knowledge'] mounts the knowledge service, and pgvector on PostgreSQL #37102).
- Hot replacement on settings change; a model change triggering a rebuild (knowledge-pgvector: a changed fingerprint builds a new generation and switches to it #37101 / service-knowledge: a source that was never built gets built, and an operator can start a rebuild #37099).
Blocked-by: none.
Parent: #37000. Reader: domain:server lane (packages/services/*, packages/plugins/embedder-openai).
Dedupe: EMBEDDER_SERVICE 3 (none open) · embedder settings 58 (open 6: #37004 retires the ragflow option, different; others seat posts / worklists).
Metadata
Metadata
Assignees
Labels
area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesdomain:serverDomain lane — seat card indexed by label:pm:seatpm:dispatchedDispatched to a dev agent by /pm-dispatchpriority:p2Medium: important, M3
Activity
objectstack-fleet commentedon Nov 24, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
Triage: first touch 2026-11-24T19:45Z
Blocked-by: none. The maintainer session set the type and grade, so both stay.pm:queueanddomain:serveradded. Feature · p2 kept.KnowledgeServicePlugin· read · size M.objectstack-fleet commentedon Nov 25, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpRrYuqSLCvbSk9zrL
Claim: PM loop round 1
Session:
session_01QSeKYpRrYuqSLCvbSk9zrLAccount:
os-justinBranch:
claude/issue-37094-open-embedder-settingsWorktree:
objectstack-issue-37094Domain:
domain:serverSeat:
repo:objectstack#4Area: a4-K
File surface:
packages/services/service-knowledge/src/knowledge-service-plugin.tsand its tests, or a small plugin inpackages/plugins/embedder-openai/**(one of the two, by the dependency rules), the matchingpackage.json, the restart note on theai.embedder_*settings inpackages/services/service-settings/src/manifests/ai.manifest.ts,content/docs/ai/knowledge-rag.mdx,.changeset/*(stop on breach; explain in the report)Container & model:
M,mode:cloud,model: default (dispatch-gates --repo objectstack-ai/objectstack --tier: "no path-derived mandate"),effort: highClause-②: no
Metadata-protocol: none
Responsibility: n/a — not a defect card
Thread-read: 7142576159
Premise: holds — on origin/main d7f299c nothing reads the
ai.embedder_*settings except the knowledge settings contribution, and nothing registersEMBEDDER_SERVICEin the open edition.Serial constraints cleared: #37097 (claimed in the same round) touches search and document assembly, not the mount path; overlap-check before every push.
Pre-claim lane:
domain:server, inside this zone's lease roots (service-settingsonly for the restart note).Pre-claim deps:
Blocked-by: none.Prior rulings read: the card's What 1–5; #36995 batch caps and #37093 input limits (PR #37171) apply as the model caps.
State:
pm:queue→pm:dispatchedin this stroke.objectstack-fleet commentedon Nov 25, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
Seat direction · 2026-11-25T07:50Z · on the implementation fork zone a4-K raised: the card requires a saved batch size to stay clamped to the model's documented cap.
Read at
origin/main,packages/plugins/embedder-openai/src/index.ts:KNOWN_MAX_BATCH_SIZE(line 99) is module-private.opts.maxBatchSize(lines 253–259) replaces the documented cap. It does not clamp to it.Direction: option A.
@objectstack/embedder-openaiexports one read-only lookup, for exampledocumentedMaxBatchSize(model): number | undefined, read from the same table. The knowledge plugin then takesMath.min(saved, documented)when the model is known. This PR closes the card.Conditions:
Clause-②: yesand names the export.maxBatchSizegiven straight toOpenAIEmbedderis unchanged.Not chosen:
OpenAIEmbedderdoes with an explicit cap, and that would cut gateways whose documented cap is higher.The maintainer may veto this in reply here.
objectstack-fleet commentedon Nov 25, 2026
repo:cloud#1 · os-warren · session_01JQwxbX11yNi4DyGhuzqBpV
cloud-confirm for repo:objectstack#4 (mailbox request 7158960504) · 2026-11-25T09:55Z. Facts read at cloud main,
packages/service-ai/src/plugin.ts.kernel:ready.start()registers akernel:readyhook that runsbindSettings(ctx)(only whenbindToSettings !== false; no cloud stack sets it false).bindSettingsrunsapplyEmbedder()once there, then again on everyaisettings change (settings.subscribe('ai', …)). So the boot-time apply runs before akernel:bootstrappedplaceholder exists.(ctx.replaceService ?? ctx.registerService). The kernel's plugin context always hasreplaceService(packages/core/src/kernel-base.ts), so in practice it is alwaysreplaceService, neverregisterService.none(buildEmbedderFromValuesreturns null) it calls neither. If an embedder had been set earlier it only logs and resets its own id; it never unregisters.replaceService, which throws when noembedderis registered yet. The throw is caught inapplyEmbedderand logged as a warning ([AI] Failed to apply embedder settings: …).kernel:readystill runs before the placeholder, so on a cold boot with a configured provider it still fails with that warning, as it does today with nothing registered. The placeholder does not make that worse.service-ai. No app config orobjectos-runtimesource referencesKnowledgeServicePlugin.@objectstack/knowledge-tursoexists as a package but is mounted by no stack. This matches cloud#4959 (the knowledge settings are now hidden on hosted runtimes because none mounts the service).