forked from CodeClash-ai/CodeClash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.py
More file actions
62 lines (55 loc) · 2.08 KB
/
Copy pathutils.py
File metadata and controls
62 lines (55 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import matplotlib.font_manager as fm
from codeclash import REPO_DIR
MODEL_TO_DISPLAY_NAME = {
"anthropic/claude-sonnet-4-20250514": "Claude Sonnet 4",
"anthropic/claude-sonnet-4-5-20250929": "Claude Sonnet 4.5",
"x-ai/grok-code-fast-1": "Grok Code Fast",
"google/gemini-2.5-pro": "Gemini 2.5 Pro",
"openai/gpt-5": "GPT-5",
"openai/gpt-5-mini": "GPT-5 Mini",
"openai/o3": "o3",
"claude-sonnet-4-20250514": "Claude Sonnet 4",
"claude-sonnet-4-5-20250929": "Claude Sonnet 4.5",
"grok-code-fast-1": "Grok Code Fast",
"gemini-2.5-pro": "Gemini 2.5 Pro",
"gpt-5": "GPT-5",
"gpt-5-mini": "GPT-5 Mini",
"qwen3-coder-plus-2025-09-23": "Qwen3 Coder",
"dashscope/qwen3-coder-plus-2025-09-23": "Qwen3 Coder",
"o3": "o3",
}
def model_display_name(model: str) -> str:
label = MODEL_TO_DISPLAY_NAME.get(model, model)
tier_labels = {
"-default": " (Default)",
"-low": " (Low)",
"-medium": " (Medium)",
"-high": " (High)",
}
for suffix, pretty in tier_labels.items():
if model.endswith(suffix):
base = model[: -len(suffix)]
base_label = MODEL_TO_DISPLAY_NAME.get(base, base)
return f"{base_label}{pretty}"
return label
MODEL_TO_COLOR = {
"anthropic/claude-sonnet-4-20250514": "#FFD449",
"anthropic/claude-sonnet-4-5-20250929": "#F75C03",
"x-ai/grok-code-fast-1": "#031926",
"google/gemini-2.5-pro": "#d62728",
"openai/gpt-5": "#04A777",
"openai/gpt-5-mini": "#69DDFF",
"openai/o3": "#5E7CE2",
"claude-sonnet-4-20250514": "#7D3B15",
"claude-sonnet-4-5-20250929": "#F75C03",
"grok-code-fast-1": "#031926",
"gemini-2.5-pro": "#d62728",
"gpt-5": "#04A777",
"gpt-5-mini": "#69DDFF",
"qwen3-coder-plus-2025-09-23": "#852aec",
"o3": "#5E7CE2",
}
ASSETS_DIR = REPO_DIR / "docs" / "visualization"
FONT_REG = fm.FontProperties(fname=ASSETS_DIR / "texgyrepagella-regular.otf")
FONT_BOLD = fm.FontProperties(fname=ASSETS_DIR / "texgyrepagella-bold.otf")
MARKERS = ["o", "s", "^", "v", "D", "p", "*", "h", "H", "+", "x", "<", ">", "d"]