Bug: provider does not handle null message content / finish_reason, crashing with 'NoneType' object has no attribute 'strip'
Description
OpenAICompatibleProvider.chat returns choices[0].message.content without checking whether it is None or whether finish_reason indicates the output is unusable:
https://github.com/interviewstreet/hiring-agent/blob/70fd3ea/models.py#L374-L379
OpenAI-compatible APIs return "content": null in several normal situations (e.g. safety/content-filter blocks, some refusals, reasoning models that exhaust the token budget), and return truncated JSON when finish_reason == "length".
The None then flows into extract_json_from_response, which immediately calls .strip():
https://github.com/interviewstreet/hiring-agent/blob/70fd3ea/llm_utils.py#L24
Actual
from llm_utils import extract_json_from_response
extract_json_from_response(None)
# AttributeError: 'NoneType' object has no attribute 'strip'- In
pdf.pythis is swallowed as❌ Error calling LLM for basics section: 'NoneType' object has no attribute 'strip', retried once, and extraction aborts. - In
evaluator.pyit propagates as an unhandled traceback.
Neither message tells the user the model returned no content or why.
Expected
The provider raises a clear error such as ValueError("Empty response from <url> (finish_reason=content_filter)"), and a finish_reason of length is reported as truncation rather than surfacing later as a JSON decode error.
Source: interviewstreet/hiring-agent