- Fix docstring placement and type hints
- Add proper model name validation with clear error messages
- Organize tests into a class and add edge cases
Co-Authored-By: Joe Moura <joao@crewai.com>
- Add better error messages with model name context
- Add type hints and docstrings
- Add constants for model name validation
- Organize tests into a class
- Add edge case tests
Co-Authored-By: Joe Moura <joao@crewai.com>
- Adds validation to prevent models/ prefix in model names
- Adds tests for model name validation
- Ensures correct model name format for LiteLLM provider recognition
Co-Authored-By: Joe Moura <joao@crewai.com>
* fix: ensure proper message formatting for Anthropic models
- Add Anthropic-specific message formatting
- Add placeholder user message when required
- Add test case for Anthropic message formatting
Fixes#1869
Co-Authored-By: Joe Moura <joao@crewai.com>
* refactor: improve Anthropic model handling
- Add robust model detection with _is_anthropic_model
- Enhance message formatting with better edge cases
- Add type hints and improve documentation
- Improve test structure with fixtures
- Add edge case tests
Addresses review feedback on #2063
Co-Authored-By: Joe Moura <joao@crewai.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <joao@crewai.com>
* drop litellm version to prevent windows issue
* Fix failing tests
* Trying to fix tests
* clean up
* Trying to fix tests
* Drop token calc handler changes
* fix failing test
* Fix failing test
---------
Co-authored-by: João Moura <joaomdmoura@gmail.com>