github BerriAI/litellm v1.1.0

latest releases: v1.41.7, v1.41.6.dev1, v1.41.6...
7 months ago

What's Changed

🚨 Breaking Change v1.1.0 -> This version is only compatible with OpenAI python 1.1.0
Migration Guide: https://docs.litellm.ai/docs/migration

Key changes in v1.1.0

  • Requires openai>=1.0.0
  • openai.InvalidRequestError → openai.BadRequestError
  • openai.ServiceUnavailableErroropenai.APIStatusError
  • NEW litellm client, allow users to pass api_key
    • litellm.Litellm(api_key="sk-123")
  • response objects now inherit from BaseModel (prev. OpenAIObject)
  • NEW default exception - APIConnectionError (prev. APIError)
  • litellm.get_max_tokens() now returns an int not a dict
    max_tokens = litellm.get_max_tokens("gpt-3.5-turbo") # returns an int not a dict 
    assert max_tokens==4097

Other updates

New Contributors

Full Changelog: v0.11.1...v1.1.0

Don't miss a new litellm release

NewReleases is sending notifications on new releases.