Repository navigation
Description
Summary
With an OpenAI-compatible endpoint that does not implement response_format: {"type": "json_schema"} (DeepSeek in this case), every LLM analyzer request is rejected with HTTP 400, so the LLM stage silently degrades to static-only while the report still says llm_available: true.
Environment
- skillspector 2.12.0 (installed from git, current main)
- Python 3.12.3
SKILLSPECTOR_PROVIDER=openai_compatibleSKILLSPECTOR_COMPAT_BASE_URL=https://api.deepseek.com/v1- model
deepseek-flash - Also reproduced with
SKILLSPECTOR_PROVIDER=openai+OPENAI_BASE_URL=https://api.deepseek.com/v1
Symptom
WARNING [skillspector.llm_analyzer_base] LLM_REQUEST_FAILURE {"configured_output_cap": 32000, "error_class": "BadRequestError", "message_class": "request_rejected", "provider_code": "invalid_request_error", "status_code": 400}
WARNING [skillspector.llm_analyzer_base] LLM batch failed for File: SKILL.md (OpenAIInvalidRequestError)
WARNING [skillspector.nodes.report] LLM stage degraded: semantic runtime telemetry was incomplete; report may reflect static analysis only
Report metadata after the run:
{
"llm_requested": true,
"llm_available": true,
"inference_usage": [],
"analysis_completeness": { "status": "failed", "scanned_components": 0, "coverage_percent": 0 },
"risk_assessment": { "score": 0, "severity": "LOW", "recommendation": "CAUTION" }
}Root cause (captured from the wire)
The request body sent by the analyzers contains:
"response_format": {
"type": "json_schema",
"json_schema": { "name": "_TP4AnalysisResult", "strict": true, "schema": { } }
}DeepSeek rejects that: {"error":{"message":"This response_format type is unavailable now","type":"invalid_request_error","code":"invalid_request_error"}}.
Direct probes against the same endpoint:
| Request feature | Result |
|---|---|
response_format: json_schema (strict: true) |
400 |
response_format: json_schema (strict: false) |
400 |
response_format: json_object |
200 |
tools + tool_choice: auto |
200 |
max_completion_tokens: 32000 |
200 |
temperature / seed / reasoning_effort |
200 |
So JSON-Schema response format is the only incompatible feature; tool calling works.
Contradiction with the documented behaviour
providers/structured_output.py says:
the
openaiandopenai_compatibleproviders bind the schema as a tool withtool_choiceleft atautoand ask for the call in the prompt
Observed wire payload uses response_format: json_schema instead, which is what makes any compat endpoint without JSON-schema support unusable.
Attempted workaround
SKILLSPECTOR_STRUCTURED_OUTPUT_METHOD=function_calling was set for the run; the same 6/6 batch failures (HTTP 400) occurred and inference_usage stayed empty.
Impact
- Compatible-but-not-identical gateways (DeepSeek, and likely other OpenAI-compatible servers) cannot use the LLM stage at all.
- The failure is not surfaced as an error: the risk score falls back to
0 / LOW / CAUTIONwhilellm_availablereportstrue. That reads as a clean result for a skill that was never analysed.
Expected
- Bind structured output with tool calling for
openai_compatible(and foropenaiwhen a custombase_urlis used), matching the documented behaviour. - Or detect a
response_formatrejection and retry with tool binding. - Or fail loudly:
llm_available: falseplus a clear error, rather than an apparent LOW-risk result withllm_available: trueandinference_usage: [].
Reproduction
export SKILLSPECTOR_PROVIDER=openai_compatible
export SKILLSPECTOR_COMPAT_BASE_URL=https://api.deepseek.com/v1
export SKILLSPECTOR_COMPAT_API_KEY=...
export SKILLSPECTOR_MODEL=deepseek-flash
skillspector scan ./some-skill --format json --output report.json
# every analyzer batch returns 400; report shows llm_available true, inference_usage []
Activity
Varshith-Kali commentedon Nov 11, 2026
Working on a fix for this. The OpenAI-compatible path should fall back to tool calling when a gateway rejects the json_schema response_format, and fail loudly (llm_available: false with a surfaced error) instead of reporting a clean-looking LOW-risk result when structured output is unavailable. Will open a PR against main once the fix and regression tests are ready.
fix(analyzer): fall back to unforced tool calling when a gateway reje…