akhaliq HF Staff commited on
Commit
96e09c4
·
1 Parent(s): 8684085

add qwen 3 max preview

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -1620,11 +1620,16 @@ AVAILABLE_MODELS = [
1620
  "name": "Claude-Opus-4.1",
1621
  "id": "claude-opus-4.1",
1622
  "description": "Anthropic Claude Opus 4.1 via Poe (OpenAI-compatible)"
 
 
 
 
 
1623
  }
1624
  ]
1625
 
1626
  # Default model selection
1627
- DEFAULT_MODEL_NAME = "Carrot"
1628
  DEFAULT_MODEL = None
1629
  for _m in AVAILABLE_MODELS:
1630
  if _m.get("name") == DEFAULT_MODEL_NAME:
@@ -1744,6 +1749,12 @@ def get_inference_client(model_id, provider="auto"):
1744
  api_key=os.getenv("POE_API_KEY"),
1745
  base_url="https://api.poe.com/v1"
1746
  )
 
 
 
 
 
 
1747
  elif model_id == "step-3":
1748
  # Use StepFun API client for Step-3 model
1749
  return OpenAI(
 
1620
  "name": "Claude-Opus-4.1",
1621
  "id": "claude-opus-4.1",
1622
  "description": "Anthropic Claude Opus 4.1 via Poe (OpenAI-compatible)"
1623
+ },
1624
+ {
1625
+ "name": "Qwen3 Max Preview",
1626
+ "id": "qwen3-max-preview",
1627
+ "description": "Qwen3 Max Preview model via DashScope International API"
1628
  }
1629
  ]
1630
 
1631
  # Default model selection
1632
+ DEFAULT_MODEL_NAME = "Qwen3 Max Preview"
1633
  DEFAULT_MODEL = None
1634
  for _m in AVAILABLE_MODELS:
1635
  if _m.get("name") == DEFAULT_MODEL_NAME:
 
1749
  api_key=os.getenv("POE_API_KEY"),
1750
  base_url="https://api.poe.com/v1"
1751
  )
1752
+ elif model_id == "qwen3-max-preview":
1753
+ # Use DashScope International OpenAI client for Qwen3 Max Preview
1754
+ return OpenAI(
1755
+ api_key=os.getenv("DASHSCOPE_API_KEY"),
1756
+ base_url="https://dashscope.aliyuncs.com/compatible-mode/v1",
1757
+ )
1758
  elif model_id == "step-3":
1759
  # Use StepFun API client for Step-3 model
1760
  return OpenAI(