Preserve LLM generation failure metadata
This commit is contained in:
@@ -75,6 +75,12 @@ error type. PromptKit's built-in client retries eligible transient HTTP failures
|
||||
with its v0.11.0 default of two additional attempts per generation; Notarius
|
||||
keeps pipeline-stage retries outside that completion boundary.
|
||||
|
||||
The adapter projects built-in generation failures as the application-owned
|
||||
`LLMGenerationError`, retaining a safe failure kind, HTTP status when present,
|
||||
and retry-exhaustion attempt count. Transport, malformed successful envelopes,
|
||||
provider statuses, and generic generation failures remain distinct without
|
||||
exposing PromptKit error values to Notarius callers.
|
||||
|
||||
## Profile Sources And Compatibility
|
||||
|
||||
Notarius gives PromptKit the configured operator profile source, registered
|
||||
|
||||
@@ -216,6 +216,13 @@ than output-validation failures. Apart from documented context, capacity, and
|
||||
invalid-output categories, provider error values and types do not cross the
|
||||
adapter error chain; callers receive only a credential-redacted diagnostic.
|
||||
|
||||
`LLMGenerationError` preserves the provider-neutral failure kind (`transport`,
|
||||
`provider_status`, `malformed_response`, or generic `generation`) and any HTTP
|
||||
status. When PromptKit exhausts an eligible transient-status retry budget, it
|
||||
also records that exhaustion and the attempts in that generation. Those fields
|
||||
do not include repair generations, and zero attempts means unavailable rather
|
||||
than proof that no request was sent.
|
||||
|
||||
When PromptKit rejects backend admission before generation, the adapter maps
|
||||
`promptkit.ErrCapacityExceeded` to
|
||||
`contracts.ErrLLMCapacityExceeded`, retaining prompt context and a redacted
|
||||
|
||||
@@ -174,6 +174,8 @@ and `git diff --check`.
|
||||
|
||||
## Stage 4 — Preserve Typed Failure And Exhaustion Metadata
|
||||
|
||||
**Status:** Completed 2026-09-25.
|
||||
|
||||
**Goal:** Distinguish provider failures without coupling callers to PromptKit.
|
||||
One prompt; defer execution observations to the next stage.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user