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
GLiNER-family adapters: hardening follow-ups from #380 and #381 #382
Hardening follow-ups for the GLiNER-family adapters, from the review of #380 and #381. None of them block those PRs.
GLiNER2 caller errors should raise InvalidInputError. (Completed in fix(server): report GLiNER2 caller errors as invalid input #526.) Bad metadata.entities on relations, invalid labels or schema, and multi_label misuse currently raise ValueError, which surfaces as a server error. Raise InvalidInputError instead, as GLiREL now does, so these return 400 INVALID_INPUT.
Count GLiNER2's real prompt. (Completed in fix(gliner2): count compiled inference prompts #794.) Measure the prompt gliner2 actually builds, as the GLiNER path does, instead of estimating it. The estimate over-counts plain field specs, so some valid schemas are rejected, and it can under-count JSON-heavy ones by about 2%.
Validate the prompt before windowing the document in GLiNER2. (Completed in fix(server): validate GLiNER2 prompts before document work #793.) Today the document is windowed and metered first. That work is already bounded, so this is an efficiency change.
GLiNER2 metering covers the window. (Completed in fix(server): meter compiled GLiNER2 document windows #797.) GLiNER2 meters document tokens up to 512, while the window it reads can hold up to 2048 subwords. Consider metering the window's subwords, as GLiNER does.
All listed follow-ups are now complete. The final document-window metering change landed in #797 as b68fe36 after exact-head CodeRabbit approval and all21 check/status contexts succeeded. It uses the existing compiled document-window subword counts, excludes prompt/padding, and preserves per-window overlap charging and zero usage for rejected/incomplete extraction items. Focused validation and actual-processor evidence are recorded in the PR.
Activity
fix(server): reject overlong GLiNER bi-encoder labels (#651)
svonava commentedon Oct 18, 2026
All listed follow-ups are now complete. The final document-window metering change landed in #797 as b68fe36 after exact-head CodeRabbit approval and all21 check/status contexts succeeded. It uses the existing compiled document-window subword counts, excludes prompt/padding, and preserves per-window overlap charging and zero usage for rejected/incomplete extraction items. Focused validation and actual-processor evidence are recorded in the PR.