Description
The structured_chat method in OpenAIModelAdapter calls self.handle_response(response), but this method is never defined in the class. This causes an AttributeError at runtime.
Location
common/llm/adapters/azure_openai.py - line 40
Current Code
async def structured_chat(self, messages: list[dict[str, str]], response_format: type[T]) -> T:
response = await self.async_azure_client.beta.chat.completions.parse(
model=self._model, messages=messages, response_format=response_format, **self._kwargs
)
choice = self.handle_response(response) ===>>>>> undefined method
return choice.message.parsed
Impact
Azure OpenAI structured outputs fail silently
Speaker identification returns generic labels ("Speaker 1", "Speaker 2") instead of identified names
Error is swallowed by except Exception handlers in the calling code
Suggested Fix
async def structured_chat(self, messages: list[dict[str, str]], response_format: type[T]) -> T:
response = await self.async_azure_client.beta.chat.completions.parse(
model=self._model, messages=messages, response_format=response_format, **self._kwargs
)
choice = response.choices[0]
self.choice_incomplete(choice, response)
return choice.message.parsed
This matches the pattern used in the chat method.

Description
The
structured_chatmethod inOpenAIModelAdaptercallsself.handle_response(response), but this method is never defined in the class. This causes anAttributeErrorat runtime.Location
common/llm/adapters/azure_openai.py- line 40Current Code
Impact
Azure OpenAI structured outputs fail silently
Speaker identification returns generic labels ("Speaker 1", "Speaker 2") instead of identified names
Error is swallowed by except Exception handlers in the calling code
Suggested Fix
This matches the pattern used in the chat method.