Multi-tier framework for evaluating AI agent skills and plugins with quality gates, security scanning, harness compatibility checks, semantic overlap detection, synthetic evaluation dataset generation, and live agent evaluation that measures how skills affect agent behavior. Ships reusable CI templates that bring every check to any repository.
Python agent-evaluationagent-pluginsagent-securityagent-skillsagentic-aibenchmarkci-templatesclaude-codecodexevaluateevaluationharnesspluginplugin-evaluationsecurity-scannerskill-evalskill-evaluationskill-evaluatorskill-gap-analysisskills
Fix Windows subprocess decoding, reasoning-model token budget, and harbor bin resolution (#194)
Narendran Raghavan8cd6555d4af0
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 6f2edd4d..b6246e1f 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -121,7 +121,8 @@ jobs:name: HTML parser compatibility (Python ${{ matrix.python-version }})needs: classify-changesif: ${{ !cancelled() && needs.classify-changes.outputs.docs_only != 'true' }}- runs-on: ubuntu-latest+ # These older Python patch releases have setup-python builds for Ubuntu 24.04.+ runs-on: ubuntu-24.04strategy:fail-fast: falsematrix:diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 42e3773b..9530474a 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -305,6 +305,19 @@ All notable changes to SkillEvaluator are documented in this file.budget and judge time-budget variables, and the Harbor process environment.The CLI reference adds `validate --workers`, the full `--env-mode` list, andthe exit codes the CLI actually returns (`0`, `1`, `2`).+- External scanners no longer crash the scan when they print bytes that the+ selected text codec cannot decode (for example a Windows traceback with a+ CJK path). Those bytes are replaced, so the captured output is never `None`,+ and valid output keeps the selected codec and universal-newline handling.+- The Tier 1 LLM rubric gives reasoning models (DeepSeek R and V4, OpenAI o1,+ o3, o4 and GPT-5 families, and models named "reasoning") a 32,768-token+ budget instead of the default 16,384, giving hidden reasoning more room+ before the rubric JSON is emitted. The budget follows the model each request+ resolves to, is capped at 16,384 on the Anthropic provider, and an explicit `max_tokens`+ overrides this default, subject to provider and model limits.+- `doctor --env-mode docker` and Tier 3 runs on Windows now find the Harbor+ CLI installed next to the active interpreter as `harbor.exe` or+ `harbor.cmd`, instead of reporting "harbor CLI not found".- `BENCHMARK.md` publication verdicts now require completed Tier 1 and Tier 2execution evidence by default (Tier 1 must cover every default check thatapplies to the content type, so a run narrowed with `--checks` cannotdiff --git a/src/skillevaluator/constants.py b/src/skillevaluator/constants.pyindex cd17bae6..7a14d9a0 100644--- a/src/skillevaluator/constants.py+++ b/src/skillevaluator/constants.py@@ -410,9 +410,12 @@ RUBRIC_MIN_SCORE = 60RUBRIC_REASONING_EFFORT = "medium"# Reasoning models spend the completion budget on hidden reasoning before any-# visible content, so a 4096-token cap truncates the JSON mid-object (measured:-# reasoning_tokens=4000, text_tokens=0). Raise the cap for known reasoning-# families; SKILL_EVAL_LLM_MAX_TOKENS still overrides it explicitly.+# visible content, so a small cap truncates the JSON mid-object (measured at+# 4096: reasoning_tokens=4000, text_tokens=0). Raise the cap for known reasoning+# families, matched against the resolved model of each request (16384 on the+# anthropic provider). An explicit max_tokens argument to RubricJudge+# overrides this default, subject to provider and model limits; there is no+# environment-variable override.RUBRIC_REASONING_MODEL_MARKERS = ("deepseek-r","deepseek-v4",diff --git a/src/skillevaluator/inference/client.py b/src/skillevaluator/inference/client.pyindex 48bbff6a..32b68301 100644--- a/src/skillevaluator/inference/client.py+++ b/src/skillevaluator/inference/client.py@@ -123,6 +123,12 @@ def _token_limit_kwargs(config: ProviderConfig, max_tokens: int | None) -> dict[return {"max_tokens": max_tokens}+# The Anthropic SDK refuses a non-streaming request above 21,333 output tokens+# (its estimate exceeds 10 minutes) before sending it, so a raised reasoning+# budget is capped on that transport.+_ANTHROPIC_NONSTREAMING_MAX_TOKENS = 16384++def _anthropic_max_tokens(model: str, max_tokens: int) -> int:"""Clamp ``max_tokens`` to the Anthropic SDK's per-model non-streaming limit.@@ -351,11 +357,17 @@ class LLMClient:``__init__``, and set ``response_schema`` to request structured outputfrom :meth:`process`. A subclass whose :meth:`parse_response` keeps thecomplete entries of a cut-off reply sets ``salvage_truncated_response``.+ A subclass that sets ``reasoning_max_tokens`` gets that larger default+ budget for each request whose resolved model matches one of its+ ``reasoning_model_markers``; an explicit ``max_tokens`` skips that default+ adjustment, subject to provider and model limits."""default_model: str | None = Nonedefault_max_tokens: int | None = Nonedefault_temperature: float | None = LLM_VERIFY_TEMPERATURE+ reasoning_max_tokens: int | None = None+ reasoning_model_markers: tuple[str, ...] = ()default_reasoning_effort: str | None = Noneresponse_schema: dict[str, Any] | None = Noneschema_name: str = "judge_response"@@ -379,6 +391,7 @@ class LLMClient:self._base_url = base_urlself._api_key = api_keyself._max_tokens = max_tokens if max_tokens is not None else self.default_max_tokens+ self._max_tokens_explicit = max_tokens is not Noneself._temperature = temperature if temperature is not None else self.default_temperatureself._reasoning_effort = reasoning_effort if reasoning_effort is not None else self.default_reasoning_effortretry_cfg = resolve_retry_config()@@ -460,6 +473,25 @@ class LLMClient:self._provider_config = configreturn config+ def _request_max_tokens(self, config: ProviderConfig) -> int | None:+ """Return the output-token budget for a request to the resolved target.++ An explicit ``max_tokens`` skips this default adjustment. Provider and+ model limits still apply. Otherwise a subclass that sets+ ``reasoning_max_tokens`` gets that budget when the resolved model+ matches one of its ``reasoning_model_markers``, capped on the+ Anthropic transport.+ """+ if self.reasoning_max_tokens is None or self._max_tokens_explicit:+ return self._max_tokens+ model = config.model.lower()+ if not any(marker in model for marker in self.reasoning_model_markers):+ return self._max_tokens+ budget = max(self._max_tokens or 0, self.reasoning_max_tokens)+ if config.provider == "anthropic":+ return min(budget, _ANTHROPIC_NONSTREAMING_MAX_TOKENS)+ return budget+def _get_client(self) -> Any:"""Lazily construct the SDK client for the selected provider."""if self._client is not None:@@ -533,6 +565,7 @@ class LLMClient:config = self._resolved_config()client = self._get_client()target_key = SchemaTargetKey(config.provider, config.base_url or "", config.model)+ max_tokens = self._request_max_tokens(config)reasoning_effort = self.reasoning_effortdef _invoke_provider() -> str:@@ -542,7 +575,7 @@ class LLMClient:def _anthropic_kwargs(include_schema: bool) -> dict[str, Any]:call_kwargs: dict[str, Any] = {"model": config.model,- "max_tokens": _anthropic_max_tokens(config.model, self._max_tokens or MAX_COMPLETION_TOKENS),+ "max_tokens": _anthropic_max_tokens(config.model, max_tokens or MAX_COMPLETION_TOKENS),"system": system_prompt,"messages": [{"role": "user", "content": user_prompt}],**_temperature_kwargs(config.model, self._temperature),@@ -586,7 +619,7 @@ class LLMClient:],aws_region_name=config.region,**_temperature_kwargs(config.model, self._temperature),- **({"max_tokens": self._max_tokens} if self._max_tokens is not None else {}),+ **({"max_tokens": max_tokens} if max_tokens is not None else {}),)return _extract_choice_content(response)@@ -599,7 +632,7 @@ class LLMClient:{"role": "user", "content": user_prompt},],**_temperature_kwargs(config.model, self._temperature),- **_token_limit_kwargs(config, self._max_tokens),+ **_token_limit_kwargs(config, max_tokens),**({"reasoning_effort": reasoning_effort} if reasoning_effort is not None else {}),}if include_schema and response_schema is not None:diff --git a/src/skillevaluator/utils/tool_runner.py b/src/skillevaluator/utils/tool_runner.pyindex e643cb34..5abc4f86 100644--- a/src/skillevaluator/utils/tool_runner.py+++ b/src/skillevaluator/utils/tool_runner.py@@ -227,15 +227,17 @@ class ExternalTool:try:child_env = dict(env or {}) if replace_env else ({**os.environ, **env} if env else None)- # text=True decodes strictly with the locale codec, so a child that- # emits non-UTF-8 bytes (a Windows traceback with a CJK path, for- # example) raises UnicodeDecodeError in the reader thread and leaves- # proc.stdout/stderr unset -> None. Capture bytes and decode- # tolerantly so a scanner's diagnostic output can never turn into an- # AttributeError in the caller.+ # Text mode decodes with Python's selected codec (the locale codec,+ # or UTF-8 in UTF-8 mode), which is what Python scanners write. A+ # strict decode of bytes outside that codec (a Windows traceback+ # with a CJK path, for example) raises UnicodeDecodeError in the+ # reader thread and leaves proc.stdout/stderr as None, so replace+ # undecodable bytes instead of failing.proc = subprocess.run(cmd,capture_output=True,+ text=True,+ errors="replace",timeout=timeout,cwd=cwd,env=child_env,diff --git a/src/skillevaluator/validators/rubric_eval.py b/src/skillevaluator/validators/rubric_eval.pyindex 7c2689b7..945f1075 100644--- a/src/skillevaluator/validators/rubric_eval.py+++ b/src/skillevaluator/validators/rubric_eval.py@@ -27,6 +27,7 @@ from skillevaluator.constants import (RUBRIC_CRITERIA,RUBRIC_MAX_TOKENS,RUBRIC_MIN_SCORE,+ RUBRIC_REASONING_EFFORT,RUBRIC_REASONING_MAX_TOKENS,RUBRIC_REASONING_MODEL_MARKERS,)@@ -223,31 +224,16 @@ class RubricJudge(LLMClient):"""LLM judge that scores a skill against qualitative criteria."""default_max_tokens: int | None = RUBRIC_MAX_TOKENS+ # A reasoning model burns the whole completion budget on hidden reasoning+ # before emitting visible JSON, so the default cap truncates the answer+ # mid-object. LLMClient raises the budget per request when the resolved+ # model is in one of these families, unless max_tokens was explicit.+ reasoning_max_tokens: int | None = RUBRIC_REASONING_MAX_TOKENS+ reasoning_model_markers: tuple[str, ...] = RUBRIC_REASONING_MODEL_MARKERSdefault_reasoning_effort: str | None = RUBRIC_REASONING_EFFORTresponse_schema: dict[str, Any] | None = RUBRIC_JSON_SCHEMAschema_name: str = "rubric_evaluation"- @staticmethod- def _resolved_model_name() -> str:- """Best-effort model name from the environment, ignoring config errors."""- try:- from skillevaluator.provider_config import resolve_llm_provider-- return resolve_llm_provider().model- except Exception:- return ""-- def __init__(self, *args: Any, **kwargs: Any) -> None:- # A reasoning model burns the whole completion budget on hidden- # reasoning before emitting visible JSON, so the default cap truncates- # the answer mid-object. Raise it for those families unless the caller- # passed an explicit max_tokens.- if kwargs.get("max_tokens") is None:- model = (kwargs.get("model") or self._resolved_model_name() or "").lower()- if any(marker in model for marker in RUBRIC_REASONING_MODEL_MARKERS):- kwargs["max_tokens"] = RUBRIC_REASONING_MAX_TOKENS- super().__init__(*args, **kwargs)-_SYSTEM_PROMPT = ("You are evaluating an AI Agent Skill documentation file (SKILL.md).\n""Score each criterion 0-10 (0=fails completely, 10=exceeds expectations).\n\n"diff --git a/tests/test_ci_workflows.py b/tests/test_ci_workflows.pyindex 5b610a97..1926bfb5 100644--- a/tests/test_ci_workflows.py+++ b/tests/test_ci_workflows.py@@ -182,6 +182,16 @@ def test_full_lane_keeps_the_existing_commands_and_runners() -> None:assert "twine==6.2.0" in _runs(jobs["package"])+def test_html_parser_compatibility_keeps_old_python_versions_on_a_supported_runner() -> None:+ job = _load("ci.yml")["jobs"]["html-parser-compatibility"]++ # setup-python publishes these older patch builds for Ubuntu 24.04, not 26.04.+ assert job["runs-on"] == "ubuntu-24.04"+ assert job["strategy"]["matrix"]["python-version"] == ["3.12.11", "3.13.5"]+ python_step = next(step for step in job["steps"] if _action_repository(step.get("uses", "")) == "actions/setup-python")+ assert python_step["with"]["python-version"] == "${{ matrix.python-version }}"++def test_security_keeps_gitleaks_always_on_and_skips_only_nonessential_jobs() -> None:security = _load("security.yml")jobs = security["jobs"]diff --git a/tests/utils/test_tool_runner.py b/tests/utils/test_tool_runner.pyindex f602a5fa..6cd84704 100644--- a/tests/utils/test_tool_runner.py+++ b/tests/utils/test_tool_runner.py@@ -7,6 +7,7 @@ Tests ExternalTool, parse_json_output, create_temp_config, cvss_to_severity,and Tools registry with mocked subprocess and filesystem where appropriate."""+import localeimport osimport sysfrom pathlib import Path@@ -304,39 +305,63 @@ class TestExternalTool:assert result.stderr == "still working"assert "timed out" in (result.error_message or "")- def test_run_decodes_non_utf8_output_tolerantly(self):- """A child emitting non-UTF-8 bytes must not lose its captured streams.+ @staticmethod+ def _python_child(monkeypatch: pytest.MonkeyPatch, codec: str, stdout: bytes, stderr: bytes) -> ToolResult:+ """Run a real Python child that writes raw bytes, with ``codec`` as the selected text codec."""+ if sys.flags.utf8_mode and codec != "utf-8":+ pytest.skip("UTF-8 mode fixes the subprocess text codec to UTF-8")+ monkeypatch.setattr(locale, "getencoding", lambda: codec)+ monkeypatch.setenv("SKILLEVAL_TEST_PYTHON", sys.executable)+ code = (+ "import sys;"+ f"sys.stdout.buffer.write(bytes.fromhex('{stdout.hex()}'));"+ f"sys.stderr.buffer.write(bytes.fromhex('{stderr.hex()}'))"+ )+ tool = ExternalTool("Python", "python", override_env="SKILLEVAL_TEST_PYTHON")+ return tool.run(["-I", "-c", code], log_command=False)++ def test_run_decodes_non_utf8_output_tolerantly(self, monkeypatch: pytest.MonkeyPatch):+ """A child emitting bytes outside the selected codec must not lose its captured streams.- ``text=True`` decodes strictly, so a Windows child printing a traceback- with a non-ASCII path raises UnicodeDecodeError inside subprocess's- reader thread and leaves ``proc.stdout``/``proc.stderr`` unset (None).- Callers such as the SkillSpector wrapper then crash on ``stderr.casefold()``- instead of reading the scanner's diagnostics.+ A strict decode raises UnicodeDecodeError inside subprocess (in the+ reader thread on Windows, leaving ``proc.stdout``/``proc.stderr`` as+ None). Callers such as the SkillSpector wrapper then crash on+ ``stderr.casefold()`` instead of reading the scanner's diagnostics."""- undecodable = b"WARNING path \xa1 not utf-8\n"- mock_proc = CompletedProcess(args=["scanner"], returncode=0, stdout=b'{"ok": true}', stderr=undecodable)- with (- patch("shutil.which", return_value="/usr/bin/scanner"),- patch("skillevaluator.utils.tool_runner.subprocess.run", return_value=mock_proc),- ):- result = ExternalTool("Scanner", "scanner").run([], log_command=False)+ result = self._python_child(+ monkeypatch, "utf-8", stdout=b'{"ok": true}', stderr=b"WARNING path \xa1 not utf-8\r\n"+ )assert result.success is Trueassert result.exit_code == 0- assert result.stderr is not None, "stderr must never be None on a successful run"- assert "WARNING path" in result.stderrassert result.stdout == '{"ok": true}'+ assert result.stderr == "WARNING path � not utf-8\n"++ def test_run_keeps_the_selected_text_codec(self, monkeypatch: pytest.MonkeyPatch):+ """Output in the parent's selected codec (a non-UTF-8 locale) keeps its non-ASCII paths."""+ path = "café/中文.py"+ result = self._python_child(+ monkeypatch,+ "gb18030",+ stdout=f'{{"file": "{path}"}}'.encode("gb18030"),+ stderr=f"warning: {path}\n".encode("gb18030"),+ )- def test_run_captures_bytes_without_text_mode(self):- """subprocess.run is invoked without text=True so decoding is our own."""- mock_proc = CompletedProcess(args=["scanner"], returncode=0, stdout=b"out", stderr=b"err")+ assert result.stdout == f'{{"file": "{path}"}}'+ assert result.stderr == f"warning: {path}\n"++ def test_run_decodes_text_with_replacement(self):+ """subprocess.run keeps text mode but replaces undecodable bytes."""+ mock_proc = CompletedProcess(args=["scanner"], returncode=0, stdout="out", stderr="err")with (patch("shutil.which", return_value="/usr/bin/scanner"),patch("skillevaluator.utils.tool_runner.subprocess.run", return_value=mock_proc) as mock_run,):- ExternalTool("Scanner", "scanner").run([], log_command=False)+ result = ExternalTool("Scanner", "scanner").run([], log_command=False)- assert mock_run.call_args.kwargs.get("text") is not True+ assert mock_run.call_args.kwargs.get("text") is True+ assert mock_run.call_args.kwargs.get("errors") == "replace"+ assert (result.stdout, result.stderr) == ("out", "err")def test_run_merges_extra_env_over_ambient(self):"""env additions are merged onto os.environ, not substituted for it."""diff --git a/tests/validators/test_rubric_eval.py b/tests/validators/test_rubric_eval.pyindex 6ab96d53..201db03e 100644--- a/tests/validators/test_rubric_eval.py+++ b/tests/validators/test_rubric_eval.py@@ -6,7 +6,7 @@import jsonimport osfrom pathlib import Path-from unittest.mock import patch+from unittest.mock import MagicMock, patchimport pytest@@ -114,26 +114,113 @@ class TestRubricJudge:result = judge.parse_response('{"score": 80, "overall_pass": true, "checks": []}')assert result["score"] == 80- def test_reasoning_model_gets_a_larger_token_budget(self):++class TestRubricJudgeTokenBudget:+ """The reasoning budget follows the model each request actually targets."""++ @staticmethod+ def _gateway_env(monkeypatch: pytest.MonkeyPatch, model: str) -> None:+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "openai-compatible")+ monkeypatch.setenv("SKILL_EVAL_LLM_API_KEY", "test-key")+ monkeypatch.setenv("SKILL_EVAL_LLM_BASE_URL", "https://gateway.example.com/v1")+ monkeypatch.setenv("SKILL_EVAL_LLM_MODEL", model)++ @staticmethod+ def _openai_request(judge: RubricJudge) -> dict:+ mock_openai = MagicMock()+ mock_openai.chat.completions.create.return_value.choices = [MagicMock(message=MagicMock(content="{}"))]+ with patch("openai.OpenAI", return_value=mock_openai):+ judge.completions("system", "user")+ return mock_openai.chat.completions.create.call_args.kwargs++ def test_reasoning_model_gets_a_larger_token_budget(self, monkeypatch: pytest.MonkeyPatch):"""Reasoning models spend the completion budget before emitting content.Measured on deepseek/deepseek-v4.1-flash with a 4096-token cap:``reasoning_tokens=4000, text_tokens=0`` and ``finish_reason=length``,so the rubric JSON was truncated mid-object and never parsed."""- judge = RubricJudge(model="deepseek/deepseek-v4.1-flash")- assert judge._max_tokens == RUBRIC_REASONING_MAX_TOKENS- assert judge._max_tokens > RUBRIC_MAX_TOKENS+ self._gateway_env(monkeypatch, "deepseek/deepseek-v4.1-flash")+ request = self._openai_request(RubricJudge())+ assert request["max_tokens"] == RUBRIC_REASONING_MAX_TOKENS+ assert request["max_tokens"] > RUBRIC_MAX_TOKENS- def test_standard_model_keeps_default_token_budget(self):+ def test_standard_model_keeps_default_token_budget(self, monkeypatch: pytest.MonkeyPatch):"""Non-reasoning models must not pay the larger budget's latency."""- judge = RubricJudge(model="gpt-4o")- assert judge._max_tokens == RUBRIC_MAX_TOKENS+ self._gateway_env(monkeypatch, "gpt-4o")+ assert self._openai_request(RubricJudge())["max_tokens"] == RUBRIC_MAX_TOKENS- def test_explicit_token_override_is_preserved(self):+ def test_explicit_token_override_is_preserved(self, monkeypatch: pytest.MonkeyPatch):"""An explicit max_tokens always wins over the reasoning-model default."""- judge = RubricJudge(model="deepseek/deepseek-v4.1-flash", max_tokens=1234)- assert judge._max_tokens == 1234+ self._gateway_env(monkeypatch, "deepseek/deepseek-v4.1-flash")+ assert self._openai_request(RubricJudge(max_tokens=1234))["max_tokens"] == 1234++ def test_positional_model_overrides_environment_model(self, monkeypatch: pytest.MonkeyPatch):+ """A positional model is the target, so the environment model must not pick the budget."""+ self._gateway_env(monkeypatch, "deepseek/deepseek-v4.1-flash")+ request = self._openai_request(RubricJudge("gpt-4o"))+ assert request["model"] == "gpt-4o"+ assert request["max_tokens"] == RUBRIC_MAX_TOKENS++ def test_explicit_endpoint_uses_its_own_model(self, monkeypatch: pytest.MonkeyPatch):+ """An explicit endpoint targets the class default model, not SKILL_EVAL_LLM_MODEL."""+ self._gateway_env(monkeypatch, "o3")+ judge = RubricJudge(api_key="test-key", base_url="https://gateway.example.com/v1")+ request = self._openai_request(judge)+ assert request["model"] == judge._resolved_config().model != "o3"+ assert request["max_tokens"] == RUBRIC_MAX_TOKENS++ def test_provider_configured_after_construction(self, monkeypatch: pytest.MonkeyPatch):+ """The budget is chosen per request, after the provider is configured."""+ for name in (+ "SKILL_EVAL_LLM_PROVIDER",+ "SKILL_EVAL_LLM_MODEL",+ "OPENAI_API_KEY",+ "NVIDIA_API_KEY",+ "ANTHROPIC_API_KEY",+ ):+ monkeypatch.delenv(name, raising=False)+ judge = RubricJudge()+ self._gateway_env(monkeypatch, "deepseek/deepseek-v4.1-flash")+ assert self._openai_request(judge)["max_tokens"] == RUBRIC_REASONING_MAX_TOKENS++ def test_anthropic_reasoning_budget_is_sent_without_streaming(self, monkeypatch: pytest.MonkeyPatch):+ """The Anthropic SDK refuses non-streaming requests above 21,333 output tokens.++ A raised budget on that transport must stay under the limit, or the SDK+ raises before sending and the judge reports itself unavailable.+ """+ pytest.importorskip("anthropic")+ httpx = pytest.importorskip("httpx")+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "anthropic")+ monkeypatch.setenv("ANTHROPIC_API_KEY", "test-key")+ monkeypatch.setenv("ANTHROPIC_BASE_URL", "https://gateway.example.com")+ monkeypatch.delenv("SKILL_EVAL_LLM_BASE_URL", raising=False)+ monkeypatch.setenv("SKILL_EVAL_LLM_MODEL", "deepseek-reasoner")+ requests: list[dict] = []++ def handler(request):+ requests.append(json.loads(request.content))+ return httpx.Response(+ 200,+ json={+ "id": "msg_test",+ "type": "message",+ "role": "assistant",+ "model": "deepseek-reasoner",+ "content": [{"type": "text", "text": "{}"}],+ "stop_reason": "end_turn",+ "stop_sequence": None,+ "usage": {"input_tokens": 1, "output_tokens": 1},+ },+ )++ with httpx.Client(transport=httpx.MockTransport(handler)) as http_client:+ content = RubricJudge(http_client=http_client).completions("system", "user")++ assert content == "{}"+ assert len(requests) == 1+ assert RUBRIC_MAX_TOKENS <= requests[0]["max_tokens"] <= 21333class TestCollectSupplementaryContent: