Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 9c51b4d

Browse files
authored
Add missing variable initialization. (#1352)
Under some weird circumstance, the `if` statements after the newly added line are both evaluating to `False`, causing the variable `provider_request` to never be initialized. This initializes the variable to a reasonable default value, but I'm not 100% sure it solves the problem. Fixes #1345
1 parent 55f6d86 commit 9c51b4d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/codegate/providers/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ async def complete(
287287
is_fim_request,
288288
)
289289

290+
provider_request = normalized_request # default value
290291
if input_pipeline_result.request:
291292
provider_request = self._input_normalizer.denormalize(input_pipeline_result.request)
292293
if is_fim_request:

0 commit comments

Comments
 (0)