mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
feat: add TokenMix as an OpenAI-compatible provider
This commit is contained in:
parent
b9765458ac
commit
84dfdfe90c
5 changed files with 29 additions and 0 deletions
|
|
@ -809,6 +809,7 @@ openai_compatible_endpoints: List = [
|
|||
"https://nano-gpt.com/api/v1",
|
||||
"https://api.poe.com/v1",
|
||||
"https://llm.chutes.ai/v1/",
|
||||
"https://api.tokenmix.ai/v1",
|
||||
"https://api.v0.dev/v1",
|
||||
"https://api.morphllm.com/v1",
|
||||
"https://api.lambda.ai/v1",
|
||||
|
|
@ -862,6 +863,7 @@ openai_compatible_providers: List = [
|
|||
"nano-gpt", # Nano-GPT - JSON-configured provider
|
||||
"poe", # Poe - JSON-configured provider
|
||||
"chutes", # Chutes - JSON-configured provider
|
||||
"tokenmix", # TokenMix - JSON-configured provider
|
||||
"parasail", # Parasail - JSON-configured provider
|
||||
"libertai", # LibertAI - JSON-configured provider
|
||||
"featherless_ai",
|
||||
|
|
|
|||
|
|
@ -370,6 +370,9 @@ def get_llm_provider(
|
|||
elif endpoint == "https://llm.chutes.ai/v1/":
|
||||
custom_llm_provider = "chutes"
|
||||
dynamic_api_key = get_secret_str("CHUTES_API_KEY")
|
||||
elif endpoint == "https://api.tokenmix.ai/v1":
|
||||
custom_llm_provider = "tokenmix"
|
||||
dynamic_api_key = get_secret_str("TOKENMIX_API_KEY")
|
||||
elif endpoint == "https://api.v0.dev/v1":
|
||||
custom_llm_provider = "v0"
|
||||
dynamic_api_key = get_secret_str("V0_API_KEY")
|
||||
|
|
|
|||
|
|
@ -65,6 +65,13 @@
|
|||
"max_completion_tokens": "max_tokens"
|
||||
}
|
||||
},
|
||||
"tokenmix": {
|
||||
"base_url": "https://api.tokenmix.ai/v1",
|
||||
"api_key_env": "TOKENMIX_API_KEY",
|
||||
"param_mappings": {
|
||||
"max_completion_tokens": "max_tokens"
|
||||
}
|
||||
},
|
||||
"abliteration": {
|
||||
"base_url": "https://api.abliteration.ai/v1",
|
||||
"api_key_env": "ABLITERATION_API_KEY"
|
||||
|
|
|
|||
|
|
@ -3483,6 +3483,7 @@ class LlmProviders(str, Enum):
|
|||
NANOGPT = "nano-gpt"
|
||||
POE = "poe"
|
||||
CHUTES = "chutes"
|
||||
TOKENMIX = "tokenmix"
|
||||
NEOSANTARA = "neosantara"
|
||||
PARASAIL = "parasail"
|
||||
XIAOMI_MIMO = "xiaomi_mimo"
|
||||
|
|
|
|||
|
|
@ -509,6 +509,22 @@
|
|||
"a2a": false
|
||||
}
|
||||
},
|
||||
"tokenmix": {
|
||||
"display_name": "TokenMix (`tokenmix`)",
|
||||
"endpoints": {
|
||||
"chat_completions": true,
|
||||
"messages": false,
|
||||
"responses": false,
|
||||
"embeddings": false,
|
||||
"image_generations": false,
|
||||
"audio_transcriptions": false,
|
||||
"audio_speech": false,
|
||||
"moderations": false,
|
||||
"batches": false,
|
||||
"rerank": false,
|
||||
"a2a": false
|
||||
}
|
||||
},
|
||||
"clarifai": {
|
||||
"display_name": "Clarifai (`clarifai`)",
|
||||
"url": "https://docs.litellm.ai/docs/providers/clarifai",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue