Reject incomplete AI completions before showing generated answers
This commit is contained in:
1 parent
8c005f5f57
commit
7c7cecb5ab
3 files changed
+53
No files matched your search
@@ -49,6 +49,14 @@ model is instructed to return JSON containing `answer` and `citations` inside
|
||||
chosen model must follow that instruction. Unknown source citations and invalid
|
||||
responses produce an error; search remains available.
|
||||
|
||||
When an endpoint provides `choices[0].finish_reason`, it must be `stop`.
|
||||
Truncated (`length`), filtered, tool-directed and unknown completion reasons
|
||||
are rejected even if the returned text happens to parse as valid cited JSON.
|
||||
Compatible local servers may omit this field. Nine local HTTP adapter tests
|
||||
passed on 2026-10-13, including explicit completion reasons, citation validation,
|
||||
credential handling, response limits and timeouts; strict Clippy passed.
|
||||
This does not validate any hosted provider or generated answer accuracy.
|
||||
|
||||
Requests use timeouts and size limits. Redirects and ambient proxies are
|
||||
disabled to keep the configured destination explicit. Endpoint URLs must use
|
||||
HTTP or HTTPS and must not contain embedded credentials, query strings or
|
||||
|
||||
Reference in new issue
Block a user