Update config.py
Browse files
config.py
CHANGED
|
@@ -33,7 +33,8 @@ class AppConfig:
|
|
| 33 |
"context_length": 128000, # Full 128k context length
|
| 34 |
"supports_reasoning": True,
|
| 35 |
"supports_tool_calling": True,
|
| 36 |
-
"active_params": "5.1B"
|
|
|
|
| 37 |
},
|
| 38 |
"openai/gpt-oss-20b": {
|
| 39 |
"name": "GPT OSS 20B",
|
|
@@ -42,7 +43,26 @@ class AppConfig:
|
|
| 42 |
"context_length": 128000, # Full 128k context length
|
| 43 |
"supports_reasoning": True,
|
| 44 |
"supports_tool_calling": True,
|
| 45 |
-
"active_params": "3.6B"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
}
|
| 47 |
}
|
| 48 |
|
|
@@ -109,7 +129,7 @@ class AppConfig:
|
|
| 109 |
DEFAULT_REASONING_EFFORT = "medium" # low, medium, high
|
| 110 |
|
| 111 |
# UI Configuration
|
| 112 |
-
GRADIO_THEME = "
|
| 113 |
DEBUG_MODE = True
|
| 114 |
|
| 115 |
# MCP Server recommendations
|
|
@@ -132,12 +152,28 @@ class AppConfig:
|
|
| 132 |
available_models = []
|
| 133 |
|
| 134 |
for model_id, model_info in cls.AVAILABLE_MODELS.items():
|
| 135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
available_models.append(model_id)
|
| 137 |
-
|
|
|
|
| 138 |
available_models.append(model_id)
|
| 139 |
|
| 140 |
return available_models
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
|
| 142 |
@classmethod
|
| 143 |
def get_model_endpoint(cls, model_id: str, provider_id: str) -> str:
|
|
|
|
| 33 |
"context_length": 128000, # Full 128k context length
|
| 34 |
"supports_reasoning": True,
|
| 35 |
"supports_tool_calling": True,
|
| 36 |
+
"active_params": "5.1B",
|
| 37 |
+
"is_gpt_oss": True
|
| 38 |
},
|
| 39 |
"openai/gpt-oss-20b": {
|
| 40 |
"name": "GPT OSS 20B",
|
|
|
|
| 43 |
"context_length": 128000, # Full 128k context length
|
| 44 |
"supports_reasoning": True,
|
| 45 |
"supports_tool_calling": True,
|
| 46 |
+
"active_params": "3.6B",
|
| 47 |
+
"is_gpt_oss": True
|
| 48 |
+
},
|
| 49 |
+
"Qwen/Qwen3-VL-235B-A22B-Thinking": {
|
| 50 |
+
"name": "Qwen3-VL 235B A22B Thinking",
|
| 51 |
+
"description": "Vision-Language reasoning model (Qwen), strong multimodal understanding",
|
| 52 |
+
"size": "235B",
|
| 53 |
+
"context_length": 128000,
|
| 54 |
+
"supports_reasoning": True,
|
| 55 |
+
"supports_tool_calling": True,
|
| 56 |
+
"is_gpt_oss": False
|
| 57 |
+
},
|
| 58 |
+
"Qwen/Qwen3-VL-235B-A22B-Instruct": {
|
| 59 |
+
"name": "Qwen3-VL 235B A22B Instruct",
|
| 60 |
+
"description": "Vision-Language instruct-tuned model (Qwen)",
|
| 61 |
+
"size": "235B",
|
| 62 |
+
"context_length": 128000,
|
| 63 |
+
"supports_reasoning": True,
|
| 64 |
+
"supports_tool_calling": True,
|
| 65 |
+
"is_gpt_oss": False
|
| 66 |
}
|
| 67 |
}
|
| 68 |
|
|
|
|
| 129 |
DEFAULT_REASONING_EFFORT = "medium" # low, medium, high
|
| 130 |
|
| 131 |
# UI Configuration
|
| 132 |
+
GRADIO_THEME = "ocean"
|
| 133 |
DEBUG_MODE = True
|
| 134 |
|
| 135 |
# MCP Server recommendations
|
|
|
|
| 152 |
available_models = []
|
| 153 |
|
| 154 |
for model_id, model_info in cls.AVAILABLE_MODELS.items():
|
| 155 |
+
# If model declares explicit providers, honor that
|
| 156 |
+
if "providers" in model_info:
|
| 157 |
+
if provider_id in model_info["providers"]:
|
| 158 |
+
available_models.append(model_id)
|
| 159 |
+
continue
|
| 160 |
+
# Legacy gating by size for GPT-OSS entries
|
| 161 |
+
if model_info.get("size") == "120B" and provider.get("supports_120b"):
|
| 162 |
+
available_models.append(model_id)
|
| 163 |
+
elif model_info.get("size") == "20B" and provider.get("supports_20b"):
|
| 164 |
available_models.append(model_id)
|
| 165 |
+
else:
|
| 166 |
+
# Default: include other models unless explicitly incompatible
|
| 167 |
available_models.append(model_id)
|
| 168 |
|
| 169 |
return available_models
|
| 170 |
+
|
| 171 |
+
@classmethod
|
| 172 |
+
def is_gpt_oss_model(cls, model_id: str) -> bool:
|
| 173 |
+
info = cls.AVAILABLE_MODELS.get(model_id, {})
|
| 174 |
+
if info.get("is_gpt_oss"):
|
| 175 |
+
return True
|
| 176 |
+
return model_id.startswith("openai/gpt-oss-")
|
| 177 |
|
| 178 |
@classmethod
|
| 179 |
def get_model_endpoint(cls, model_id: str, provider_id: str) -> str:
|