akhaliq HF Staff commited on
Commit
e8ac778
·
1 Parent(s): 3b8474b

add horizon beta

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -461,6 +461,11 @@ AVAILABLE_MODELS = [
461
  "id": "openrouter/horizon-alpha",
462
  "description": "OpenRouter Horizon Alpha model for advanced code generation and multimodal tasks"
463
  },
 
 
 
 
 
464
  {
465
  "name": "StepFun Step-3",
466
  "id": "step-3",
@@ -571,6 +576,16 @@ def get_inference_client(model_id, provider="auto"):
571
  "X-Title": os.getenv("OPENROUTER_SITE_NAME", "AnyCoder")
572
  }
573
  )
 
 
 
 
 
 
 
 
 
 
574
  elif model_id == "step-3":
575
  # Use StepFun API client for Step-3 model
576
  return OpenAI(
 
461
  "id": "openrouter/horizon-alpha",
462
  "description": "OpenRouter Horizon Alpha model for advanced code generation and multimodal tasks"
463
  },
464
+ {
465
+ "name": "Horizon Beta",
466
+ "id": "openrouter/horizon-beta",
467
+ "description": "OpenRouter Horizon Beta model for advanced code generation and multimodal tasks with vision support"
468
+ },
469
  {
470
  "name": "StepFun Step-3",
471
  "id": "step-3",
 
576
  "X-Title": os.getenv("OPENROUTER_SITE_NAME", "AnyCoder")
577
  }
578
  )
579
+ elif model_id == "openrouter/horizon-beta":
580
+ # Use OpenRouter client for Horizon Beta model
581
+ return OpenAI(
582
+ api_key=os.getenv("OPENROUTER_API_KEY"),
583
+ base_url="https://openrouter.ai/api/v1",
584
+ default_headers={
585
+ "HTTP-Referer": os.getenv("OPENROUTER_SITE_URL", "https://huggingface.co/spaces/akhaliq/anycoder"),
586
+ "X-Title": os.getenv("OPENROUTER_SITE_NAME", "AnyCoder")
587
+ }
588
+ )
589
  elif model_id == "step-3":
590
  # Use StepFun API client for Step-3 model
591
  return OpenAI(