Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/autoskillit/recipe/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def find_recipe_by_name(name: str, project_dir: Path) -> RecipeInfo | None:
"optional",
"skip_when_false",
"model",
"provider",
"description",
"sub_recipe",
"gate",
Expand Down Expand Up @@ -264,6 +265,7 @@ def _parse_step(data: dict[str, Any]) -> RecipeStep:
optional=bool(data.get("optional", False)),
skip_when_false=data.get("skip_when_false"),
model=data.get("model"),
provider=data.get("provider"),
description=data.get("description", ""),
sub_recipe=data.get("sub_recipe"),
gate=data.get("gate"),
Expand Down
1 change: 1 addition & 0 deletions src/autoskillit/recipe/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class RecipeStep:
optional: bool = False
skip_when_false: str | None = None
model: str | None = None
provider: str | None = None
description: str = ""
sub_recipe: str | None = None # Name of sub-recipe file (no extension)
gate: str | None = None # Ingredient name whose value controls lazy loading
Expand Down
3 changes: 3 additions & 0 deletions tests/execution/test_recording_sigterm.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ def test_sigterm_writes_scenario_json(tmp_path):
output_dir = tmp_path / "scenario"
output_dir.mkdir()

fake_home = tmp_path / "home"
fake_home.mkdir()
env = {
**os.environ,
"HOME": str(fake_home),
"RECORD_SCENARIO": "1",
"RECORD_SCENARIO_DIR": str(output_dir),
"RECORD_SCENARIO_RECIPE": "test-recipe",
Expand Down
8 changes: 8 additions & 0 deletions tests/recipe/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,14 @@ def test_parse_step_model_absent(self) -> None:
step = _parse_step({"tool": "run_skill"})
assert step.model is None

def test_parse_step_extracts_provider(self) -> None:
step = _parse_step({"tool": "run_skill", "provider": "anthropic"})
assert step.provider == "anthropic"

def test_parse_step_provider_absent(self) -> None:
step = _parse_step({"tool": "run_skill"})
assert step.provider is None

def test_parse_step_reads_stale_threshold(self) -> None:
data = {"tool": "run_skill", "stale_threshold": 2400, "on_success": "done"}
step = _parse_step(data)
Expand Down
Loading