From 4102a1d8846a0bb7e415accf22cdacc852ece3d3 Mon Sep 17 00:00:00 2001 From: Michelangelo Mori <328978+blkt@users.noreply.github.com> Date: Wed, 16 Apr 2025 15:19:44 +0200 Subject: [PATCH] Add missing variable initialization. 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 --- src/codegate/providers/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/codegate/providers/base.py b/src/codegate/providers/base.py index a4edd7e6..9dca5ed9 100644 --- a/src/codegate/providers/base.py +++ b/src/codegate/providers/base.py @@ -287,6 +287,7 @@ async def complete( is_fim_request, ) + provider_request = normalized_request # default value if input_pipeline_result.request: provider_request = self._input_normalizer.denormalize(input_pipeline_result.request) if is_fim_request: