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

Fix missing secret message issue #539

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/codegate/providers/copilot/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,12 +754,12 @@ def connection_made(self, transport: asyncio.Transport) -> None:
logger.debug(f"Connection established to target: {transport.get_extra_info('peername')}")
self.proxy.target_transport = transport

def _ensure_output_processor(self) -> None:
def _ensure_output_processor(self, reinitialize=False) -> None:
if self.proxy.context_tracking is None:
# No context tracking, no need to process pipeline
return

if self.sse_processor is not None:
if (self.sse_processor is not None) and (not reinitialize):
# Already initialized, no need to reinitialize
return

Expand Down Expand Up @@ -862,6 +862,8 @@ def finish_data(self):
self.finish_stream = False
self.headers_sent = False

self._ensure_output_processor(reinitialize=True)

def _process_chunk(self, chunk: bytes):
# For debugging only
# print("===========START DATA RECVD====================")
Expand Down
Loading