Skip to content

Commit b07f181

Browse files
rng1995claudegithub-actions[bot]
authored
feat(providers): adopt GPT-6.1 Sol and Claude Opus 5.5 defaults with compatible structured output (#806)
* feat(providers): support Claude Opus and Sonnet 5.5 structured output on native routes Claude Opus 5.5 and Sonnet 5.5 answer a forced tool call with HTTP 400 and reject sampling controls. Add both to the shared forced-tool table and a new SAMPLING_REJECTED_MODELS table, so the anthropic and anthropic_proxy providers request the native JSON-schema response format and the bedrock provider binds the schema with toolChoice auto. Add claude_model_name(), which reads the bare Claude name from bare, namespaced, prefixed, dotted, dated and Bedrock identifiers, and reject_unsupported_controls(), which fails before any request when SKILLSPECTOR_TEMPERATURE is set for a model that rejects it. anthropic, anthropic_proxy and bedrock call it after credentials resolve, so a missing key still returns None and the OpenAI fallback is unchanged. Register both models for anthropic and anthropic_proxy (1,000,000 context, 128,000 output, json_schema) and the AWS-documented Bedrock profiles as explicit opt-in entries with toolChoice auto: Opus 5.5 on us/eu/au/jp/global and Sonnet 5.5 on us/eu/global. No default changes. Bind the live OpenAI and Anthropic provider tests through bind_structured_output with room for reasoning tokens, and pin that a refused structured response fails the semantic analyzer instead of reading as a clean scan. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> * feat(providers): bind gateway Claude 5.5 IDs without a forced tool call Gateways namespace or prefix Claude model names (azure/anthropic/claude-opus-5-5, aws/anthropic/bedrock-claude-opus-5-5), so the bare-name rule missed them and LangChain forced a tool call that Claude Opus and Sonnet 5.5 reject with HTTP 400. OpenAI-compatible gateways can also turn a json_schema response format for Claude into a forced tool call. Read the Claude name with claude_model_name() on every route: - anthropic and anthropic_proxy request the native JSON-schema format for gateway IDs too (registry entries still win). - openai gains forced_tool_choice_supported() and structured_output_method(): for those Claude IDs it disables tool_choice and binds the schema as an unforced tool call that the prompt asks for, retrying a prose answer. Other models, including gpt-6.1-sol and earlier Claude IDs, keep LangChain's default. - openai_compatible applies the same name rule when the registry declares no tool_choice. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> * feat(providers): reject controls GPT-6.1 Sol refuses before any request GPT-6.1 Sol rejects an explicit temperature and the reasoning efforts none and minimal with HTTP 400, and LangChain only strips temperature for the gpt-5 family, so SkillSpector would send them and fail mid-scan. reject_unsupported_controls() now also matches gpt-6.1-sol, bare or behind a gateway namespace or prefix, with an optional snapshot suffix. Any explicit SKILLSPECTOR_TEMPERATURE (1.0 included) and any SKILLSPECTOR_REASONING_EFFORT other than low, medium, high, xhigh or max raise ValueError with the setting to change. The shared OpenAI-protocol builder calls it after credentials resolve, so openai, openai_compatible and the other builder users get the Sol rules and the Claude 5.5 temperature rule; a missing key still returns None. Other models keep passing both controls through. SKILLSPECTOR_SEED is still forwarded to Sol and recorded as requested and retained; the docs call it best-effort. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> * fix(providers): repair the Bedrock default to us.anthropic.claude-sonnet-4-6 with a 64K cap The Bedrock default us.anthropic.claude-sonnet-4-6-20250915-v1:0 is not a catalogued AWS ID, and its registry entry allowed 128K output tokens while AWS caps Claude Sonnet 4.6 at 64K on Bedrock. BEDROCK_DEFAULT_MODEL becomes the suffix-free cross-region profile ID us.anthropic.claude-sonnet-4-6 that the AWS model card lists, and the registry key moves with it, capped at 64,000 output tokens. A test pins that no Claude 5.5 profile is the default; those stay explicit opt-in. The dated Opus 4.6 and 4.5 keys are unchanged. A custom SKILLSPECTOR_MODEL_REGISTRY file replaces the bundled registry, so it has to carry the new key to keep the default's budgets. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> * feat(providers): default OpenAI to gpt-6.1-sol The openai provider defaults every model slot to gpt-6.1-sol instead of gpt-5.4. The bundled registry already carries its 1,050,000-token context and 128,000-token output budgets, and it binds structured output through a strict, tool-free json_schema response format. The OPENAI_API_KEY credential fallback uses the openai defaults, so it now runs gpt-6.1-sol for any slot without a model override. An explicit SKILLSPECTOR_TEMPERATURE, or a reasoning effort other than low, medium, high, xhigh or max, now fails before the first request on these paths instead of being sent. Callers who need the previous model set SKILLSPECTOR_MODEL=gpt-5.4. The README provider table and the OPENAI_API_KEY row are updated. The row also records that Claude Opus or Sonnet 5.5 gateway IDs are not supported through the fallback, which keeps the active provider's structured-output method. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> * feat(providers): default native Anthropic to Opus 5.5 analyzers and Sonnet 5.5 meta The anthropic provider defaults its analyzer slots to claude-opus-5-5 instead of claude-opus-4-6, and keeps a cheaper meta_analyzer pass with claude-sonnet-5-5 instead of claude-sonnet-4-6. Both are registered with 1,000,000-token context and 128,000-token output budgets and bind structured output through the native JSON-schema format, since they reject a forced tool call. Effort stays unset, so the API defaults apply: medium for Opus 5.5 and high for Sonnet 5.5. SKILLSPECTOR_REASONING_EFFORT applies to every slot, meta included. An explicit SKILLSPECTOR_TEMPERATURE now fails before the first request with the default models. Slot precedence is unchanged: SKILLSPECTOR_MODEL replaces the meta default too, and SKILLSPECTOR_MODEL_META_ANALYZER wins over both. Callers who need the previous models set SKILLSPECTOR_MODEL=claude-opus-4-6 and SKILLSPECTOR_MODEL_META_ANALYZER=claude-sonnet-4-6. anthropic_proxy keeps its default. The README provider table and effort row are updated, and a SKILLSPECTOR_MODEL_<SLOT> row documents the per-slot override. A test pins the meta default against both overrides. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> * refactor(providers): read Claude model names through one normalizer on every route rejects_forced_tool_call() and rejects_sampling_controls() now normalize the model ID themselves through claude_model_name(), so callers pass the raw ID instead of wrapping it at each of the six call sites. Bedrock's forced_tool_choice_supported() uses the same rule, which makes claude_model_from_bedrock_id() dead; it is removed and its Bedrock ID cases now pin claude_model_name(). Every Bedrock ID the old parser recognised still resolves, and the registry tool_choice entry still wins first. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> * fix(providers): apply the control guard on every hosted provider Resolve sampling parameters for a model: resolve_sampling_parameters now takes the model and runs reject_unsupported_controls itself, so azure_openai (whose registry lists gpt-6.1-sol) gets the temperature guard the other providers already had, and no caller can skip it. The guard raises UnsupportedControlError, a ValueError subclass. GPT-6.1 Sol IDs are read through the same model_name normalizer as Claude IDs (last path segment, lowercased, cut at '@' or ':'), so gpt-6.1-sol:latest, openai/gpt-6.1-sol:nitro and gpt-6.1-sol@2026 are guarded too. A registry entry can declare 'sampling: rejected'. Bedrock reads it, so an application-inference-profile ARN that serves Claude 5.5 can opt in to the temperature guard, as it can already opt out of forced tool calls with 'tool_choice: auto'. The registry-then-name forced tool_choice decision moves into structured_output.forced_tool_choice_supported, and the openai, openai_compatible and bedrock providers delegate to it. create_openai_compatible_chat_model takes forced_tool_choice and builds the disabled_params dict that bind_structured_output looks for in one place. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> * fix(cli): stop a scan before analysis when a model rejects a requested control A SKILLSPECTOR_TEMPERATURE (or a GPT-6.1 Sol effort of none/minimal) that the configured model rejects used to surface only while each analyzer built its model: the scan logged one traceback per semantic analyzer, exited 2, and the report showed llm_available: true with a generic telemetry error. unsupported_control_error builds each distinct slot model the way the analyzers do and returns the UnsupportedControlError text; it does nothing when neither control is set, and leaves other failures, such as missing credentials, to the availability path. The scan and baseline commands call it first and exit 2 with that message. is_llm_available also returns it, so the MCP server and the report carry the reason in llm_error. The docs now say that the setting stops the scan on every hosted provider, that it worked with the previous gpt-5.4 and claude-opus-4-6 defaults, and how to declare 'sampling: rejected' for a Bedrock application-inference-profile ARN. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> * test(semantic): name the OpenAI refusal test after the failed status it pins test_openai_refusal_is_incomplete_not_clean asserts status == 'failed'; rename it to test_openai_refusal_is_failed_not_clean. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> * docs: say an unsupported Sol reasoning effort stops the scan The README already says an unsupported SKILLSPECTOR_REASONING_EFFORT for gpt-6.1-sol stops a scan before analysis with exit code 2. Use the same wording in .env.example and docs/DEVELOPMENT.md. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> * fix(providers): address model compatibility and preflight review Validate only active LLM model slots, keep static CLI and MCP scans out of provider credential initialization, accept native Claude temperature 1.0, and preserve malformed model-registry fallback. Add request, provenance, and credential-process regressions. Signed-off-by: Narendran Raghavan <[email protected]> --------- Signed-off-by: Narendran Raghavan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 7ee4371 commit b07f181

31 files changed

Lines changed: 1729 additions & 126 deletions

‎.env.example‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,19 @@ OPENAI_BASE_URL=
3131
# Optional provider- and model-dependent reasoning-effort setting. Non-empty values
3232
# are trimmed and passed through unchanged. Unset or blank sends high for nv_build
3333
# with z-ai/glm-5.3; other provider/model combinations keep their endpoint defaults.
34+
# gpt-6.1-sol accepts only low, medium, high, xhigh or max; any other value stops
35+
# a scan before analysis (exit code 2).
3436
SKILLSPECTOR_REASONING_EFFORT=
3537
# Optional language for human-readable LLM finding text. Machine-readable values
3638
# such as rule IDs and severity values remain unchanged.
3739
SKILLSPECTOR_OUTPUT_LANGUAGE=
3840
# Optional sampling controls. Temperature is supported by hosted providers;
3941
# seed is forwarded only to OpenAI-compatible and Azure OpenAI endpoints.
40-
# Unset or blank values preserve provider defaults.
42+
# Unset or blank values preserve provider defaults. gpt-6.1-sol rejects every
43+
# explicit temperature. claude-opus-5-5 and claude-sonnet-5-5 accept only 1.0
44+
# on the native Anthropic endpoint; other routes reject every explicit value.
45+
# Unsupported settings on active LLM slots stop the scan before analysis.
46+
# Static scans (--no-llm) skip provider initialization and these checks.
4147
SKILLSPECTOR_TEMPERATURE= # range: 0..1
4248
SKILLSPECTOR_SEED= # integer
4349

‎README.md‎

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,10 @@ inference gateways.
286286

287287
| Provider (`SKILLSPECTOR_PROVIDER`) | Credential env var | Endpoint | Default model |
288288
| ---------- | ---- | ---- | ---- |
289-
| `openai` | `OPENAI_API_KEY` (+ optional `OPENAI_BASE_URL`) | api.openai.com (or any OpenAI-compatible URL) | `gpt-5.4` |
290-
| `anthropic` | `ANTHROPIC_API_KEY` | api.anthropic.com | `claude-opus-4-6` |
289+
| `openai` | `OPENAI_API_KEY` (+ optional `OPENAI_BASE_URL`) | api.openai.com (or any OpenAI-compatible URL) | `gpt-6.1-sol` |
290+
| `anthropic` | `ANTHROPIC_API_KEY` | api.anthropic.com | `claude-opus-5-5` (`meta_analyzer`: `claude-sonnet-5-5`) |
291291
| `anthropic_proxy` | `ANTHROPIC_PROXY_API_KEY` + `ANTHROPIC_PROXY_ENDPOINT_URL` | Any Vertex-style raw-predict proxy | `claude-sonnet-4-6` |
292-
| `bedrock` | `AWS_PROFILE` (optional) + `AWS_REGION` — SigV4 via boto3 | AWS Bedrock Runtime | `us.anthropic.claude-sonnet-4-6-20250915-v1:0` |
292+
| `bedrock` | `AWS_PROFILE` (optional) + `AWS_REGION` — SigV4 via boto3 | AWS Bedrock Runtime | `us.anthropic.claude-sonnet-4-6` |
293293
| `nv_build` | `NVIDIA_INFERENCE_KEY` | build.nvidia.com | `z-ai/glm-5.3` |
294294
| `gemini` | `GOOGLE_CLOUD_PROJECT` (+ optional `GOOGLE_CLOUD_LOCATION`) via ADC | Google Cloud OpenAI-compatible Gemini endpoint | `gemini-3.8-flash` |
295295
| `ollama` | _(none)_ | `OLLAMA_BASE_URL` (default `http://localhost:11434/v1`) | `llama3.1:8b` |
@@ -310,8 +310,9 @@ The default is client-specific: `ChatOpenAI` uses `json_schema`, while other
310310
clients may use tool calling. Some models reject a forced tool call with
311311
HTTP 400 (`tool_choice: type "tool" and "any" are not supported for this
312312
model`). The `anthropic` and `anthropic_proxy` providers route those models
313-
(`claude-fable-5-1`, `claude-mythos-5-1`, or any registry entry with
314-
`structured_output: json_schema`) to the native JSON-schema response format.
313+
(`claude-opus-5-5`, `claude-sonnet-5-5`, `claude-fable-5-1`, `claude-mythos-5-1`,
314+
or any registry entry with `structured_output: json_schema`) to the native
315+
JSON-schema response format.
315316
Bedrock has no JSON-schema output for them, so the `bedrock` provider leaves
316317
`toolChoice` at `auto`, asks for the tool call in the prompt, and retries a
317318
prose answer; it recognises the model from the model ID, a geo/global
@@ -321,6 +322,12 @@ registry (`SKILLSPECTOR_MODEL_REGISTRY`) with `tool_choice: auto`.
321322
The `openai_compatible` provider honours the same `tool_choice: auto` entry
322323
for endpoints that ignore both `response_format` and a forced `tool_choice`
323324
and answer in prose (for example iFlytek's `spark-x2.5`, which is bundled).
325+
The `anthropic`, `anthropic_proxy`, `openai`, and `openai_compatible` providers
326+
also recognise those Claude models inside gateway model IDs such as
327+
`anthropic/claude-opus-5-5` or `aws/anthropic/bedrock-claude-opus-5-5`. Some
328+
OpenAI-compatible gateways turn a `json_schema` response format for Claude into
329+
a forced tool call, so the `openai` and `openai_compatible` providers bind the
330+
schema as a tool with `tool_choice` left at `auto` and retry a prose answer.
324331
`SKILLSPECTOR_STRUCTURED_OUTPUT_METHOD=json_schema|function_calling`
325332
overrides the method for any provider.
326333
The method precedence is `SKILLSPECTOR_STRUCTURED_OUTPUT_METHOD`, the provider's
@@ -354,10 +361,11 @@ export SKILLSPECTOR_PROVIDER=bedrock
354361
# boto3 credential chain (env vars, instance metadata, SSO, etc.) resolves.
355362
# export AWS_PROFILE=my-profile
356363
export AWS_REGION=us-west-2 # default if unset
357-
# Default model: us.anthropic.claude-sonnet-4-6-20250915-v1:0
364+
# Default model: us.anthropic.claude-sonnet-4-6
358365
# Override with any Bedrock model ID, cross-region inference-profile
359-
# ID, or your own application-inference-profile ARN:
360-
# export SKILLSPECTOR_MODEL=us.anthropic.claude-opus-4-6-20250915-v1:0
366+
# ID, or your own application-inference-profile ARN. Claude 5.5 is opt-in:
367+
# us./eu. profiles keep requests in that geography, global. routes worldwide.
368+
# export SKILLSPECTOR_MODEL=us.anthropic.claude-sonnet-5-5
361369
skillspector scan ./my-skill/
362370

363371
# NVIDIA build.nvidia.com
@@ -724,12 +732,12 @@ Issues (2)
724732
| `GOOGLE_CLOUD_LOCATION` | Google Cloud location for the `gemini` provider endpoint (e.g. `global`, `us`, `eu`, `us-central1`). Defaults to `global`. | Optional (used when `SKILLSPECTOR_PROVIDER=gemini`) |
725733
| `GOOGLE_APPLICATION_CREDENTIALS` | Optional path to ADC credential/config file (e.g. Workload or Workforce Identity Federation config; exported service account keys are discouraged). For local development, use `gcloud auth application-default login`; for GKE, use Workload Identity. | Optional (used when `SKILLSPECTOR_PROVIDER=gemini`) |
726734
| `NVIDIA_INFERENCE_KEY` | Credential for the `nv_build` provider (build.nvidia.com). | Required for LLM analysis when `SKILLSPECTOR_PROVIDER=nv_build` |
727-
| `OPENAI_API_KEY` | Credential for the OpenAI provider (`SKILLSPECTOR_PROVIDER=openai`). Also serves as the tier-2 fallback in the credential waterfall when the active provider returns no credentials. | Required for LLM analysis when `SKILLSPECTOR_PROVIDER=openai` |
735+
| `OPENAI_API_KEY` | Credential for the OpenAI provider (`SKILLSPECTOR_PROVIDER=openai`). Also serves as the tier-2 fallback in the credential waterfall when the active provider returns no credentials; the fallback then uses the `openai` default model (`gpt-6.1-sol`) for any slot without a model override. Claude Opus or Sonnet 5.5 gateway IDs are not supported through the fallback, because it keeps the active provider's structured-output method; select `SKILLSPECTOR_PROVIDER=openai` for them. | Required for LLM analysis when `SKILLSPECTOR_PROVIDER=openai` |
728736
| `OPENAI_BASE_URL` | Override the OpenAI endpoint (e.g. point at Ollama). | Optional |
729-
| `SKILLSPECTOR_REASONING_EFFORT` | Optional provider- and model-dependent reasoning-effort setting. Non-empty values are trimmed and passed through unchanged. When unset or blank, SkillSpector sends `high` for `nv_build` with `z-ai/glm-5.3`; other provider/model combinations keep their endpoint defaults. | Optional |
737+
| `SKILLSPECTOR_REASONING_EFFORT` | Optional provider- and model-dependent reasoning-effort setting. Non-empty values are trimmed and passed through unchanged. When unset or blank, SkillSpector sends `high` for `nv_build` with `z-ai/glm-5.3`; other provider/model combinations keep their endpoint defaults (`medium` for `gpt-6.1-sol` and `claude-opus-5-5`, `high` for `claude-sonnet-5-5`). The value applies to every model slot, so the `anthropic` `meta_analyzer` default receives the same effort as the analyzers. `gpt-6.1-sol` accepts only `low`, `medium`, `high`, `xhigh`, or `max`; any other value stops a scan before analysis (exit code 2). | Optional |
730738
| `SKILLSPECTOR_OUTPUT_LANGUAGE` | Short, single-line language label (letters, numbers, spaces, `_`, or `-`; maximum 64 characters) for human-readable LLM finding text such as messages, explanations, and remediation. Rule IDs, severity values, paths, code, and other machine-readable values remain unchanged. Unset, blank, or invalid values preserve the default output language. | Optional |
731-
| `SKILLSPECTOR_TEMPERATURE` | Optional sampling temperature from `0` to `1` for hosted providers. Unset or blank preserves the provider default. Lower values can reduce run-to-run variation but do not guarantee identical output. | Optional |
732-
| `SKILLSPECTOR_SEED` | Optional integer sampling seed for OpenAI-compatible and Azure OpenAI providers. Other hosted providers and CLI providers do not receive it. Provider support remains model-dependent. | Optional |
739+
| `SKILLSPECTOR_TEMPERATURE` | Optional sampling temperature from `0` to `1` for hosted providers. Unset or blank preserves the provider default. Lower values can reduce run-to-run variation but do not guarantee identical output. `gpt-6.1-sol` rejects every explicit temperature, including `1`. `claude-opus-5-5` and `claude-sonnet-5-5` accept only `1.0` on the native Anthropic endpoint ([API compatibility rule](https://platform.claude.com/docs/en/api/messages/create)); gateways, proxies, and Bedrock still reject every explicit value for these models. Unsupported settings on active LLM slots stop a scan before analysis (exit code 2). Static scans (`--no-llm`) skip provider initialization and control validation. A Bedrock application-inference-profile ARN hides the model name, so declare `sampling: rejected` for it in the model registry. With the previous `gpt-5.4` and `claude-opus-4-6` defaults a temperature was accepted; unset it, or pin the older model with `SKILLSPECTOR_MODEL`. | Optional |
740+
| `SKILLSPECTOR_SEED` | Optional integer sampling seed for OpenAI-compatible and Azure OpenAI providers. Other hosted providers and CLI providers do not receive it. Provider support remains model-dependent; `gpt-6.1-sol` receives it, but OpenAI treats `seed` as best-effort, so output can still differ between runs. | Optional |
733741
| `SKILLSPECTOR_COMPACT_PROMPTS` | Opt-in compact line numbering in LLM prompts: numbered lines render as `L1:`, `L2:` instead of zero-padded `L01:`, `L02:`. Accepted truthy values are `1`, `true`, and `yes` (case-insensitive; surrounding whitespace is trimmed). Unset or any other value keeps the default zero-padded format. | Optional |
734742
| `ANTHROPIC_API_KEY` | Credential for the Anthropic provider (`SKILLSPECTOR_PROVIDER=anthropic`). | Required for LLM analysis when `SKILLSPECTOR_PROVIDER=anthropic` |
735743
| `ANTHROPIC_BASE_URL` | Override the native Anthropic endpoint (default: `https://api.anthropic.com`). | Optional |
@@ -747,6 +755,7 @@ Issues (2)
747755
| `SKILLSPECTOR_COMPAT_API_KEY` | API key for a generic OpenAI-compatible provider. | Required when `SKILLSPECTOR_PROVIDER=openai_compatible` |
748756
| `SKILLSPECTOR_COMPAT_BASE_URL` | Base URL for a generic OpenAI-compatible provider. | Required when `SKILLSPECTOR_PROVIDER=openai_compatible` |
749757
| `SKILLSPECTOR_MODEL` | Override the active provider model. For hosted providers, this replaces the bundled default from the LLM Analysis table. For CLI providers, this is forwarded as `--model` instead of using the local runtime fallback. | Optional |
758+
| `SKILLSPECTOR_MODEL_<SLOT>` | Override the model for one analyzer slot (for example `SKILLSPECTOR_MODEL_META_ANALYZER`). It takes precedence over `SKILLSPECTOR_MODEL`, which in turn replaces provider slot defaults such as the `anthropic` `meta_analyzer` default. See [model provenance](docs/INFERENCE_USAGE.md#model-provenance) for the full precedence. | Optional |
750759
| `SKILLSPECTOR_MODEL_REGISTRY` | Override the bundled per-provider YAML registry (`src/skillspector/providers/<provider>/model_registry.yaml`) with a custom path. | Optional |
751760
| `SKILLSPECTOR_LOG_LEVEL` | Log level: `DEBUG`, `INFO`, `WARNING`, `ERROR` (default: `WARNING`). | Optional |
752761
| `SKILLSPECTOR_MAX_DEPENDENCY_SOURCE_ANALYSIS_SECONDS` | Ceiling for the dependency-source analysis pass, in seconds. Defaults to `5.0`, which is the historical value. Raise it on slow or heavily loaded machines so the same unchanged tree does not come back partially inspected, which would set `safe_to_install` to false and record `runtime_limit`. The remaining aggregate workflow time (`SKILLSPECTOR_MAX_WORKFLOW_SECONDS`, 600 seconds by default) still caps the effective value; values above that remaining time have no effect. Invalid, zero, negative, infinite, and NaN values keep the 5-second default. The setting is resolved when the module is imported, so a new process is required after changing it. See [analysis resource bounds](docs/ANALYSIS_RESOURCE_BOUNDS.md#configuring-the-dependency-source-deadline). | Optional |

‎docs/DEVELOPMENT.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ make install-dev
3838
- **Provider credential**: depends on the active provider. Hosted providers use the matching variables in [.env.example](../.env.example); Ollama and CLI providers do not require an API key. See [providers/](../src/skillspector/providers/).
3939
- **`OPENAI_BASE_URL`**: Override the OpenAI endpoint (e.g. point at Ollama).
4040
- **`SKILLSPECTOR_MODEL`**: Override default model; see [constants.py](../src/skillspector/constants.py).
41-
- **`SKILLSPECTOR_TEMPERATURE`**: Optional hosted-provider sampling temperature from `0` to `1`.
41+
- **`SKILLSPECTOR_TEMPERATURE`**: Optional hosted-provider sampling temperature from `0` to `1`. `gpt-6.1-sol` rejects every explicit value. `claude-opus-5-5` and `claude-sonnet-5-5` accept only `1.0` on the native Anthropic endpoint; other routes reject every explicit value. Unsupported settings on active LLM slots stop the scan before analysis. Static scans skip provider initialization and control validation.
4242
- **`SKILLSPECTOR_SEED`**: Optional integer seed for OpenAI-compatible and Azure OpenAI providers.
4343

4444
- **Logging**: Internal/operational logging uses the stdlib `logging` module. User-facing output (report body, errors, progress) uses Rich `console.print()`.
@@ -300,9 +300,9 @@ Copy [.env.example](../.env.example) to `.env` in the project root and set value
300300
| `NVIDIA_INFERENCE_KEY` | Credential for `nv_build`. | `nvapi-...` |
301301
| `OPENAI_API_KEY` | Credential for `SKILLSPECTOR_PROVIDER=openai`. Also tier-2 fallback for non-OpenAI providers. | `sk-...` |
302302
| `OPENAI_BASE_URL` | Override the OpenAI endpoint (e.g. point at Ollama). | `http://localhost:11434/v1` |
303-
| `SKILLSPECTOR_REASONING_EFFORT` | Optional provider- and model-dependent reasoning-effort setting. Non-empty values are trimmed and passed through unchanged. When unset or blank, SkillSpector sends `high` for `nv_build` with `z-ai/glm-5.3`; other provider/model combinations keep their endpoint defaults. | `high` |
303+
| `SKILLSPECTOR_REASONING_EFFORT` | Optional provider- and model-dependent reasoning-effort setting. Non-empty values are trimmed and passed through unchanged. When unset or blank, SkillSpector sends `high` for `nv_build` with `z-ai/glm-5.3`; other provider/model combinations keep their endpoint defaults. `gpt-6.1-sol` accepts only `low`, `medium`, `high`, `xhigh`, or `max`; any other value stops a scan before analysis (exit code 2). | `high` |
304304
| `SKILLSPECTOR_OUTPUT_LANGUAGE` | Optional short, single-line language label (letters, numbers, spaces, `_`, or `-`; maximum 64 characters) for human-readable LLM finding text. Rule IDs, severity values, paths, code, and other machine-readable values remain unchanged. Unset, blank, or invalid values preserve the default output language. | `Japanese` |
305-
| `SKILLSPECTOR_TEMPERATURE` | Optional sampling temperature from `0` to `1` for hosted providers. Unset or blank preserves provider defaults. Lower values reduce variation but do not guarantee identical output. | `0` |
305+
| `SKILLSPECTOR_TEMPERATURE` | Optional sampling temperature from `0` to `1` for hosted providers. Unset or blank preserves provider defaults. Lower values reduce variation but do not guarantee identical output. `gpt-6.1-sol` rejects every explicit value. `claude-opus-5-5` and `claude-sonnet-5-5` accept `1.0` on the native Anthropic endpoint only ([API compatibility rule](https://platform.claude.com/docs/en/api/messages/create)). Unsupported settings on active LLM slots stop a scan before analysis (exit code 2); static scans skip provider initialization and these checks. Leave it unset to preserve the default models’ endpoint defaults. | `0` |
306306
| `SKILLSPECTOR_SEED` | Optional integer sampling seed for OpenAI-compatible and Azure OpenAI providers. Provider/model support is best-effort; CLI providers ignore it. | `42` |
307307
| `ANTHROPIC_API_KEY` | Credential for `SKILLSPECTOR_PROVIDER=anthropic`. | `sk-ant-...` |
308308
| `OLLAMA_BASE_URL` | Optional Ollama endpoint override. | `http://localhost:11434/v1` |

‎src/skillspector/cli.py‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
inspection_work_id,
5858
ledger_event,
5959
)
60+
from skillspector.llm_utils import unsupported_control_error
6061
from skillspector.logging_config import get_logger, set_level
6162
from skillspector.mcp_registry import scan_registry
6263
from skillspector.models import OCCURRENCE_FINDING_ID_KEY, Finding
@@ -372,6 +373,16 @@ def _write_result(
372373
print(report_body)
373374

374375

376+
def _exit_on_unsupported_llm_controls(no_llm: bool) -> None:
377+
"""Exit 2 before any analysis when a configured model rejects a requested control."""
378+
if no_llm:
379+
return
380+
error = unsupported_control_error()
381+
if error is not None:
382+
err_console.print(f"[red]Error:[/red] {error}")
383+
raise typer.Exit(code=2)
384+
385+
375386
def _validate_min_coverage(value: float | None) -> float | None:
376387
"""Accept only finite percentage thresholds in the CLI's supported range."""
377388
if value is not None and (not math.isfinite(value) or not 0 <= value <= 100):
@@ -735,6 +746,7 @@ def scan(
735746
except ValueError as exc:
736747
err_console.print(f"[red]Error:[/red] invalid transitive prefix: {exc}")
737748
raise typer.Exit(code=2) from exc
749+
_exit_on_unsupported_llm_controls(no_llm)
738750
yara_dir = str(yara_rules_dir.resolve()) if yara_rules_dir else None
739751
pre_scan_ledger_events: list[dict[str, object]] = []
740752
discovery_console = (
@@ -3450,6 +3462,7 @@ def baseline(
34503462
skillspector baseline ./my-skill/ -o team-baseline.yaml --no-llm
34513463
skillspector scan ./my-skill/ --baseline .skillspector-baseline.yaml
34523464
"""
3465+
_exit_on_unsupported_llm_controls(no_llm)
34533466
result = None
34543467
try:
34553468
if verbose:

0 commit comments

Comments
 (0)