Skip to content

Commit 153ed2f

Browse files
committed
add model to mini agent and eval context
1 parent 85c3822 commit 153ed2f

4 files changed

Lines changed: 14 additions & 4 deletions

File tree

src/bcbench/agent/mini/agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def parse_action(self, response: dict) -> dict:
5252
def run_mini_agent(
5353
entry: DatasetEntry,
5454
repo_path: Path,
55+
model: str,
5556
enable_bc_tools: bool = False,
5657
include_project_paths: bool = False,
5758
container_name: str | None = None,
@@ -84,7 +85,7 @@ def run_mini_agent(
8485
BCAgent = _create_bc_agent_class()
8586

8687
agent = BCAgent(
87-
LitellmModel(model_name="azure/gpt-4.1"),
88+
LitellmModel(model_name=model),
8889
BCEnvironment(
8990
container_name=container_name,
9091
repo_path=str(repo_path),

src/bcbench/commands/evaluate.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import shutil
44
from pathlib import Path
5+
from typing import Literal
56

67
import typer
78
from typing_extensions import Annotated
@@ -25,6 +26,7 @@ def evaluate_mini(
2526
container_name: ContainerName,
2627
username: ContainerUsername,
2728
password: ContainerPassword,
29+
model: Annotated[Literal["azure/gpt-4.1"], typer.Option(help="Azure AI Foundry Model to use for mini-bc-agent")] = "azure/gpt-4.1",
2830
dataset_path: DatasetPath = _config.paths.dataset_path,
2931
repo_path: RepoPath = _config.paths.nav_repo_path,
3032
output_dir: OutputDir = _config.paths.evaluation_results_path,
@@ -66,6 +68,7 @@ def evaluate_mini(
6668
container_name=container_name,
6769
username=username,
6870
password=password,
71+
model=model,
6972
agent_name="mini-bc-agent",
7073
agent_options={
7174
"enable_bc_tools": enable_bc_tools,
@@ -79,6 +82,7 @@ def evaluate_mini(
7982
lambda ctx: run_mini_agent(
8083
entry=ctx.entry,
8184
repo_path=ctx.repo_path,
85+
model=ctx.model,
8286
include_project_paths=include_project_paths,
8387
enable_bc_tools=ctx.get_agent_option("enable_bc_tools", False),
8488
container_name=ctx.container_name,
@@ -136,6 +140,7 @@ def evaluate_copilot(
136140
container_name=container_name,
137141
username=username,
138142
password=password,
143+
model=model,
139144
agent_name="GitHub Copilot CLI",
140145
)
141146

@@ -144,7 +149,7 @@ def evaluate_copilot(
144149
lambda ctx: run_copilot_agent(
145150
entry=ctx.entry,
146151
repo_path=ctx.repo_path,
147-
model=model,
152+
model=ctx.model,
148153
include_project_paths=include_project_paths,
149154
output_dir=ctx.result_dir,
150155
),

src/bcbench/commands/run.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""CLI commands for running agents."""
22

33
from pathlib import Path
4+
from typing import Literal
45

56
import typer
67
from typing_extensions import Annotated
@@ -33,6 +34,7 @@ def run_mini(
3334
container_name: ContainerName,
3435
username: ContainerUsername,
3536
password: ContainerPassword,
37+
model: Annotated[Literal["azure/gpt-4.1"], typer.Option(help="Azure AI Foundry Model to use for mini-bc-agent")] = "azure/gpt-4.1",
3638
dataset_path: DatasetPath = _config.paths.dataset_path,
3739
repo_path: RepoPath = _config.paths.nav_repo_path,
3840
enable_bc_tools: Annotated[
@@ -59,6 +61,7 @@ def run_mini(
5961
run_mini_agent(
6062
entry=entry,
6163
repo_path=repo_path,
64+
model=model,
6265
enable_bc_tools=enable_bc_tools,
6366
container_name=container_name,
6467
username=username,

src/bcbench/evaluate/evaluation_context.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ class EvaluationContext:
2727
# BC Container configuration
2828
container_name: str
2929
password: str
30-
username: str = "admin"
30+
username: str
3131

3232
# Agent metadata
33-
agent_name: str = "Agent"
33+
agent_name: str
34+
model: str
3435

3536
# Agent-specific options (stored as dict for flexibility)
3637
agent_options: dict[str, Any] | None = None

0 commit comments

Comments
 (0)