How to Configure LLM Providers Like OpenAI, Anthropic, and NVIDIA for SkillSpector's Semantic Analysis

Set the SKILLSPECTOR_PROVIDER environment variable to openai, anthropic, anthropic_proxy, or nv_build, export the corresponding API key, and run skillspector scan to enable LLM-powered semantic analysis.

SkillSpector, NVIDIA's open-source skill analysis framework, uses a pluggable LLM provider architecture that lets you select which inference service powers its optional semantic analysis stage. By configuring a few environment variables, you can route LLM calls through OpenAI, Anthropic, or NVIDIA's inference endpoints without modifying any source code.

Understanding the Provider Resolution Flow

The configuration logic lives in src/skillspector/providers/__init__.py, where the _select_active_provider() function reads SKILLSPECTOR_PROVIDER and returns the appropriate implementation. When you execute skillspector scan, the CLI invokes create_chat_model() from the active provider to instantiate a LangChain BaseChatModel client.

The resolution follows five distinct steps:

  1. Select provider – SKILLSPECTOR_PROVIDER determines the backend; if omitted, the code defaults to nv_build.
  2. Resolve credentials – The provider's resolve_credentials() method returns (api_key, base_url) or None if environment variables are missing.
  3. Pick model – resolve_model() checks SKILLSPECTOR_MODEL, then per-slot defaults, then the provider's DEFAULT_MODEL.
  4. Create chat model – create_chat_model() builds the concrete LangChain client with token budgets and timeouts.
  5. Run LLM analysis – Unless --no-llm is passed, the meta_analyzer node calls the model to evaluate skill descriptions and code snippets.

If the selected provider lacks credentials, the system falls back to the stock OpenAI provider.

Configuring OpenAI

The OpenAI provider is implemented in src/skillspector/providers/openai/provider.py. It constructs a ChatOpenAI instance using credentials from your environment.

  • Environment variables: OPENAI_API_KEY (required), OPENAI_BASE_URL (optional)
  • Default endpoint: api.openai.com (or any OpenAI-compatible URL)
  • Default model: gpt-5.4

To route traffic to a local Ollama server or another OpenAI-compatible proxy, export OPENAI_BASE_URL before running the scan:

export SKILLSPECTOR_PROVIDER=openai
export OPENAI_API_KEY=sk-your-key-here
export OPENAI_BASE_URL=http://localhost:11434/v1
skillspector scan ./my-skill/

Configuring Anthropic

The Anthropic provider resides in src/skillspector/providers/anthropic/provider.py and instantiates a ChatAnthropic client.

  • Environment variable: ANTHROPIC_API_KEY
  • Default endpoint: https://api.anthropic.com
  • Default model: claude-opus-4-6
  • Meta-analyzer model: claude-sonnet-4-6 (cheaper variant for secondary analysis)
export SKILLSPECTOR_PROVIDER=anthropic
export ANTHROPIC_API_KEY=sk-ant-your-key-here
skillspector scan ./my-skill/

Configuring Anthropic Proxy for Corporate Gateways

For environments requiring a Vertex-AI-style proxy or corporate gateway, use the anthropic_proxy provider implemented in src/skillspector/providers/anthropic_proxy/provider.py. This provider rewrites Anthropic SDK requests to a custom endpoint using a custom httpx transport.

  • Environment variables: ANTHROPIC_PROXY_API_KEY, ANTHROPIC_PROXY_ENDPOINT_URL
  • Default model: claude-sonnet-4-6
  • Version header: Injects anthropic_version: vertex-2023-10-16 by default
export SKILLSPECTOR_PROVIDER=anthropic_proxy
export ANTHROPIC_PROXY_ENDPOINT_URL=https://gateway.example.com/models/claude-sonnet-4-6:streamRawPredict
export ANTHROPIC_PROXY_API_KEY=bearer-token-xyz
export SKILLSPECTOR_MODEL=claude-sonnet-4-6
skillspector scan ./my-skill/

Configuring NVIDIA Build

The NVIDIA Build provider in src/skillspector/providers/nv_build/provider.py connects to the NVIDIA inference gateway for high-throughput scenarios.

  • Environment variable: NVIDIA_INFERENCE_KEY
  • Endpoint: https://integrate.api.nvidia.com/v1 (fixed)
  • Default model: deepseek-ai/deepseek-v4-flash
  • Meta-analyzer model: deepseek-ai/deepseek-v4-pro (overrides the default for the meta slot)
export SKILLSPECTOR_PROVIDER=nv_build
export NVIDIA_INFERENCE_KEY=nvapi-your-key-here
skillspector scan ./my-skill/

Environment Variable Reference

Provider Provider Key Credential Variables Default Model
OpenAI openai OPENAI_API_KEY, optional OPENAI_BASE_URL gpt-5.4
Anthropic anthropic ANTHROPIC_API_KEY claude-opus-4-6
Anthropic Proxy anthropic_proxy ANTHROPIC_PROXY_API_KEY, ANTHROPIC_PROXY_ENDPOINT_URL claude-sonnet-4-6
NVIDIA Build nv_build NVIDIA_INFERENCE_KEY deepseek-ai/deepseek-v4-flash

Override any default model by setting SKILLSPECTOR_MODEL before invoking the CLI. Context-window sizes and max-output limits are read from the bundled model_registry.yaml.

Disabling LLM Analysis

To run SkillSpector without semantic analysis, pass the --no-llm flag. This prevents the CLI from invoking create_chat_model() and skips the meta_analyzer node entirely, running only static code analysis.

skillspector scan ./my-skill/ --no-llm

Summary

  • Pluggable architecture: SkillSpector selects providers via SKILLSPECTOR_PROVIDER and loads implementations from src/skillspector/providers/__init__.py.
  • Four supported backends: OpenAI, Anthropic, Anthropic Proxy, and NVIDIA Build each require specific API key environment variables.
  • Model override: Use SKILLSPECTOR_MODEL to switch models without changing providers.
  • Fallback behavior: If SKILLSPECTOR_PROVIDER is unset, the system defaults to nv_build; if credentials are missing, it falls back to OpenAI.
  • Per-slot models: The meta-analyzer uses distinct models (e.g., claude-sonnet-4-6 or deepseek-v4-pro) separate from the main analysis model.

Frequently Asked Questions

What happens if I don't set SKILLSPECTOR_PROVIDER?

If the environment variable is omitted, the resolution logic in src/skillspector/providers/__init__.py defaults to the nv_build provider. You must still export NVIDIA_INFERENCE_KEY for the scan to proceed with LLM analysis.

Can I use a local LLM server like Ollama?

Yes. Configure the openai provider and point OPENAI_BASE_URL to your local endpoint. The provider treats any OpenAI-compatible API as a valid backend, allowing you to use Ollama, vLLM, or other local inference servers.

Why does SkillSpector use different models for the meta-analyzer?

The tool optimizes cost and latency by using cheaper, faster models (e.g., claude-sonnet-4-6 or deepseek-v4-pro) for the meta-analyzer slot while reserving larger models (e.g., claude-opus-4-6) for primary semantic analysis. These per-slot overrides are hardcoded in each provider's resolve_model() logic.

How does the Anthropic proxy provider handle authentication?

The anthropic_proxy provider reads ANTHROPIC_PROXY_API_KEY and ANTHROPIC_PROXY_ENDPOINT_URL, then injects the anthropic_version header (defaulting to vertex-2023-10-16) into requests via a custom httpx transport. This allows compatibility with GCP Vertex AI and corporate gateways that rewrite standard Anthropic API paths.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →