Use when switching between LLM providers, accessing provider-specific features (Anthropic caching, OpenAI logprobs), or using raw SDK clients - covers multi-provider patterns and direct SDK access for OpenAI, Anthropic, Google, and Ollama
Detected risks:
The `providers` skill enables seamless interaction with multiple large language model (LLM) providers within a unified framework. It simplifies the process of switching between providers, accessing provider-specific features, and using raw SDK clients directly. By abstracting provider initialization and configuration, it eliminates the complexity of managing multiple API keys, SDK versions, and provider-specific workflows, making multi-provider integration straightforward for developers.
Key features of this skill include the `get_provider()` method for obtaining raw SDK clients, automatic provider initialization based on environment variables, and access to provider-specific functionalities such as OpenAI logprobs or Anthropic caching. It supports direct interaction with OpenAI, Anthropic, Google Gemini, and Ollama SDKs, allowing developers to leverage advanced parameters, manage multi-provider patterns, and implement fallback behavior when a provider is unavailable. Providers are automatically configured based on available API keys, and Ollama is always initialized locally by default.
This skill is particularly useful for developers and AI practitioners who need flexibility in using different LLM providers within a single project. It is ideal for building applications that require provider switching, advanced LLM features, or experimental setups with raw SDK access. Target users include Python developers, AI engineers, and teams experimenting with multi-provider strategies, caching mechanisms, or provider-specific capabilities for natural language processing, chatbots, and generative AI applications.
You can use the `get_provider()` method of the `LLMRing` service and access the `.client` attribute of the returned provider object. For example, `service.get_provider("openai").client` gives you the OpenAI SDK client.
The skill supports OpenAI, Anthropic, Google Gemini, and Ollama. Each provider can be accessed through the unified `get_provider()` method.
Providers are initialized automatically if the corresponding environment variables are set. OpenAI requires `OPENAI_API_KEY`, Anthropic requires `ANTHROPIC_API_KEY`, Google can use any of `GOOGLE_GEMINI_API_KEY`, `GEMINI_API_KEY`, or `GOOGLE_API_KEY`. Ollama initializes locally by default without an API key.
Yes, provider-specific features such as OpenAI logprobs, top logprobs, and deterministic sampling are available through the raw SDK client obtained from `get_provider()`.
If a provider is requested but not configured or the API key is missing, the skill raises a `ProviderNotFoundError`.
Quick Setup:
.claude/skills/Repository
juanre/llmring