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

Commit 9b47715

Browse files
committed
Fix confusing debug messages
The order of our debug messages was confusing which meant that it looked like we're piping all messages through the pipeline even if we were not.
1 parent 810cbc8 commit 9b47715

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/codegate/providers/copilot/provider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def _select_pipeline(self, method: str, path: str) -> Optional[CopilotPipeline]:
159159
logger.debug("Selected CopilotChatStrategy")
160160
return CopilotChatPipeline(self.pipeline_factory)
161161

162-
logger.debug("No pipeline strategy selected")
162+
logger.debug("No pipeline selected")
163163
return None
164164

165165
async def _body_through_pipeline(
@@ -169,12 +169,12 @@ async def _body_through_pipeline(
169169
headers: list[str],
170170
body: bytes,
171171
) -> Tuple[bytes, PipelineContext]:
172-
logger.debug(f"Processing body through pipeline: {len(body)} bytes")
173172
strategy = self._select_pipeline(method, path)
174173
if len(body) == 0 or strategy is None:
175174
# if we didn't select any strategy that would change the request
176175
# let's just pass through the body as-is
177176
return body, None
177+
logger.debug(f"Processing body through pipeline: {len(body)} bytes")
178178
return await strategy.process_body(headers, body)
179179

180180
async def _request_to_target(self, headers: list[str], body: bytes):

0 commit comments

Comments
 (0)