Skip to content

feat(llm): prepare generation requests for each model candidate - #264

Merged
wolfy-j merged 1 commit into
masterfrom
fix/llm-candidate-request-shaping
Nov 13, 2026
Merged

wolfy-j merged 1 commit into
masterfrom
fix/llm-candidate-request-shaping

Conversation

@wolfy-j

@wolfy-j wolfy-j commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Generation clients can shape messages and output reservations for the actual model attempted by the existing fallback chain. The optional prepare_request callback runs per candidate before output planning and context admission, and stays local to the call.

Without the callback, request construction and fallback behavior stay unchanged. Native errors retain their identity and classification. Direct provider calls supply no resolved card. This provides the dependency needed for model-specific OCR request profiles in kicksideai/providers#108; the consumer integration follows the framework release.

Validation uses runtime v0.3.59a: the new tests fail before the change, all seven new cases pass, the directly affected LLM and request-golden tests pass (268 tests total), and LLM lint reports no issues. Tests cover concrete and class fallback, candidate token limits, context admission, direct calls, invalid callback results, and native error preservation.

@wolfy-j
wolfy-j requested a review from skhaz November 13, 2026 22:17
@wolfy-j
wolfy-j merged commit 16551d8 into master Nov 13, 2026
25 checks passed
@wolfy-j
wolfy-j deleted the fix/llm-candidate-request-shaping branch November 13, 2026 22:50
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.

2 participants