Skip to content

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.

chore: centralize frontier OpenAI/Anthropic chat defaults (#38)

Christopher Kevin1cec1016492f
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4b2e00d6..b2f162af 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,12 @@ All notable changes to SkillEvaluator are documented in this file.
### Changed
+- Updated public OpenAI / Anthropic / Bedrock chat defaults to pinned frontier
+ models (`gpt-5.6-sol`, `claude-opus-5`, `us.anthropic.claude-opus-5`),
+ centralized in `provider_config`, and documented `gpt-5.4-mini` as the
+ lower-cost OpenAI `SKILL_EVAL_LLM_MODEL` alternative. Raised
+ dimension/insights judge token budgets to 4096 and widened the gpt-5\*
+ temperature guard to bare model IDs.
- Added explicit `--block-on-dedup` / `--no-block-on-dedup` and
`--block-on-agent-eval` / `--no-block-on-agent-eval` controls with
backward-compatible defaults, Tier 3 source preflight, and consistent gating
diff --git a/README.md b/README.md
index 927de109..04d52502 100644
--- a/README.md
+++ b/README.md
@@ -83,6 +83,12 @@ Other supported provider setups are:
`SKILL_EVAL_LLM_BASE_URL`, `SKILL_EVAL_LLM_MODEL`, and
`SKILL_EVAL_LLM_API_KEY`.
+The pinned chat defaults are `gpt-5.6-sol` for OpenAI,
+`claude-opus-5` for Anthropic, and
+`us.anthropic.claude-opus-5` for Amazon Bedrock. Override any provider with
+`SKILL_EVAL_LLM_MODEL`; `gpt-5.4-mini` is the documented lower-cost OpenAI
+alternative.
+
When exactly one of `NVIDIA_API_KEY`, `OPENAI_API_KEY`, or `ANTHROPIC_API_KEY`
is present, SkillEvaluator can auto-select that provider. Anthropic and Bedrock
do not provide embeddings, so Tier 2 also needs a separate OpenAI, NVIDIA
diff --git a/docs/cli-reference.mdx b/docs/cli-reference.mdx
index 3e6e9da1..ffc0ed2f 100644
--- a/docs/cli-reference.mdx
+++ b/docs/cli-reference.mdx
@@ -314,7 +314,7 @@ The old top-level spelling `skillevaluator evaluate` still works for existing sc
| `--n-concurrent INTEGER` | unset | Concurrent eval cases per agent. |
| `--max-agents INTEGER` | unset | Maximum agents to run in parallel. |
| `--model TEXT` | unset | Global agent model override. |
-| `--agent-model TEXT` | unset | Per-agent model override, `AGENT=MODEL` (repeatable), e.g. `--agent-model codex=gpt-5.4-mini`. Accepts the `claude` alias for `claude-code`. |
+| `--agent-model TEXT` | unset | Per-agent model override, `AGENT=MODEL` (repeatable), e.g. `--agent-model codex=gpt-5.6-sol`. Accepts the `claude` alias for `claude-code`. |
| `--custom-dockerfile-mode [preserve\|rebase]` | unset | How a custom `evals/environment/Dockerfile` is applied: `rebase` (built-in default) swaps its `FROM` line onto the eval base image; `preserve` keeps your `FROM` and appends the eval dependencies. |
| `--skill-workspace-mode [isolated\|group]` | unset | `isolated` (built-in default) stages only the target skill in the agent workspace; `group` also stages the skills from `--include-skills` / `skill_workspace.include`. |
| `--include-skills PATH` | none | Additional skill(s) to mount into the eval environment (repeatable; paths must exist). Requires group workspace mode (`--skill-workspace-mode group` or `skill_workspace.mode: group` in `evals/config.yml`). |
@@ -329,7 +329,7 @@ The old top-level spelling `skillevaluator evaluate` still works for existing sc
| `--override-storage-mb INTEGER` | unset | Override eval-environment storage in MB (passed through to Harbor). |
| `--progress [auto\|rich\|plain\|off]` | `auto` | Progress display for the run: `rich` live view, `plain` line output, or `off`. |
-Without a `--model`/`--agent-model` override, each agent uses the selected provider's default model: `gpt-5.4-mini` on OpenAI, and Nemotron on the NVIDIA provider — `nvidia/nemotron-3-super-120b-a12b` for bridged agents, `nvidia/nemotron-3-nano-30b-a3b` for direct OpenCode.
+Without a `--model`/`--agent-model` override, each agent uses the selected provider's default model: `gpt-5.6-sol` on OpenAI, and Nemotron on the NVIDIA provider — `nvidia/nemotron-3-super-120b-a12b` for bridged agents, `nvidia/nemotron-3-nano-30b-a3b` for direct OpenCode.
Flags marked "unset" fall back to their matching keys in `evals/config.yml` where one exists, then to the built-in defaults. The exception is `--results-dir`, which resolves independently of `evals/config.yml`.
diff --git a/docs/configuration.mdx b/docs/configuration.mdx
index 10915964..44d30d4e 100644
--- a/docs/configuration.mdx
+++ b/docs/configuration.mdx
@@ -38,7 +38,7 @@ Set `SKILL_EVAL_LLM_PROVIDER` to one of `openai`, `anthropic`, `nv_build`, `bedr
export OPENAI_API_KEY='sk-...'
```
- Default model: `gpt-5.4-mini`, endpoint `https://api.openai.com/v1`. Override the endpoint with `SKILL_EVAL_LLM_BASE_URL` (takes precedence) or `OPENAI_BASE_URL` — but a base URL that is a non-canonical alias of the native OpenAI endpoint is rejected; use `https://api.openai.com/v1` verbatim. On the canonical endpoint, `gpt-5*` models automatically send `max_completion_tokens` instead of `max_tokens`.
+ Default model: `gpt-5.6-sol` (OpenAI GPT-5.6 Sol frontier). For a lower-cost override set `SKILL_EVAL_LLM_MODEL=gpt-5.4-mini`. Endpoint `https://api.openai.com/v1`. Override the endpoint with `SKILL_EVAL_LLM_BASE_URL` (takes precedence) or `OPENAI_BASE_URL` — but a base URL that is a non-canonical alias of the native OpenAI endpoint is rejected; use `https://api.openai.com/v1` verbatim. On the canonical endpoint, `gpt-5*` models automatically send `max_completion_tokens` instead of `max_tokens`.
</Tab>
<Tab title="Anthropic" language="anthropic">
```bash title="Anthropic setup"
@@ -46,7 +46,7 @@ Set `SKILL_EVAL_LLM_PROVIDER` to one of `openai`, `anthropic`, `nv_build`, `bedr
export ANTHROPIC_API_KEY='sk-ant-...'
```
- Default model: `claude-sonnet-4-5`, using the Anthropic SDK's default endpoint. Override with `SKILL_EVAL_LLM_BASE_URL` (takes precedence) or `ANTHROPIC_BASE_URL`.
+ Default model: `claude-opus-5`, using the Anthropic SDK's default endpoint. Override with `SKILL_EVAL_LLM_BASE_URL` (takes precedence) or `ANTHROPIC_BASE_URL`.
</Tab>
<Tab title="NVIDIA Build" language="nv_build">
```bash title="NVIDIA Build setup"
@@ -68,7 +68,7 @@ Set `SKILL_EVAL_LLM_PROVIDER` to one of `openai`, `anthropic`, `nv_build`, `bedr
# (environment variables, shared profile, or an assumed role).
```
- Default model: `us.anthropic.claude-sonnet-4-5-20250929-v1:0` on the AWS Bedrock Runtime.
+ Default model: `us.anthropic.claude-opus-5` on the AWS Bedrock Runtime (US geo inference profile for Claude Opus 5).
</Tab>
<Tab title="OpenAI-compatible" language="openai-compatible">
```bash title="OpenAI-compatible setup"
@@ -173,7 +173,7 @@ schema_version: 1
harbor:
agents:
codex:
- model: gpt-5.4-mini
+ model: gpt-5.6-sol
```
You can also supply that model at invocation time with `--agent-model codex=MODEL`. See [Tier 3: Live Evaluation](tier3-live-evaluation.mdx) for the full run workflow.
diff --git a/docs/environment-variables.mdx b/docs/environment-variables.mdx
index ed2f4a46..9d972b95 100644
--- a/docs/environment-variables.mdx
+++ b/docs/environment-variables.mdx
@@ -26,7 +26,7 @@ These variables select and configure the provider used for LLM-backed checks and
| Variable | Default | Effect |
| --- | --- | --- |
| `SKILL_EVAL_LLM_PROVIDER` | auto-selected (see below) | Provider for chat and judging: `openai`, `anthropic`, `nv_build`, `bedrock`, or `openai-compatible`. |
-| `SKILL_EVAL_LLM_MODEL` | provider default | Chat model override. Required for `openai-compatible` — that provider has no default. Setting it to an empty string is a configuration error. |
+| `SKILL_EVAL_LLM_MODEL` | OpenAI: `gpt-5.6-sol`; Anthropic: `claude-opus-5`; NVIDIA Build: `nvidia/nemotron-3-nano-30b-a3b`; Bedrock: `us.anthropic.claude-opus-5` | Chat model override. Required for `openai-compatible` — that provider has no default. Setting it to an empty string is a configuration error. For a lower-cost OpenAI option, use `gpt-5.4-mini`. |
| `SKILL_EVAL_LLM_BASE_URL` | provider default endpoint | Endpoint override; takes precedence over `OPENAI_BASE_URL` and `ANTHROPIC_BASE_URL`. Required for `openai-compatible`. Ignored by `nv_build`, whose endpoint is fixed to `https://integrate.api.nvidia.com/v1` — point a custom endpoint at the `openai-compatible` provider instead. |
| `SKILL_EVAL_LLM_API_KEY` | — | API key for the `openai-compatible` provider (local servers still require it to be set). |
| `NVIDIA_API_KEY` | — | Credential for the `nv_build` provider (NVIDIA Build). |
diff --git a/docs/tier3-live-evaluation.mdx b/docs/tier3-live-evaluation.mdx
index cb50f2f1..bc1f9fbd 100644
--- a/docs/tier3-live-evaluation.mdx
+++ b/docs/tier3-live-evaluation.mdx
@@ -155,7 +155,7 @@ skill source.
```bash title="With-skill vs. without-skill in Docker"
skillevaluator tier3 evaluate ./my-skill --agents codex --env-mode docker \
- --agent-model codex=gpt-5.4-mini
+ --agent-model codex=gpt-5.6-sol
```
Every supported agent harness works the same way:
diff --git a/src/skillevaluator/constants.py b/src/skillevaluator/constants.py
index 833b412e..f4e10a1e 100644
--- a/src/skillevaluator/constants.py
+++ b/src/skillevaluator/constants.py
@@ -6,6 +6,8 @@
Based on SkillEvaluator HOW_TO_CONTRIBUTE_SKILLS.md, HOW_TO_CONTRIBUTE_WORKFLOW_RULES.md specifications.
"""
+from skillevaluator.provider_config import CHAT_DEFAULT_OPENAI
+
# =============================================================================
# SKILLS CONSTANTS
# =============================================================================
@@ -563,8 +565,8 @@ TOKEN_EFFICIENCY_EVALUATOR_NAME: str = "token_efficiency"
# LLM-AS-JUDGE: TIER 3 DIMENSION + INSIGHTS
# =============================================================================
-DIMENSION_JUDGE_MODEL = "gpt-5.4-mini"
-DIMENSION_JUDGE_MAX_TOKENS = 2048
+DIMENSION_JUDGE_MODEL = CHAT_DEFAULT_OPENAI
+DIMENSION_JUDGE_MAX_TOKENS = 4096
DIMENSION_JUDGE_TEMPERATURE: float | None = 0.0
DIMENSION_VERDICT_PASS_THRESHOLD = 0.7
DIMENSION_VERDICT_NEUTRAL_THRESHOLD = 0.4
@@ -572,7 +574,7 @@ DIMENSION_VERDICT_NEUTRAL_THRESHOLD = 0.4
# LLM-as-Judge for the Insights tab (additional Conclusions and Recommendations
# on top of the deterministic ones produced by tier3_normalizer).
INSIGHTS_JUDGE_MODEL = DIMENSION_JUDGE_MODEL
-INSIGHTS_JUDGE_MAX_TOKENS = 2048
+INSIGHTS_JUDGE_MAX_TOKENS = 4096
INSIGHTS_JUDGE_TEMPERATURE: float | None = None
INSIGHTS_JUDGE_MAX_CONCLUSIONS = 5
INSIGHTS_JUDGE_MAX_RECOMMENDATIONS = 5
diff --git a/src/skillevaluator/inference/client.py b/src/skillevaluator/inference/client.py
index 77f3d92b..7738e6a7 100644
--- a/src/skillevaluator/inference/client.py
+++ b/src/skillevaluator/inference/client.py
@@ -31,6 +31,8 @@ from skillevaluator.provider_config import (
OPENAI_BASE_URL,
ProviderConfig,
ProviderConfigurationError,
+ _model_leaf,
+ _supports_custom_temperature,
resolve_llm_provider,
)
@@ -91,11 +93,17 @@ def _sdk_targets_native_openai(client: Any) -> bool:
def _token_limit_kwargs(config: ProviderConfig, max_tokens: int | None) -> dict[str, int]:
if max_tokens is None:
return {}
- if _is_native_openai_endpoint(config) and config.model.lower().startswith("gpt-5"):
+ if _is_native_openai_endpoint(config) and _model_leaf(config.model).startswith("gpt-5"):
return {"max_completion_tokens": max_tokens}
return {"max_tokens": max_tokens}
+def _temperature_kwargs(model: str, temperature: float | None) -> dict[str, float]:
+ if temperature is None or not _supports_custom_temperature(model):
+ return {}
+ return {"temperature": temperature}
+
+
class LLMClient:
"""Public-provider client for chat completions.
@@ -114,7 +122,7 @@ class LLMClient:
default_model: str = LLM_VERIFY_MODEL
default_max_tokens: int | None = None
- default_temperature: float = LLM_VERIFY_TEMPERATURE
+ default_temperature: float | None = LLM_VERIFY_TEMPERATURE
def __init__(
self,
@@ -148,7 +156,7 @@ class LLMClient:
return self._api_key or self._resolved_config().api_key
@property
- def temperature(self) -> float:
+ def temperature(self) -> float | None:
return self._temperature
# -- client management ------------------------------------------------
@@ -236,13 +244,14 @@ class LLMClient:
config = self._resolved_config()
client = self._get_client()
if config.provider == "anthropic":
- response = client.messages.create(
- model=config.model,
- max_tokens=self._max_tokens or 4096,
- system=system_prompt,
- messages=[{"role": "user", "content": user_prompt}],
- temperature=self._temperature,
- )
+ call_kwargs: dict[str, Any] = {
+ "model": config.model,
+ "max_tokens": self._max_tokens or 4096,
+ "system": system_prompt,
+ "messages": [{"role": "user", "content": user_prompt}],
+ **_temperature_kwargs(config.model, self._temperature),
+ }
+ response = client.messages.create(**call_kwargs)
content = "".join(str(block.text) for block in response.content if getattr(block, "type", None) == "text")
if not content:
raise LLMClientError("LLM returned empty response content")
@@ -260,8 +269,8 @@ class LLMClient:
{"role": "system", "content": system_prompt},
{"role": "user", "content": user_prompt},
],
- temperature=self._temperature,
aws_region_name=config.region,
+ **_temperature_kwargs(config.model, self._temperature),
**({"max_tokens": self._max_tokens} if self._max_tokens is not None else {}),
)
content = response.choices[0].message.content
@@ -274,7 +283,7 @@ class LLMClient:
{"role": "system", "content": system_prompt},
{"role": "user", "content": user_prompt},
],
- "temperature": self._temperature,
+ **_temperature_kwargs(config.model, self._temperature),
**_token_limit_kwargs(config, self._max_tokens),
}
diff --git a/src/skillevaluator/provider_config.py b/src/skillevaluator/provider_config.py
index d7591535..09f160a2 100644
--- a/src/skillevaluator/provider_config.py
+++ b/src/skillevaluator/provider_config.py
@@ -6,23 +6,61 @@
from __future__ import annotations
import os
+import re
from collections.abc import Mapping
from dataclasses import dataclass
PUBLIC_NVIDIA_BUILD_BASE_URL = "https://integrate.api.nvidia.com/v1"
OPENAI_BASE_URL = "https://api.openai.com/v1"
-_CHAT_DEFAULT_MODELS = {
- "openai": "gpt-5.4-mini",
- "anthropic": "claude-sonnet-4-5",
+# Pinned frontier chat defaults (not floating aliases like ``gpt-5`` / ``claude-opus-latest``).
+# Harbor ``templates/eval.py`` cannot import this module — keep its local
+# ``DEFAULT_JUDGE_MODEL`` in sync via the drift test in
+# ``tests/tier3/test_judge_parse_robustness.py``.
+CHAT_DEFAULT_OPENAI = "gpt-5.6-sol"
+CHAT_DEFAULT_ANTHROPIC = "claude-opus-5"
+CHAT_DEFAULT_BEDROCK = "us.anthropic.claude-opus-5"
+# Lower-cost OpenAI alternative for ``SKILL_EVAL_LLM_MODEL`` overrides.
+CHAT_CHEAP_OPENAI = "gpt-5.4-mini"
+
+CHAT_DEFAULT_MODELS = {
+ "openai": CHAT_DEFAULT_OPENAI,
+ "anthropic": CHAT_DEFAULT_ANTHROPIC,
"nv_build": "nvidia/nemotron-3-nano-30b-a3b",
- "bedrock": "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
+ "bedrock": CHAT_DEFAULT_BEDROCK,
}
_EMBEDDING_DEFAULT_MODELS = {
"openai": "text-embedding-3-small",
"nv_build": "nvidia/nv-embed-v1",
}
_SUPPORTED_PROVIDERS = frozenset({"openai", "anthropic", "nv_build", "bedrock", "openai-compatible"})
+_NO_CUSTOM_TEMPERATURE_MODEL_IDS = frozenset({"claude-mythos-preview"})
+_ANTHROPIC_BEDROCK_PREFIX_RE = re.compile(r"^(?:(?:[a-z]{2}|global)\.)?anthropic\.")
+_VERSIONED_CLAUDE_MODEL_RE = re.compile(
+ r"^claude-[a-z][a-z-]*-(?P<major>\d+)"
+ r"(?:-(?P<minor>\d{1,2}))?"
+ r"(?:-(?:\d{8}|latest))?"
+ r"(?:-v\d+)?(?::\d+)?$"
+)
+
+
+def _model_leaf(model: str) -> str:
+ """Return a normalized model ID for capability checks only."""
+ leaf = str(model or "").strip().casefold().rsplit("/", 1)[-1]
+ return _ANTHROPIC_BEDROCK_PREFIX_RE.sub("", leaf, count=1)
+
+
+def _supports_custom_temperature(model: str) -> bool:
+ """Return whether ``model`` accepts a non-default temperature value."""
+ leaf = _model_leaf(model)
+ if leaf.startswith("gpt-5") or leaf in _NO_CUSTOM_TEMPERATURE_MODEL_IDS:
+ return False
+
+ match = _VERSIONED_CLAUDE_MODEL_RE.fullmatch(leaf)
+ if match is None:
+ return True
+ version = (int(match.group("major")), int(match.group("minor") or 0))
+ return version < (4, 7)
class ProviderConfigurationError(ValueError):
@@ -238,6 +276,6 @@ def _validate_provider(provider: str, *, variable: str) -> None:
def _default_chat_model(provider: str) -> str:
try:
- return _CHAT_DEFAULT_MODELS[provider]
+ return CHAT_DEFAULT_MODELS[provider]
except KeyError as exc:
raise ProviderConfigurationError("SKILL_EVAL_LLM_MODEL is required for openai-compatible providers.") from exc
diff --git a/src/skillevaluator/tier3/eval_core/llm_judge.py b/src/skillevaluator/tier3/eval_core/llm_judge.py
index 33e51bc0..3c982f40 100644
--- a/src/skillevaluator/tier3/eval_core/llm_judge.py
+++ b/src/skillevaluator/tier3/eval_core/llm_judge.py
@@ -16,11 +16,13 @@ import urllib.request
from typing import Any
from urllib.parse import urlparse
+from skillevaluator.provider_config import CHAT_DEFAULT_OPENAI, _model_leaf, _supports_custom_temperature
+
logger = logging.getLogger(__name__)
OPENAI_CHAT_URL = "https://api.openai.com/v1/chat/completions"
NVIDIA_BUILD_CHAT_URL = "https://integrate.api.nvidia.com/v1/chat/completions"
-DEFAULT_JUDGE_MODEL = "gpt-5.4-mini"
+DEFAULT_JUDGE_MODEL = CHAT_DEFAULT_OPENAI
_ERROR_REDACTION_MARKER = "[REDACTED]"
# Match verifier log redaction; shorter placeholders can corrupt ordinary diagnostic text.
@@ -156,12 +158,6 @@ def _should_try_fallback(error: str) -> bool:
)
-def _supports_custom_temperature(model: str) -> bool:
- """Return false for chat models that only accept their default temperature."""
- lowered = str(model or "").lower()
- return not lowered.startswith("openai/openai/gpt-5")
-
-
def _chat_completion_payload(
*,
model: str,
@@ -175,7 +171,7 @@ def _chat_completion_payload(
resolved_request_url = _resolve_url(resolved_provider) if request_url is None else request_url
token_key = (
"max_completion_tokens"
- if str(model or "").casefold().startswith("gpt-5")
+ if _model_leaf(model).startswith("gpt-5")
and _is_native_openai_chat_url(resolved_provider, resolved_request_url)
else "max_tokens"
)
@@ -184,7 +180,7 @@ def _chat_completion_payload(
token_key: max_tokens,
"messages": [{"role": "user", "content": prompt}],
}
- if _supports_custom_temperature(model):
+ if temperature is not None and _supports_custom_temperature(model):
payload["temperature"] = temperature
return payload
diff --git a/src/skillevaluator/tier3/harbor/templates/eval.py b/src/skillevaluator/tier3/harbor/templates/eval.py
index edcd0667..837d86ed 100644
--- a/src/skillevaluator/tier3/harbor/templates/eval.py
+++ b/src/skillevaluator/tier3/harbor/templates/eval.py
@@ -77,7 +77,9 @@ SKILL_EVALUATOR_REWARD_JSON = _env_path(
OPENAI_CHAT_URL = "https://api.openai.com/v1/chat/completions"
NVIDIA_BUILD_CHAT_URL = "https://integrate.api.nvidia.com/v1/chat/completions"
-DEFAULT_JUDGE_MODEL = "gpt-5.4-mini"
+# Keep in sync with skillevaluator.provider_config.CHAT_DEFAULT_OPENAI
+# (sandbox template cannot import the package — see drift test).
+DEFAULT_JUDGE_MODEL = "gpt-5.6-sol"
_ERROR_REDACTION_MARKER = "[REDACTED]"
# Shorter placeholders are not credible provider credentials and can corrupt report schema keys.
@@ -1106,9 +1108,28 @@ def _should_try_fallback(error):
)
+def _model_leaf(model):
+ # Keep in sync with skillevaluator.tier3.eval_core.llm_judge (drift test).
+ leaf = str(model or "").strip().casefold().rsplit("/", 1)[-1]
+ return re.sub(r"^(?:(?:[a-z]{2}|global)\.)?anthropic\.", "", leaf, count=1)
+
+
def _supports_custom_temperature(model):
- lowered = str(model or "").lower()
- return not lowered.startswith("openai/openai/gpt-5")
+ # Keep in sync with skillevaluator.tier3.eval_core.llm_judge (drift test).
+ leaf = _model_leaf(model)
+ if leaf.startswith("gpt-5") or leaf == "claude-mythos-preview":
+ return False
+ match = re.fullmatch(
+ r"claude-[a-z][a-z-]*-(?P<major>\d+)"
+ r"(?:-(?P<minor>\d{1,2}))?"
+ r"(?:-(?:\d{8}|latest))?"
+ r"(?:-v\d+)?(?::\d+)?",
+ leaf,
+ )
+ if match is None:
+ return True
+ version = (int(match.group("major")), int(match.group("minor") or 0))
+ return version < (4, 7)
def _is_native_openai_chat_url(provider, request_url):
@@ -1147,7 +1168,7 @@ def _chat_completion_payload(model, prompt, max_tokens, temperature, provider=No
resolved_request_url = _resolve_url(resolved_provider) if request_url is None else request_url
token_key = (
"max_completion_tokens"
- if str(model or "").casefold().startswith("gpt-5")
+ if _model_leaf(model).startswith("gpt-5")
and _is_native_openai_chat_url(resolved_provider, resolved_request_url)
else "max_tokens"
)
@@ -1156,7 +1177,7 @@ def _chat_completion_payload(model, prompt, max_tokens, temperature, provider=No
token_key: max_tokens,
"messages": [{"role": "user", "content": prompt}],
}
- if _supports_custom_temperature(model):
+ if temperature is not None and _supports_custom_temperature(model):
payload["temperature"] = temperature
return payload
@@ -1199,16 +1220,16 @@ def _call_anthropic(prompt, model, max_tokens, temperature):
api_key = os.environ.get("ANTHROPIC_API_KEY", "")
if not api_key:
return None, "ANTHROPIC_API_KEY is required for the anthropic provider"
+ payload = {
+ "model": model,
+ "max_tokens": max_tokens,
+ "messages": [{"role": "user", "content": prompt}],
+ }
+ if temperature is not None and _supports_custom_temperature(model):
+ payload["temperature"] = temperature
request = urllib.request.Request(
_anthropic_url(),
- data=json.dumps(
- {
- "model": model,
- "max_tokens": max_tokens,
- "temperature": temperature,
- "messages": [{"role": "user", "content": prompt}],
- }
- ).encode(),
+ data=json.dumps(payload).encode(),
headers={
"Content-Type": "application/json",
"x-api-key": api_key,
@@ -1233,10 +1254,13 @@ def _call_bedrock(prompt, model, max_tokens, temperature):
return None, "boto3 is required for the bedrock provider"
try:
client = boto3.client("bedrock-runtime", region_name=os.environ.get("AWS_REGION", "us-west-2"))
+ inference_config = {"maxTokens": max_tokens}
+ if temperature is not None and _supports_custom_temperature(model):
+ inference_config["temperature"] = temperature
response = client.converse(
modelId=model,
messages=[{"role": "user", "content": [{"text": prompt}]}],
- inferenceConfig={"maxTokens": max_tokens, "temperature": temperature},
+ inferenceConfig=inference_config,
)
content = "".join(
str(block.get("text", ""))
diff --git a/tests/inference/test_llm_client.py b/tests/inference/test_llm_client.py
index 7cab53da..31544b6d 100644
--- a/tests/inference/test_llm_client.py
+++ b/tests/inference/test_llm_client.py
@@ -12,16 +12,28 @@ import pytest
from skillevaluator.inference import LLMClient, LLMClientError, LLMVerdict
from skillevaluator.inference.client import _is_native_openai_endpoint, _token_limit_kwargs
-from skillevaluator.provider_config import OPENAI_BASE_URL, PUBLIC_NVIDIA_BUILD_BASE_URL, ProviderConfig
-
-
-def _gpt5_config(*, provider: str = "openai", base_url: str = OPENAI_BASE_URL) -> ProviderConfig:
+from skillevaluator.provider_config import (
+ CHAT_DEFAULT_ANTHROPIC,
+ CHAT_DEFAULT_BEDROCK,
+ CHAT_DEFAULT_OPENAI,
+ OPENAI_BASE_URL,
+ PUBLIC_NVIDIA_BUILD_BASE_URL,
+ ProviderConfig,
+)
+
+
+def _gpt5_config(
+ *,
+ provider: str = "openai",
+ base_url: str = OPENAI_BASE_URL,
+ model: str = "gpt-5.4-mini",
+) -> ProviderConfig:
return ProviderConfig(
provider=provider,
- model="gpt-5.4-mini",
+ model=model,
api_key="test-key",
base_url=base_url,
- litellm_model="openai/gpt-5.4-mini",
+ litellm_model=f"openai/{model}",
)
@@ -225,6 +237,19 @@ class TestNativeOpenAIEndpoint:
assert _is_native_openai_endpoint(config) is False
assert _token_limit_kwargs(config, 512) == {"max_tokens": 512}
+ @pytest.mark.parametrize(
+ "model",
+ [
+ CHAT_DEFAULT_OPENAI,
+ f"openai/{CHAT_DEFAULT_OPENAI}",
+ f"openai/openai/{CHAT_DEFAULT_OPENAI}",
+ ],
+ )
+ def test_provider_prefixed_gpt5_models_use_completion_tokens(self, model: str) -> None:
+ config = _gpt5_config(model=model)
+
+ assert _token_limit_kwargs(config, 512) == {"max_completion_tokens": 512}
+
@pytest.mark.parametrize(
"base_url",
[
@@ -304,10 +329,23 @@ class TestCompletions:
result = client.completions("system", "user")
assert result == "Hello world"
- def test_openai_gpt5_uses_max_completion_tokens(self, monkeypatch: pytest.MonkeyPatch) -> None:
+ def test_none_temperature_is_omitted(self, monkeypatch: pytest.MonkeyPatch) -> None:
+ class NoTemperatureClient(LLMClient):
+ default_temperature = None
+
+ monkeypatch.delenv("OPENAI_BASE_URL", raising=False)
+ mock_openai = MagicMock()
+ mock_openai.chat.completions.create.return_value.choices = [MagicMock(message=MagicMock(content="Done"))]
+
+ with patch("openai.OpenAI", return_value=mock_openai):
+ NoTemperatureClient(model="gpt-4.1-mini", api_key="test-key").completions("system", "user")
+
+ assert "temperature" not in mock_openai.chat.completions.create.call_args.kwargs
+
+ def test_openai_gpt5_uses_max_completion_tokens_without_temperature(self, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "openai")
monkeypatch.setenv("OPENAI_API_KEY", "test-key")
- monkeypatch.setenv("SKILL_EVAL_LLM_MODEL", "gpt-5.4-mini")
+ monkeypatch.setenv("SKILL_EVAL_LLM_MODEL", CHAT_DEFAULT_OPENAI)
monkeypatch.delenv("SKILL_EVAL_LLM_BASE_URL", raising=False)
monkeypatch.delenv("OPENAI_BASE_URL", raising=False)
mock_openai = MagicMock()
@@ -320,6 +358,7 @@ class TestCompletions:
call_kwargs = mock_openai.chat.completions.create.call_args.kwargs
assert "max_tokens" not in call_kwargs
assert call_kwargs["max_completion_tokens"] == 512
+ assert "temperature" not in call_kwargs
def test_nvidia_build_uses_max_tokens(self, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "nv_build")
@@ -336,6 +375,7 @@ class TestCompletions:
call_kwargs = mock_openai.chat.completions.create.call_args.kwargs
assert call_kwargs["model"] == "nvidia/nemotron-3-nano-30b-a3b"
assert call_kwargs["max_tokens"] == 512
+ assert call_kwargs["temperature"] == 0.0
assert "max_completion_tokens" not in call_kwargs
@pytest.mark.parametrize(
@@ -365,13 +405,18 @@ class TestCompletions:
call_kwargs = mock_openai.chat.completions.create.call_args.kwargs
assert call_kwargs["max_tokens"] == 512
assert "max_completion_tokens" not in call_kwargs
+ assert "temperature" not in call_kwargs
- @pytest.mark.parametrize(("max_tokens", "expected_max_tokens"), [(None, 4096), (512, 512)])
- def test_anthropic_completion_branch_preserves_token_limit_contract(
+ @pytest.mark.parametrize(
+ ("max_tokens", "expected_max_tokens", "temperature"),
+ [(None, 4096, 0.0), (512, 512, 0.3)],
+ )
+ def test_anthropic_opus5_preserves_token_limit_and_omits_temperature(
self,
monkeypatch: pytest.MonkeyPatch,
max_tokens: int | None,
expected_max_tokens: int,
+ temperature: float,
) -> None:
monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "anthropic")
monkeypatch.setenv("ANTHROPIC_API_KEY", "test-anthropic-key")
@@ -382,15 +427,41 @@ class TestCompletions:
mock_anthropic.messages.create.return_value.content = [SimpleNamespace(type="text", text="Done")]
with patch("anthropic.Anthropic", return_value=mock_anthropic):
- content = LLMClient(max_tokens=max_tokens).completions("system", "user")
+ content = LLMClient(max_tokens=max_tokens, temperature=temperature).completions("system", "user")
assert content == "Done"
call_kwargs = mock_anthropic.messages.create.call_args.kwargs
+ assert call_kwargs["model"] == CHAT_DEFAULT_ANTHROPIC
assert call_kwargs["max_tokens"] == expected_max_tokens
assert "max_completion_tokens" not in call_kwargs
+ assert "temperature" not in call_kwargs
+
+ def test_older_anthropic_model_preserves_custom_temperature(self, monkeypatch: pytest.MonkeyPatch) -> None:
+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "anthropic")
+ monkeypatch.setenv("ANTHROPIC_API_KEY", "test-anthropic-key")
+ monkeypatch.setenv("SKILL_EVAL_LLM_MODEL", "claude-3-5-sonnet-20241022")
+ mock_anthropic = MagicMock()
+ mock_anthropic.messages.create.return_value.content = [SimpleNamespace(type="text", text="Done")]
+
+ with patch("anthropic.Anthropic", return_value=mock_anthropic):
+ LLMClient(temperature=0.2).completions("system", "user")
+
+ assert mock_anthropic.messages.create.call_args.kwargs["temperature"] == 0.2
+
+ def test_anthropic_mythos_preview_omits_temperature(self, monkeypatch: pytest.MonkeyPatch) -> None:
+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "anthropic")
+ monkeypatch.setenv("ANTHROPIC_API_KEY", "test-anthropic-key")
+ monkeypatch.setenv("SKILL_EVAL_LLM_MODEL", "claude-mythos-preview")
+ mock_anthropic = MagicMock()
+ mock_anthropic.messages.create.return_value.content = [SimpleNamespace(type="text", text="Done")]
+
+ with patch("anthropic.Anthropic", return_value=mock_anthropic):
+ LLMClient(temperature=0.2).completions("system", "user")
+
+ assert "temperature" not in mock_anthropic.messages.create.call_args.kwargs
@pytest.mark.parametrize("max_tokens", [None, 0])
- def test_bedrock_completion_branch_preserves_none_and_zero_token_limits(
+ def test_bedrock_opus5_preserves_token_limits_and_omits_temperature(
self,
monkeypatch: pytest.MonkeyPatch,
max_tokens: int | None,
@@ -400,16 +471,28 @@ class TestCompletions:
response = SimpleNamespace(choices=[SimpleNamespace(message=SimpleNamespace(content="Done"))])
with patch("litellm.completion", return_value=response) as completion:
- content = LLMClient(max_tokens=max_tokens).completions("system", "user")
+ content = LLMClient(max_tokens=max_tokens, temperature=0.2).completions("system", "user")
assert content == "Done"
call_kwargs = completion.call_args.kwargs
+ assert call_kwargs["model"] == f"bedrock/{CHAT_DEFAULT_BEDROCK}"
+ assert "temperature" not in call_kwargs
if max_tokens is None:
assert {"max_tokens", "max_completion_tokens"}.isdisjoint(call_kwargs)
else:
assert call_kwargs["max_tokens"] == 0
assert "max_completion_tokens" not in call_kwargs
+ def test_older_bedrock_model_preserves_custom_temperature(self, monkeypatch: pytest.MonkeyPatch) -> None:
+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "bedrock")
+ monkeypatch.setenv("SKILL_EVAL_LLM_MODEL", "us.anthropic.claude-3-5-sonnet-20241022-v2:0")
+ response = SimpleNamespace(choices=[SimpleNamespace(message=SimpleNamespace(content="Done"))])
+
+ with patch("litellm.completion", return_value=response) as completion:
+ LLMClient(temperature=0.2).completions("system", "user")
+
+ assert completion.call_args.kwargs["temperature"] == 0.2
+
@pytest.mark.parametrize("base_url_env", ["SKILL_EVAL_LLM_BASE_URL", "OPENAI_BASE_URL"])
def test_openai_provider_custom_base_url_uses_max_tokens(
self, monkeypatch: pytest.MonkeyPatch, base_url_env: str
diff --git a/tests/test_llm_judge.py b/tests/test_llm_judge.py
index cd49e4e1..88a08b37 100644
--- a/tests/test_llm_judge.py
+++ b/tests/test_llm_judge.py
@@ -5,14 +5,25 @@
from __future__ import annotations
+from unittest.mock import MagicMock, patch
+
import pytest
+from skillevaluator.provider_config import CHAT_CHEAP_OPENAI, CHAT_DEFAULT_OPENAI
from skillevaluator.tier3.eval_core import llm_judge
-def test_native_openai_gpt5_uses_max_completion_tokens() -> None:
+ "model",
+ [
+ CHAT_DEFAULT_OPENAI,
+ f"openai/{CHAT_DEFAULT_OPENAI}",
+ f"openai/openai/{CHAT_DEFAULT_OPENAI}",
+ ],
+)
+def test_native_openai_gpt5_uses_max_completion_tokens_without_temperature(model: str) -> None:
payload = llm_judge._chat_completion_payload(
- model="gpt-5.4-mini",
+ model=model,
prompt="Judge this response",
max_tokens=321,
temperature=0.25,
@@ -21,12 +32,75 @@ def test_native_openai_gpt5_uses_max_completion_tokens() -> None:
)
assert payload == {
- "model": "gpt-5.4-mini",
+ "model": model,
"max_completion_tokens": 321,
"messages": [{"role": "user", "content": "Judge this response"}],
- "temperature": 0.25,
}
assert "max_tokens" not in payload
+ assert "temperature" not in payload
+
+
+ "model",
+ [
+ CHAT_DEFAULT_OPENAI,
+ CHAT_CHEAP_OPENAI,
+ f"openai/{CHAT_DEFAULT_OPENAI}",
+ f"openai/openai/{CHAT_DEFAULT_OPENAI}",
+ ],
+)
+def test_gpt5_family_rejects_custom_temperature(model: str) -> None:
+ assert not llm_judge._supports_custom_temperature(model)
+
+
+def test_older_models_accept_custom_temperature() -> None:
+ assert llm_judge._supports_custom_temperature("gpt-4.1-mini")
+ assert llm_judge._supports_custom_temperature("claude-opus-4-6")
+ assert llm_judge._supports_custom_temperature("claude-opus-4-20250514")
+ assert llm_judge._supports_custom_temperature("claude-3-5-sonnet-20241022")
+
+
+ "model",
+ [
+ "claude-opus-4-7",
+ "claude-opus-4-8",
+ "anthropic/claude-opus-4-8",
+ "azure/anthropic/claude-opus-4-8",
+ "us.anthropic.claude-opus-4-8",
+ "bedrock/us.anthropic.claude-opus-4-8",
+ "claude-opus-5",
+ "anthropic/claude-opus-5",
+ "us.anthropic.claude-opus-5",
+ "bedrock/us.anthropic.claude-opus-5",
+ "claude-sonnet-5",
+ "claude-mythos-5",
+ "claude-mythos-preview",
+ "anthropic/claude-mythos-preview",
+ ],
+)
+def test_newer_claude_models_reject_custom_temperature(model: str) -> None:
+ assert not llm_judge._supports_custom_temperature(model)
+
+
+def test_call_public_llm_uses_production_gpt5_payload_without_temperature(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "openai")
+ monkeypatch.setenv("OPENAI_API_KEY", "test-key")
+ monkeypatch.delenv("SKILL_EVAL_LLM_MODEL", raising=False)
+ monkeypatch.delenv("SKILL_EVAL_LLM_BASE_URL", raising=False)
+ monkeypatch.delenv("OPENAI_BASE_URL", raising=False)
+ mock_openai = MagicMock()
+ mock_openai.chat.completions.create.return_value.choices = [MagicMock(message=MagicMock(content="Done"))]
+
+ with patch("openai.OpenAI", return_value=mock_openai):
+ content, error = llm_judge.call_public_llm("Judge this response", max_tokens=4096, temperature=0.0)
+
+ assert (content, error) == ("Done", None)
+ call_kwargs = mock_openai.chat.completions.create.call_args.kwargs
+ assert call_kwargs["max_completion_tokens"] == 4096
+ assert "temperature" not in call_kwargs
@pytest.mark.parametrize(
@@ -38,7 +112,7 @@ def test_native_openai_gpt5_uses_max_completion_tokens() -> None:
)
def test_non_native_gpt5_requests_keep_max_tokens(provider: str, request_url: str) -> None:
payload = llm_judge._chat_completion_payload(
- model="gpt-5.4-mini",
+ model=CHAT_DEFAULT_OPENAI,
prompt="Judge this response",
max_tokens=321,
temperature=0.0,
@@ -48,6 +122,7 @@ def test_non_native_gpt5_requests_keep_max_tokens(provider: str, request_url: st
assert payload["max_tokens"] == 321
assert "max_completion_tokens" not in payload
+ assert "temperature" not in payload
def test_native_openai_non_gpt5_keeps_max_tokens() -> None:
@@ -61,6 +136,7 @@ def test_native_openai_non_gpt5_keeps_max_tokens() -> None:
)
assert payload["max_tokens"] == 321
+ assert payload["temperature"] == 0.0
assert "max_completion_tokens" not in payload
@@ -73,7 +149,7 @@ def test_completion_token_payload_resolves_provider_and_url_when_omitted(
monkeypatch.delenv("SKILL_EVAL_LLM_BASE_URL", raising=False)
payload = llm_judge._chat_completion_payload(
- model="gpt-5.4-mini",
+ model=CHAT_DEFAULT_OPENAI,
prompt="Judge this response",
max_tokens=321,
temperature=0.0,
@@ -81,6 +157,7 @@ def test_completion_token_payload_resolves_provider_and_url_when_omitted(
assert payload["max_completion_tokens"] == 321
assert "max_tokens" not in payload
+ assert "temperature" not in payload
@pytest.mark.parametrize(
diff --git a/tests/test_oss_packaging.py b/tests/test_oss_packaging.py
index e9eabd87..8779e399 100644
--- a/tests/test_oss_packaging.py
+++ b/tests/test_oss_packaging.py
@@ -503,7 +503,9 @@ def test_public_docs_show_external_nvidia_build_harness_paths_only() -> None:
tier3 = (REPO_ROOT / "docs" / "tier3-live-evaluation.mdx").read_text(encoding="utf-8")
public_docs = f"{readme}\n{configuration}\n{tier3}"
+ assert "gpt-5.6-sol" in public_docs
assert "gpt-5.4-mini" in public_docs
+ assert "claude-opus-5" in public_docs
assert "nvidia/nemotron-3-nano-30b-a3b" in public_docs
assert "nvidia/nvidia/nemotron-3-nano-30b-a3b" in public_docs
assert "Nemotron Super" in public_docs
diff --git a/tests/test_provider_agent_routing.py b/tests/test_provider_agent_routing.py
index 0a7acb5c..42dc4e5a 100644
--- a/tests/test_provider_agent_routing.py
+++ b/tests/test_provider_agent_routing.py
@@ -30,9 +30,9 @@ def _provider(name: str, model: str) -> ProviderConfig:
@pytest.mark.parametrize(
("provider", "agent", "expected"),
[
- (_provider("openai", "gpt-5.4-mini"), "codex", "gpt-5.4-mini"),
- (_provider("openai", "gpt-5.4-mini"), "opencode", "openai/gpt-5.4-mini"),
- (_provider("anthropic", "claude-sonnet-4-5"), "claude-code", "claude-sonnet-4-5"),
+ (_provider("openai", "gpt-5.5"), "codex", "gpt-5.5"),
+ (_provider("openai", "gpt-5.5"), "opencode", "openai/gpt-5.5"),
+ (_provider("anthropic", "claude-opus-5"), "claude-code", "claude-opus-5"),
(
_provider("nv_build", "nvidia/nemotron-3-nano-30b-a3b"),
"opencode",
@@ -103,7 +103,7 @@ def test_docker_build_bridges_accept_the_provider_default(agent: str) -> None:
[
("opencode", "nvidia/gpt-5"),
("codex", "gpt-5"),
- ("claude-code", "claude-sonnet-4-5"),
+ ("claude-code", "claude-opus-4-8"),
],
)
def test_build_agents_reject_native_model_names_that_would_be_misrouted(
@@ -148,7 +148,7 @@ def test_cloud_build_vendor_clis_require_independent_native_credentials(
def test_openai_provider_rejects_claude_without_an_independent_credential() -> None:
errors = _validate_agent_provider_credentials(
- _provider("openai", "gpt-5.4-mini"),
+ _provider("openai", "gpt-5.5"),
["claude-code"],
{},
{"claude-code": "public provider default"},
@@ -162,7 +162,7 @@ def test_openai_provider_rejects_claude_without_an_independent_credential() -> N
def test_openai_provider_rejects_the_default_gpt_model_for_claude() -> None:
errors = _validate_agent_provider_credentials(
- _provider("openai", "gpt-5.4-mini"),
+ _provider("openai", "gpt-5.5"),
["claude-code"],
{"ANTHROPIC_API_KEY": "anthropic-key"},
{"claude-code": "public provider default"},
@@ -174,7 +174,7 @@ def test_openai_provider_rejects_the_default_gpt_model_for_claude() -> None:
def test_openai_provider_accepts_an_explicit_independent_claude_route() -> None:
assert (
_validate_agent_provider_credentials(
- _provider("openai", "gpt-5.4-mini"),
+ _provider("openai", "gpt-5.5"),
["claude-code"],
{"ANTHROPIC_API_KEY": "anthropic-key"},
{"claude-code": "CLI"},
@@ -187,7 +187,7 @@ def test_openai_provider_accepts_an_explicit_independent_claude_route() -> None:
def test_openai_provider_accepts_mixed_routes_for_per_agent_isolation() -> None:
assert (
_validate_agent_provider_credentials(
- _provider("openai", "gpt-5.4-mini"),
+ _provider("openai", "gpt-5.5"),
["codex", "claude-code"],
{"ANTHROPIC_API_KEY": "anthropic-key"},
{"codex": "public provider default", "claude-code": "CLI"},
@@ -199,12 +199,12 @@ def test_openai_provider_accepts_mixed_routes_for_per_agent_isolation() -> None:
def test_openai_provider_rejects_an_anthropic_opencode_override() -> None:
errors = _validate_agent_provider_credentials(
- _provider("openai", "gpt-5.4-mini"),
+ _provider("openai", "gpt-5.5"),
["codex", "opencode"],
{"ANTHROPIC_API_KEY": "anthropic-key"},
{"codex": "public provider default", "opencode": "CLI"},
env_mode="docker",
- agent_models={"codex": "gpt-5.4-mini", "opencode": "anthropic/claude-sonnet-4-5"},
+ agent_models={"codex": "gpt-5.5", "opencode": "anthropic/claude-opus-4-8"},
)
assert errors and "must match the evaluator provider" in errors[0]
assert "ANTHROPIC_API_KEY" not in errors[0]
@@ -212,7 +212,7 @@ def test_openai_provider_rejects_an_anthropic_opencode_override() -> None:
def test_anthropic_provider_rejects_default_raw_model_for_opencode() -> None:
errors = _validate_agent_provider_credentials(
- _provider("anthropic", "claude-sonnet-4-5"),
+ _provider("anthropic", "claude-opus-4-8"),
["opencode"],
{},
{"opencode": "public provider default"},
@@ -239,7 +239,7 @@ def test_anthropic_provider_rejects_incomplete_or_default_codex_routes(
expected_fragment: str,
) -> None:
errors = _validate_agent_provider_credentials(
- _provider("anthropic", "claude-sonnet-4-5"),
+ _provider("anthropic", "claude-opus-4-8"),
["codex"],
runtime_env,
{"codex": model_source},
@@ -251,19 +251,19 @@ def test_anthropic_provider_rejects_incomplete_or_default_codex_routes(
def test_anthropic_provider_accepts_explicit_codex_and_opencode_routes() -> None:
assert (
_validate_agent_provider_credentials(
- _provider("anthropic", "claude-sonnet-4-5"),
+ _provider("anthropic", "claude-opus-4-8"),
["codex", "opencode"],
{"OPENAI_API_KEY": "openai-key", "OPENAI_BASE_URL": "https://api.openai.com/v1"},
{"codex": "CLI", "opencode": "CLI"},
env_mode="docker",
- agent_models={"codex": "gpt-5.4-mini", "opencode": "anthropic/claude-sonnet-4-5"},
+ agent_models={"codex": "gpt-5.5", "opencode": "anthropic/claude-opus-4-8"},
)
== []
)
def test_anthropic_provider_accepts_explicit_single_agent_routes() -> None:
- provider = _provider("anthropic", "claude-sonnet-4-5")
+ provider = _provider("anthropic", "claude-opus-4-8")
assert (
_validate_agent_provider_credentials(
provider,
@@ -281,7 +281,7 @@ def test_anthropic_provider_accepts_explicit_single_agent_routes() -> None:
{},
{"opencode": "CLI"},
env_mode="docker",
- agent_models={"opencode": "anthropic/claude-sonnet-4-5"},
+ agent_models={"opencode": "anthropic/claude-opus-4-8"},
)
== []
)
@@ -289,12 +289,12 @@ def test_anthropic_provider_accepts_explicit_single_agent_routes() -> None:
def test_anthropic_provider_rejects_an_openai_opencode_override() -> None:
errors = _validate_agent_provider_credentials(
- _provider("anthropic", "claude-sonnet-4-5"),
+ _provider("anthropic", "claude-opus-4-8"),
["claude-code", "opencode"],
{"OPENAI_API_KEY": "openai-key", "OPENAI_BASE_URL": "https://api.openai.com/v1"},
{"claude-code": "public provider default", "opencode": "CLI"},
env_mode="docker",
- agent_models={"claude-code": "claude-sonnet-4-5", "opencode": "openai/gpt-5.4-mini"},
+ agent_models={"claude-code": "claude-opus-4-8", "opencode": "openai/gpt-5.5"},
)
assert errors and "must match the evaluator provider" in errors[0]
assert "OPENAI_API_KEY" not in errors[0]
diff --git a/tests/test_provider_config.py b/tests/test_provider_config.py
index 694d107c..b2074ba0 100644
--- a/tests/test_provider_config.py
+++ b/tests/test_provider_config.py
@@ -34,11 +34,44 @@ def test_openai_provider_uses_standard_openai_credentials() -> None:
}
-def test_openai_provider_uses_gpt_4_1_mini_by_default() -> None:
+def test_openai_provider_uses_gpt_5_5_by_default() -> None:
config = resolve_llm_provider({"SKILL_EVAL_LLM_PROVIDER": "openai", "OPENAI_API_KEY": "test-openai-key"})
- assert config.model == "gpt-5.4-mini"
- assert config.litellm_model == "openai/gpt-5.4-mini"
+ assert config.model == "gpt-5.6-sol"
+ assert config.litellm_model == "openai/gpt-5.6-sol"
+
+
+def test_anthropic_provider_uses_claude_opus_5_by_default() -> None:
+ config = resolve_llm_provider({"SKILL_EVAL_LLM_PROVIDER": "anthropic", "ANTHROPIC_API_KEY": "test-anthropic-key"})
+
+ assert config.model == "claude-opus-5"
+ assert config.litellm_model == "anthropic/claude-opus-5"
+
+
+def test_bedrock_provider_uses_claude_opus_5_us_profile_by_default() -> None:
+ config = resolve_llm_provider({"SKILL_EVAL_LLM_PROVIDER": "bedrock"})
+
+ assert config.model == "us.anthropic.claude-opus-5"
+ assert config.litellm_model == "bedrock/us.anthropic.claude-opus-5"
+
+
+def test_chat_default_models_are_the_single_source_of_truth() -> None:
+ from skillevaluator.constants import DIMENSION_JUDGE_MODEL
+ from skillevaluator.provider_config import (
+ CHAT_CHEAP_OPENAI,
+ CHAT_DEFAULT_ANTHROPIC,
+ CHAT_DEFAULT_BEDROCK,
+ CHAT_DEFAULT_MODELS,
+ CHAT_DEFAULT_OPENAI,
+ )
+ from skillevaluator.tier3.eval_core.llm_judge import DEFAULT_JUDGE_MODEL
+
+ assert CHAT_DEFAULT_MODELS["openai"] == CHAT_DEFAULT_OPENAI == "gpt-5.6-sol"
+ assert CHAT_DEFAULT_MODELS["anthropic"] == CHAT_DEFAULT_ANTHROPIC == "claude-opus-5"
+ assert CHAT_DEFAULT_MODELS["bedrock"] == CHAT_DEFAULT_BEDROCK == "us.anthropic.claude-opus-5"
+ assert CHAT_CHEAP_OPENAI == "gpt-5.4-mini"
+ assert DIMENSION_JUDGE_MODEL == CHAT_DEFAULT_OPENAI
+ assert DEFAULT_JUDGE_MODEL == CHAT_DEFAULT_OPENAI
def test_nvidia_build_uses_public_build_endpoint() -> None:
diff --git a/tests/tier3/test_judge_parse_robustness.py b/tests/tier3/test_judge_parse_robustness.py
index 030b4aaa..71f3da77 100644
--- a/tests/tier3/test_judge_parse_robustness.py
+++ b/tests/tier3/test_judge_parse_robustness.py
@@ -32,6 +32,7 @@ from __future__ import annotations
import importlib.util
import json
from pathlib import Path
+from unittest.mock import MagicMock
import pytest
@@ -344,6 +345,114 @@ def test_template_behavior_judge_max_tokens_matches_eval_core_constant():
assert llm_judge.BEHAVIOR_JUDGE_MAX_TOKENS >= 4096
+def test_template_default_judge_model_matches_central_constant():
+ from skillevaluator.provider_config import CHAT_DEFAULT_OPENAI
+
+ assert eval_template.DEFAULT_JUDGE_MODEL == llm_judge.DEFAULT_JUDGE_MODEL
+ assert llm_judge.DEFAULT_JUDGE_MODEL == CHAT_DEFAULT_OPENAI
+ assert CHAT_DEFAULT_OPENAI == "gpt-5.6-sol"
+
+
+def test_template_gpt5_temperature_guard_matches_eval_core():
+ for model in (
+ "gpt-5.6-sol",
+ "openai/gpt-5.6-sol",
+ "openai/openai/gpt-5.6-sol",
+ "gpt-5.4-mini",
+ "gpt-4.1-mini",
+ "claude-mythos-preview",
+ "anthropic/claude-mythos-preview",
+ ):
+ assert eval_template._model_leaf(model) == llm_judge._model_leaf(model)
+ assert eval_template._supports_custom_temperature(model) == llm_judge._supports_custom_temperature(model)
+
+
+ ("model", "expected_temperature"),
+ [
+ ("claude-opus-4-8", None),
+ ("claude-opus-5", None),
+ ("claude-mythos-preview", None),
+ ("claude-3-5-sonnet-20241022", 0.3),
+ ],
+)
+def test_template_anthropic_request_uses_model_compatible_temperature(monkeypatch, model, expected_temperature):
+ captured = {}
+
+ class Response:
+ def __enter__(self):
+ return self
+
+ def __exit__(self, *_args):
+ return False
+
+ def read(self):
+ return b'{"content":[{"type":"text","text":"Done"}]}'
+
+ def fake_urlopen(request, timeout):
+ assert timeout == 90
+ captured.update(json.loads(request.data))
+ return Response()
+
+ monkeypatch.setenv("ANTHROPIC_API_KEY", "test-key")
+ monkeypatch.setattr(eval_template.urllib.request, "urlopen", fake_urlopen)
+
+ content, error = eval_template._call_anthropic("prompt", model, 4096, 0.3)
+
+ assert (content, error) == ("Done", None)
+ assert captured["max_tokens"] == 4096
+ if expected_temperature is None:
+ assert "temperature" not in captured
+ else:
+ assert captured["temperature"] == expected_temperature
+
+
+ ("model", "expected_temperature"),
+ [
+ ("us.anthropic.claude-opus-4-8", None),
+ ("us.anthropic.claude-opus-5", None),
+ ("us.anthropic.claude-3-5-sonnet-20241022-v2:0", 0.3),
+ ],
+)
+def test_template_bedrock_request_uses_model_compatible_temperature(monkeypatch, model, expected_temperature):
+ import boto3
+
+ client = MagicMock()
+ client.converse.return_value = {"output": {"message": {"content": [{"text": "Done"}]}}}
+ monkeypatch.setattr(boto3, "client", lambda *_args, **_kwargs: client)
+
+ content, error = eval_template._call_bedrock("prompt", model, 4096, 0.3)
+
+ assert (content, error) == ("Done", None)
+ inference_config = client.converse.call_args.kwargs["inferenceConfig"]
+ assert inference_config["maxTokens"] == 4096
+ if expected_temperature is None:
+ assert "temperature" not in inference_config
+ else:
+ assert inference_config["temperature"] == expected_temperature
+
+
+ "model",
+ ["gpt-5.6-sol", "openai/gpt-5.6-sol", "openai/openai/gpt-5.6-sol"],
+)
+def test_template_native_openai_gpt5_payload_matches_eval_core(model):
+ kwargs = {
+ "model": model,
+ "prompt": "Judge this response",
+ "max_tokens": 321,
+ "temperature": 0.25,
+ "provider": "openai",
+ "request_url": llm_judge.OPENAI_CHAT_URL,
+ }
+
+ template_payload = eval_template._chat_completion_payload(**kwargs)
+ assert template_payload == llm_judge._chat_completion_payload(**kwargs)
+ assert "max_completion_tokens" in template_payload
+ assert "max_tokens" not in template_payload
+
+
def test_template_salvage_score_matches_eval_core_on_partial_recovery(monkeypatch):
# Drift guard for the salvage denominator fix: 3 salvaged of 7 expected
# must score 3/7 in BOTH the shared judge and the in-sandbox template.
diff --git a/tests/validators/test_security.py b/tests/validators/test_security.py
index 5addc629..57172f28 100644
--- a/tests/validators/test_security.py
+++ b/tests/validators/test_security.py
@@ -1498,8 +1498,8 @@ Call us at 555-123-4567 or +1-555-987-6543
@pytest.mark.parametrize(
("provider", "credential", "model"),
(
- ("openai", "OPENAI_API_KEY", "gpt-5.4-mini"),
- ("anthropic", "ANTHROPIC_API_KEY", "claude-sonnet-4-5"),
+ ("openai", "OPENAI_API_KEY", "gpt-5.6-sol"),
+ ("anthropic", "ANTHROPIC_API_KEY", "claude-opus-5"),
),
)
def test_skillspector_child_environment_maps_supported_public_provider_defaults(