python-yama 0.10.2__py3-none-any.whl → 0.10.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: python-yama
3
- Version: 0.10.2
3
+ Version: 0.10.4
4
4
  Summary: A reproducible evaluation runner for tool-using Agent skills
5
5
  Project-URL: Repository, https://github.com/world-sim-dev/yama
6
6
  Project-URL: Issues, https://github.com/world-sim-dev/yama/issues
@@ -46,7 +46,27 @@ Instead of prefixing every command, you can put credentials in a `.env` file: on
46
46
 
47
47
  ### Judge routing
48
48
 
49
- Evaluated Agent calls always use the configured OpenAI-compatible API. In an ordinary non-CI run, an LLM Judge instead prefers a local agent selected from its resolved `judge.model.name`: OpenAI/GPT/o-family names use Codex, and Claude/Anthropic names use Claude Code; all other names use the API. Any local failure (including a missing command) emits one sanitized warning on stderr so `--json` stdout remains valid JSON and retries the API with the original, complete model object. CI and `pr-run` are API-only. Local agents receive the model name and a compatible `reasoning_effort`, but never temperature, credentials, or endpoint settings.
49
+ Evaluated Agent calls always use the configured OpenAI-compatible API. In an ordinary non-CI run, Judge routing recognizes OpenAI/GPT/o-family names as Codex, Claude/Anthropic names as Claude Code, and Grok/xAI names as Cursor. An exact per-agent map may translate an API model name to a local CLI model slug. Without a mapping, every recognized family first passes the original Judge model name to its local Agent. If any local attempt that explicitly names a model fails, Yama retries the same Agent with its default model; if that default attempt also fails, Yama calls the original Judge API. Other families become local-first only through an exact mapping. This local-first chain never enters the fallback Agent.
50
+
51
+ ```toml
52
+ [defaults.judge.local.models.codex]
53
+ "openai/gpt-5.4" = "gpt-5.4-high"
54
+
55
+ [defaults.judge.local.models.claude]
56
+ "anthropic/claude-opus-4.1" = "claude-opus-4-1"
57
+
58
+ [defaults.judge.local.models.cursor]
59
+ "x-ai/grok-4" = "grok-4-fast"
60
+ "kimi.k3" = "kimi-k3"
61
+
62
+ [defaults.judge.local.agent]
63
+ name = "claude" # "claude", "codex", or "cursor"
64
+ model = "claude-sonnet-4-5"
65
+ ```
66
+
67
+ An unmapped, unrecognized model is API-first. Only after its original API exhausts retryable failures may `[defaults.judge.local.agent]` run as the terminal fallback: configured local model, then the same Agent's default whenever that named-model attempt fails, then end. There is no fallback-model API call. External cancellation always stops the chain immediately. The HTML report shows the complete Judge attempt chain, including mapped/configured/default/fallback source, retries, failures, and the effective local model when the Agent reports it.
68
+
69
+ CI and `pr-run` are API-only. Local agents receive the mapped model slug or original Judge model name and a compatible `reasoning_effort`, but never temperature, credentials, or endpoint settings. Cursor Judge passes `--trust` only for its per-attempt empty temporary workspace so non-interactive execution cannot stop at Workspace Trust; it still omits `--force`/`--yolo`, and Yama does not edit Cursor's global trust configuration. Evaluated Agent API attempts default to a 180-second transport timeout; Judge API attempts and local Judge processes default to 120 seconds. The whole-Step timeout remains independently configured by `execution.timeout_seconds_per_step` (default 300 seconds).
50
70
 
51
71
  ## Writing a Case
52
72
 
@@ -1,21 +1,22 @@
1
1
  yama/__init__.py,sha256=UYhoZTSu1HiMT54LOZCdvLKMQ_L0qec8RT8jDfde_cY,1156
2
2
  yama/__main__.py,sha256=k1ocEWawweo1qCJWNFAAvyxz3tcY13dzvCenHszij30,48
3
3
  yama/assertions.py,sha256=FI6a6YNPkzQKGCuQhRuttLGTEGtdrFOxAy397X_PkO4,29421
4
- yama/cli.py,sha256=hr-loQ7BBvv-huiG_NlHh_kqPvBFZ3AYBjCdEdP3joE,49209
4
+ yama/cli.py,sha256=Ryx_rDeEUKjM_4XzrbXWek-oXDEFFrLluxVScdNK8jo,49877
5
5
  yama/dashboard.py,sha256=0yxRh-j_5Mk6Ug_xgv9-VyBSEr1aVKxX-zJwxGfd_TU,11601
6
- yama/judge_llm.py,sha256=pTvW_dhlroslpjfbXNExQkx28S1-Pq2ibhP2NMvMNLg,19365
7
- yama/llm.py,sha256=R4rbiJ0dYTUIRAKdOPn5bFGUhPdA38T93zndoNPhTIM,17561
6
+ yama/judge_llm.py,sha256=GpSXGvhZebqZKNSk2gomQr1qhaDv6rXjGk5xs2eUPDE,31931
7
+ yama/judge_routing.py,sha256=kAUERrN8fx1w7j99YHW08GNGf5HaYV0az4uzdr8iIVo,4256
8
+ yama/llm.py,sha256=AMpDV7ZuyHJ3h54tVYSQ5y-DAJjpOPMaYa1bYgrzrRo,17680
8
9
  yama/mocks.py,sha256=YyiU6Y7NgttxHYJBsqGPILKYlTsM4IMTIilMNRkUuzs,14973
9
- yama/models.py,sha256=Wlp0ewQY2wtje0FKv7Ztf_N_HZfvBXVNiA_Bbl9pF14,4235
10
- yama/openai_llm.py,sha256=e25rMSnEgcUTgtoI545fFlJWe1q6E8tovlvaUMM8l_Q,10019
10
+ yama/models.py,sha256=GhcnhyO7Q8jwycDxYzVW2h_0mPt4Y7YKoYPDwa6UP4U,4361
11
+ yama/openai_llm.py,sha256=gVpgRI3yyG-z1uSD94loXDwf1nGGSah7kFYuQGAYaVk,10781
11
12
  yama/pr.py,sha256=ao27i5T5V0I16FFN3A7tX0dGvctc8Zqj2YhufX7isdI,11762
12
13
  yama/preview.py,sha256=bySdea1fuXdlhFXWEaoD7TiOu3teml87ONKThZZg3K4,14345
13
- yama/report.py,sha256=Jg52yrlM0mCW0rq2c7UlH_fzah15IU5SfMIlSk8bhRQ,81221
14
+ yama/report.py,sha256=QmWlSzUunW_FZ6rX9UOj23v7_I5jUkrZhj5yDYIn_Ew,85912
14
15
  yama/report_bundle.py,sha256=s50m_uRK0MZ3Vp6IrR05sPcHJou8YOWBIvgmVINV5qQ,8830
15
16
  yama/report_upload.py,sha256=fURmKNue53JqGoEvAD47JnmJ3aKsedcvaPxquXVssGU,13026
16
- yama/runner.py,sha256=LwngJ-FaBpFuSy-stsC2n_n2KbNGoUXJ6HsXXCuuCC4,45070
17
- yama/thread_case.py,sha256=K0bpi8eToQn7q-cd7mW1BQuNWMxHcqnp9arDQDy14N4,17185
18
- yama/workspace.py,sha256=ncf4afdE-BuFVQdU19CBNkkoec2qrxZWnSXTPNGq0EE,4614
17
+ yama/runner.py,sha256=vwQ3MuE0gsUpVbwKBamuADSKmr2cTtcinSaSTqkOOBk,45771
18
+ yama/thread_case.py,sha256=DJ1UHC99J_CXtpzSMenWNZwnviTc3HfFoimhyAEvuY8,16140
19
+ yama/workspace.py,sha256=B6E6UrdCJNiyMb9dsIY5bKgETZAhv_T2tgCKOqrBx4I,6498
19
20
  yama/loaders/__init__.py,sha256=DIwfa8QlIlKt6NpFMZJ_OcqbJPPrmKLBzd9_e-BCuBs,174
20
21
  yama/loaders/case.py,sha256=SlMNPCrHLQzx4c6PqNJojjkagO8Q9Z4UR3EWnY3gbjE,13375
21
22
  yama/loaders/common.py,sha256=Fg71_vcnu5339QI_itvYPvRbk9LtBgEnzoA3t4Krb4U,754
@@ -29,8 +30,8 @@ yama/tools/bash/bash.py,sha256=dGKi2EvftnLs3CrJlbo4IYm6aicWrEnFzrXoH0vYqGw,10451
29
30
  yama/tools/bash/fs.py,sha256=gPsdiTomnURzv1mTq6qWDlCg9IZNU_r-sYYk3S3NODQ,23706
30
31
  yama/tools/skill/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
32
  yama/tools/skill/skill.py,sha256=DGabSzl2N01sQKxt8XVWa_pDmuwtHYXy-ODgiqErs2g,2724
32
- python_yama-0.10.2.dist-info/METADATA,sha256=D4J8-qcp_BSdg6vVxUfLf0O7LXbQOBZ6Dd2HRVuZUqU,10118
33
- python_yama-0.10.2.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
34
- python_yama-0.10.2.dist-info/entry_points.txt,sha256=N5se3y1FflUcDU3TmUrH2Tu9dzsrBBo7sUP-Gu_2cVs,39
35
- python_yama-0.10.2.dist-info/licenses/LICENSE,sha256=cMAJJAs7R1lemJPPc7qMNv4w_sqn5QncFf4aXKYyEc4,1067
36
- python_yama-0.10.2.dist-info/RECORD,,
33
+ python_yama-0.10.4.dist-info/METADATA,sha256=EEKFUYb95nVezqNVIMB9d8Mq_kD1x0eE_iEegwJRhrM,11805
34
+ python_yama-0.10.4.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
35
+ python_yama-0.10.4.dist-info/entry_points.txt,sha256=N5se3y1FflUcDU3TmUrH2Tu9dzsrBBo7sUP-Gu_2cVs,39
36
+ python_yama-0.10.4.dist-info/licenses/LICENSE,sha256=cMAJJAs7R1lemJPPc7qMNv4w_sqn5QncFf4aXKYyEc4,1067
37
+ python_yama-0.10.4.dist-info/RECORD,,
yama/cli.py CHANGED
@@ -753,12 +753,24 @@ def _create_runner(
753
753
  write_artifacts: bool,
754
754
  on_event: Any,
755
755
  force_api_judge: bool,
756
+ local_judge_agent: dict[str, str] | None,
757
+ local_judge_models: dict[str, dict[str, str]] | None,
756
758
  run_limiter: RunConcurrencyLimiter | None = None,
757
759
  ) -> YamaRunner:
758
760
  agent_api = OpenAICompatibleLLMClient()
759
- judge_api = OpenAICompatibleLLMClient()
761
+ judge_api = OpenAICompatibleLLMClient(
762
+ default_request_timeout_seconds=120.0,
763
+ )
760
764
  api_only = force_api_judge or is_ci_environment(os.environ)
761
- judge_llm = judge_api if api_only else LocalFirstJudgeLLMClient(judge_api)
765
+ judge_llm = (
766
+ judge_api
767
+ if api_only
768
+ else LocalFirstJudgeLLMClient(
769
+ judge_api,
770
+ fallback_agent=local_judge_agent,
771
+ model_maps=local_judge_models,
772
+ )
773
+ )
762
774
  runner = YamaRunner(
763
775
  agent_api,
764
776
  judge_llm=judge_llm,
@@ -826,6 +838,9 @@ async def _run(args: argparse.Namespace) -> int:
826
838
  )
827
839
  semaphore = asyncio.Semaphore(args.concurrency)
828
840
  run_limiter = RunConcurrencyLimiter(args.run_concurrency)
841
+ local_judge = workspace.defaults.get("judge", {}).get("local", {})
842
+ local_judge_agent = local_judge.get("agent")
843
+ local_judge_models = local_judge.get("models")
829
844
 
830
845
  async def run_one(case: Any, result_root: Path) -> Any:
831
846
  async with semaphore:
@@ -837,6 +852,8 @@ async def _run(args: argparse.Namespace) -> int:
837
852
  write_artifacts=not args.no_artifacts,
838
853
  on_event=progress,
839
854
  force_api_judge=False,
855
+ local_judge_agent=local_judge_agent,
856
+ local_judge_models=local_judge_models,
840
857
  run_limiter=run_limiter,
841
858
  )
842
859
  return await runner.run_case(case)
@@ -1065,6 +1082,8 @@ async def _run_pr_run(args: argparse.Namespace) -> int:
1065
1082
  write_artifacts=not args.no_artifacts,
1066
1083
  on_event=progress,
1067
1084
  force_api_judge=True,
1085
+ local_judge_agent=None,
1086
+ local_judge_models=None,
1068
1087
  run_limiter=run_limiter,
1069
1088
  )
1070
1089
  return await runner.run_case(case)