Files
litellm/tests
direcisionandGitHub 31d8edb1bf fix: correct CompletionRequest messages type to match OpenAI API spec (#12980)
* fix: correct CompletionRequest messages type to match OpenAI API spec

- Changed messages field type from List[str] to List[ChatCompletionMessageParam]
- This ensures proper OpenAI API compatibility where messages should be objects with role and content fields
- Fixes type inconsistency in completion request handling

* feat(tests): Add comprehensive tests for CompletionRequest model

- Add test_completion.py for litellm.types.completion module
- Test ChatCompletionMessageParam type validation
- Test tool message format compatibility
- Test function message format (deprecated)
- Test multimodal content (text + image)
- Test default empty messages list
- Test all optional parameters
- Validate OpenAI ChatCompletion API message format compatibility
2025-07-28 16:47:20 -07:00
..
2025-07-12 17:07:21 -07:00
2025-07-27 09:52:22 -07:00
2025-07-23 07:11:35 -07:00
2024-11-22 19:23:36 +05:30
2025-05-26 22:06:53 -07:00

In total litellm runs 1000+ tests

[02/20/2025] Update:

To make it easier to contribute and map what behavior is tested,

we've started mapping the litellm directory in tests/litellm

This folder can only run mock tests.