add horizon alpha
Browse files
app.py
CHANGED
@@ -400,6 +400,11 @@ AVAILABLE_MODELS = [
|
|
400 |
"name": "Qwen3-30B-A3B-Thinking-2507",
|
401 |
"id": "qwen3-30b-a3b-thinking-2507",
|
402 |
"description": "Qwen3-30B-A3B-Thinking model with advanced reasoning via Alibaba Cloud DashScope API"
|
|
|
|
|
|
|
|
|
|
|
403 |
}
|
404 |
]
|
405 |
|
@@ -485,6 +490,16 @@ def get_inference_client(model_id, provider="auto"):
|
|
485 |
api_key=os.getenv("DASHSCOPE_API_KEY"),
|
486 |
base_url="https://dashscope.aliyuncs.com/compatible-mode/v1",
|
487 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
488 |
elif model_id == "moonshotai/Kimi-K2-Instruct":
|
489 |
provider = "groq"
|
490 |
elif model_id == "Qwen/Qwen3-235B-A22B":
|
|
|
400 |
"name": "Qwen3-30B-A3B-Thinking-2507",
|
401 |
"id": "qwen3-30b-a3b-thinking-2507",
|
402 |
"description": "Qwen3-30B-A3B-Thinking model with advanced reasoning via Alibaba Cloud DashScope API"
|
403 |
+
},
|
404 |
+
{
|
405 |
+
"name": "Horizon Alpha",
|
406 |
+
"id": "openrouter/horizon-alpha",
|
407 |
+
"description": "OpenRouter Horizon Alpha model for advanced code generation and multimodal tasks"
|
408 |
}
|
409 |
]
|
410 |
|
|
|
490 |
api_key=os.getenv("DASHSCOPE_API_KEY"),
|
491 |
base_url="https://dashscope.aliyuncs.com/compatible-mode/v1",
|
492 |
)
|
493 |
+
elif model_id == "openrouter/horizon-alpha":
|
494 |
+
# Use OpenRouter client for Horizon Alpha model
|
495 |
+
return OpenAI(
|
496 |
+
api_key=os.getenv("OPENROUTER_API_KEY"),
|
497 |
+
base_url="https://openrouter.ai/api/v1",
|
498 |
+
default_headers={
|
499 |
+
"HTTP-Referer": os.getenv("OPENROUTER_SITE_URL", "https://huggingface.co/spaces/akhaliq/anycoder"),
|
500 |
+
"X-Title": os.getenv("OPENROUTER_SITE_NAME", "AnyCoder")
|
501 |
+
}
|
502 |
+
)
|
503 |
elif model_id == "moonshotai/Kimi-K2-Instruct":
|
504 |
provider = "groq"
|
505 |
elif model_id == "Qwen/Qwen3-235B-A22B":
|