fix(responses): end tool search lowering with an explicit return

CodeQL flags the match in _lowered_call_kwargs for mixing explicit returns with a fall through, since it doesn't know assert_never never returns. The exhaustiveness check now follows the match as return assert_never(lowering), as elsewhere in the codebase, which keeps basedpyright clean
This commit is contained in:
Id545 2026-10-02 21:40:32 +02:00
parent f2b332f769
commit bb51372ae8

View file

@ -43,8 +43,7 @@ def _lowered_call_kwargs(
model=model,
llm_provider=custom_llm_provider if isinstance(custom_llm_provider, str) else "",
)
case _:
assert_never(lowering)
return assert_never(lowering)
def _lifted(result: object) -> ResponsesAPIResponse | BaseResponsesAPIStreamingIterator: