Address code review feedback: improve model detection, parameter filtering, and test coverage

- Refactor _is_ollama_model to use constants for better maintainability
- Make parameter filtering more explicit with clear comments
- Add type hints for better code clarity
- Add comprehensive edge case tests for model detection
- Improve test docstrings with detailed descriptions
- Move integration test to proper tests/ directory structure
- Fix lint error in test script by adding assertion
- All tests passing locally with improved code quality

Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
Devin AI
2025-06-28 21:40:38 +00:00
parent aa82ca5273
commit 7a19bfb4a9
4 changed files with 170 additions and 15 deletions

View File

@@ -33,6 +33,8 @@ def test_original_issue():
)
print("✅ Agent creation with Ollama LLM succeeded")
assert agent.llm.model == "ollama/gemma3:latest"
except ValueError as e:
if "does not support response_format" in str(e):
print(f"❌ Original issue still exists: {e}")