Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Anthropic provider fails on all semantic analyzers: endpoint rejects JSON Schema minimum/maximum keywords #66

Description

@harvinderbm

With SKILLSPECTOR_PROVIDER=anthropic, every LLM-backed analyzer fails with a 400 and falls back, so semantic analysis silently degrades to static-only.

export SKILLSPECTOR_PROVIDER=anthropic
export ANTHROPIC_API_KEY=sk-ant-**
skillspector scan ./tests/fixtures/safe_skill --verbose

WARNING [skillspector.nodes.analyzers.semantic_quality_policy] semantic_quality_policy failed:
Error code: 400 - {'error': {'code': 'invalid_request_error',
'message': "For 'integer' type, property 'minimum' is not supported", ...}}

After fixing the integer field, the same error recurs for 'number' ("properties maximum, minimum are not supported"), and again separately in nodes.meta_analyzer (LLM call failed, using fallback).

Cause

The structured-output / tool schemas are generated from Pydantic models using Field(ge=..., le=...). Pydantic serializes these to JSON Schema minimum/maximum, which the Anthropic provider's endpoint rejects on integer/number types, 400-ing the whole request.
Affected fields:

src/skillspector/llm_analyzer_base.py:64 — start_line: int = Field(ge=1, ...)
src/skillspector/llm_analyzer_base.py:66 — confidence: float = Field(ge=0.0, le=1.0, ...)
src/skillspector/nodes/meta_analyzer.py:66 — confidence: float = Field(ge=0.0, le=1.0, ...)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions