refactor: address code review feedback from Gemini

- Extract restriction checking logic into reusable helper method
- Refactor validate_model_name to reduce code duplication
- Fix logging import by using existing module-level logger
- Clean up test file by removing print statement and main block
- All tests continue to pass after refactoring
This commit is contained in:
Sven Lito
2025-09-05 11:04:02 +07:00
parent fab1f24475
commit 525f4598ce
2 changed files with 48 additions and 59 deletions

View File

@@ -75,9 +75,3 @@ def test_issue_245_custom_openai_temperature_ignored():
# Verify the fix: NO temperature should be sent to the API
call_kwargs = mock_client.chat.completions.create.call_args[1]
assert "temperature" not in call_kwargs, "Fix failed: temperature still being sent!"
print("✅ Issue #245 is FIXED! Temperature parameter correctly ignored for custom models.")
if __name__ == "__main__":
test_issue_245_custom_openai_temperature_ignored()