fix(ocr): address code review: add model fallback default, remove unused variable

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-24 18:44:20 +00:00
parent b03bfb5e02
commit 0c500e1ec6
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -261,7 +261,7 @@ def check_text_quality(text: str, text_source: TextSource) -> TextQualityResult:
response_text: Optional[str] = None
try:
provider = get_ai_provider()
model = settings.ai_model or settings.openai_model
model = settings.ai_model or settings.openai_model or "gpt-4o-mini"
response_text = provider.chat_completion(
messages=[
{
-1
View File
@@ -401,7 +401,6 @@ class TestCheckTextQualityAI:
assert len(captured_prompts) == 1
# The prompt should NOT contain more than _TEXT_SAMPLE_MAX_CHARS "a"s
count_a = captured_prompts[0].count("a" * 100)
assert "a" * (_TEXT_SAMPLE_MAX_CHARS + 1) not in captured_prompts[0]