This commit is contained in:
Pessimist228 2026-09-12 23:51:12 -07:00 committed by GitHub
commit f9ab965e38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 79 additions and 0 deletions

View file

@ -881,6 +881,7 @@ openai_compatible_endpoints: Final[list] = [
"https://serverless.tensormesh.ai/v1",
"https://api.stima.tech/v1",
"https://nano-gpt.com/api/v1",
"https://api.llmtech.eu/v1",
"https://api.poe.com/v1",
"https://llm.chutes.ai/v1/",
"https://api.v0.dev/v1",
@ -939,6 +940,7 @@ openai_compatible_providers: Final[list] = [
"tensormesh", # Tensormesh - JSON-configured provider
"apertis", # Apertis - JSON-configured provider
"nano-gpt", # Nano-GPT - JSON-configured provider
"llmtech", # LLM Tech - JSON-configured provider
"poe", # Poe - JSON-configured provider
"chutes", # Chutes - JSON-configured provider
"parasail", # Parasail - JSON-configured provider
@ -988,6 +990,7 @@ openai_text_completion_compatible_providers: Final[list] = [ # providers that s
"tensormesh",
"apertis",
"nano-gpt",
"llmtech",
"poe",
"chutes",
"v0",

View file

@ -339,6 +339,9 @@ def get_llm_provider(
elif endpoint == "https://nano-gpt.com/api/v1":
custom_llm_provider = "nano-gpt"
dynamic_api_key = get_secret_str("NANOGPT_API_KEY")
elif endpoint == "https://api.llmtech.eu/v1":
custom_llm_provider = "llmtech"
dynamic_api_key = get_secret_str("LLMTECH_API_KEY")
elif endpoint == "https://api.poe.com/v1":
custom_llm_provider = "poe"
dynamic_api_key = get_secret_str("POE_API_KEY")

View file

@ -200,5 +200,10 @@
"temperature_max": 1.99
},
"supported_endpoints": ["/v1/chat/completions"]
},
"llmtech": {
"base_url": "https://api.llmtech.eu/v1",
"api_key_env": "LLMTECH_API_KEY",
"api_base_env": "LLMTECH_API_BASE"
}
}

View file

@ -4036,6 +4036,7 @@ class LlmProviders(str, Enum):
SYNTHETIC = "synthetic"
APERTIS = "apertis"
NANOGPT = "nano-gpt"
LLMTECH = "llmtech"
POE = "poe"
CHUTES = "chutes"
NEOSANTARA = "neosantara"

View file

@ -1656,6 +1656,22 @@
"interactions": true
}
},
"llmtech": {
"display_name": "LLM Tech (`llmtech`)",
"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
}
},
"nanogpt": {
"display_name": "NanoGPT (`nanogpt`)",
"endpoints": {

View file

@ -509,3 +509,54 @@ if __name__ == "__main__":
print("\n" + "=" * 50)
print("✓ All tests passed!")
print("=" * 50)
class TestLLMTech:
"""Tests for LLM Tech JSON-configured provider"""
def test_llmtech_json_config_exists(self):
from litellm.llms.openai_like.json_loader import JSONProviderRegistry
provider = JSONProviderRegistry.get("llmtech")
assert provider is not None
assert provider.base_url == "https://api.llmtech.eu/v1"
assert provider.api_key_env == "LLMTECH_API_KEY"
assert provider.api_base_env == "LLMTECH_API_BASE"
def test_llmtech_provider_resolution(self):
from litellm.litellm_core_utils.get_llm_provider_logic import get_llm_provider
model, provider, api_key, api_base = get_llm_provider(
model="llmtech/unsloth/Qwen3.8-27B-NVFP4",
custom_llm_provider=None,
api_base=None,
api_key=None,
)
assert model == "unsloth/Qwen3.8-27B-NVFP4"
assert provider == "llmtech"
assert api_base == "https://api.llmtech.eu/v1"
def test_llmtech_endpoint_detection(self):
from litellm.litellm_core_utils.get_llm_provider_logic import get_llm_provider
model, provider, api_key, api_base = get_llm_provider(
model="unsloth/Qwen3.8-27B-NVFP4",
custom_llm_provider=None,
api_base="https://api.llmtech.eu/v1",
api_key=None,
)
assert provider == "llmtech"
assert api_base == "https://api.llmtech.eu/v1"
def test_llmtech_dynamic_config(self):
from litellm.llms.openai_like.dynamic_config import create_config_class
from litellm.llms.openai_like.json_loader import JSONProviderRegistry
provider = JSONProviderRegistry.get("llmtech")
config_class = create_config_class(provider)
config = config_class()
api_base, api_key = config._get_openai_compatible_provider_info(None, None)
assert api_base == "https://api.llmtech.eu/v1"