Skip to content

Commit cd30b65

Browse files
committed
feat(collector): add support model name without /
Openrouter models use a vendor/model format. Other providers (e.g. Cerebras) do not. In that case with default to `other/model_name`.
1 parent 9f23461 commit cd30b65

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

src/balatrollm/collector.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
def _generate_run_dir(task: Task, base_dir: Path) -> Path:
1818
"""Generate unique run directory path."""
19-
assert re.match(r"^[a-z0-9.-]+/[a-z0-9:.-]+$", task.model), (
20-
f"Invalid vendor/model format: {task.model}"
21-
)
22-
vendor, model = task.model.split("/", 1)
19+
if "/" in task.model:
20+
vendor, model = task.model.split("/", 1)
21+
else:
22+
vendor, model = "other", task.model
2323
dir_name = "_".join(
2424
[
2525
datetime.now().strftime("%Y%m%d_%H%M%S_%f")[:-3],
@@ -152,7 +152,10 @@ def __init__(self, task: Task, base_dir: Path) -> None:
152152
self._calls_total = 0
153153

154154
# Write task with structured model for benchmark analysis
155-
vendor, model_name = task.model.split("/", 1)
155+
if "/" in task.model:
156+
vendor, model_name = task.model.split("/", 1)
157+
else:
158+
vendor, model_name = "other", task.model
156159
task_data = {
157160
"model": {"vendor": vendor, "name": model_name},
158161
"seed": task.seed,

0 commit comments

Comments
 (0)