Skip to content

fix(providers): return terminal response failures without transport retries - #385

Open
jcs130 wants to merge 1 commit into
Pal-AI-Lab:mainfrom
jcs130:fix/response-terminal-recovery-20261106
Open

jcs130 wants to merge 1 commit into
Pal-AI-Lab:mainfrom
jcs130:fix/response-terminal-recovery-20261106

Conversation

@jcs130

@jcs130 jcs130 commented Nov 6, 2026

Copy link
Copy Markdown

When a provider returns a terminal response.failed before any text or tool call is committed, its status-zero LLMError currently causes the transport to retry the same generation. This repeats output-validation failures and delays delivery of their evidence to the caller.

Return a failed response after that physical attempt, preserving its response ID, partial output, usage and GenerationError. Connection failures without a terminal resource retain the existing retry behavior. Persona-side recovery remains outside the transport.

Validation: 5,197 tests passed, 3 skipped; TypeScript check passed. New streaming and non-streaming native Responses tests verify one physical request and preserved failed terminal evidence.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant