Problem
Two generation boundary cases fail unclearly:
- A per-prompt list such as
max_tokens that is shorter than the prompt list is consumed with unchecked zip, silently omitting trailing prompts.
stream_generate(max_tokens=0) skips the generation loop and later reads locals that were never initialized, raising UnboundLocalError.
Expected behavior
Per-prompt option lengths should be validated before generation, and a zero-token request should terminate normally without entering token generation.
Proposed fix
Draft PR #1681 validates per-prompt list lengths and handles the zero-token path explicitly, with focused regressions for both cases.
Problem
Two generation boundary cases fail unclearly:
max_tokensthat is shorter than the prompt list is consumed with uncheckedzip, silently omitting trailing prompts.stream_generate(max_tokens=0)skips the generation loop and later reads locals that were never initialized, raisingUnboundLocalError.Expected behavior
Per-prompt option lengths should be validated before generation, and a zero-token request should terminate normally without entering token generation.
Proposed fix
Draft PR #1681 validates per-prompt list lengths and handles the zero-token path explicitly, with focused regressions for both cases.