Latest model aliases
An alias such as openai/gpt-luna-latest points to a model in that family. LiteLLM maintains the target. As LiteLLM moves the alias to a newer model, your application keeps the same model string.
Use the full provider/model-latest name from the table below. You do not need to create an alias mapping. Each provider page also lists the aliases for that provider.
Python SDK
Install litellm with pip install litellm and set OPENAI_API_KEY to your OpenAI API key.
from litellm import completion
response = completion(
model="openai/gpt-luna-latest",
messages=[{"role": "user", "content": "Say hello."}],
)
print(response.choices[0].message.content)
A successful call prints a greeting from the model behind the alias.