Skip to content

Conversation

albertvillanova
Copy link
Member

@albertvillanova albertvillanova commented Apr 17, 2025

Fix CI test by updating LiteLLM error message.

This fix is required after litellm-1.66.2 release: https://pypi.org/project/litellm/1.66.2/

See: https://github.com/huggingface/smolagents/actions/runs/14510658163/job/40708376431?pr=1211

FAILED tests/test_models.py::TestLiteLLMModel::test_call_different_providers_without_key[groq/llama-3.3-70b-Missing API Key] - assert 'Missing API Key' in '<ExceptionInfo litellm.BadRequestError: GroqException - {"error":{"message":"Invalid API Key","type":"invalid_request_error","code":"invalid_api_key"}}\n tblen=7>'
 +  where '<ExceptionInfo litellm.BadRequestError: GroqException - {"error":{"message":"Invalid API Key","type":"invalid_request_error","code":"invalid_api_key"}}\n tblen=7>' = str(<ExceptionInfo litellm.BadRequestError: GroqException - {"error":{"message":"Invalid API Key","type":"invalid_request_error","code":"invalid_api_key"}}\n tblen=7>)

Copy link
Collaborator

@aymeric-roucher aymeric-roucher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Albert!

@albertvillanova albertvillanova merged commit c9605a9 into huggingface:main Apr 17, 2025
3 checks passed
@albertvillanova albertvillanova deleted the fix-ci-litellm branch April 17, 2025 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants