model-selection

Community

Choose the best LLM, optimize cost and performance.

Authorricardoroche
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill guides the complex process of selecting and managing LLM models and providers, addressing challenges like cost overruns, performance bottlenecks, and vendor lock-in. It ensures optimal model choice for specific tasks, improves reliability through fallbacks, and helps control operational expenses.

Core Features & Use Cases

  • Model Registry: Centralizes metadata for various LLMs (Anthropic, OpenAI, Google), including capabilities, pricing, and recommended use cases.
  • Model Router: Implements logic to dynamically route prompts to the most appropriate model based on task complexity, length, or specific requirements.
  • Fallback Chain: Provides patterns for implementing robust fallback mechanisms, ensuring continuous service even if a primary model or provider fails.
  • Cost Optimization: Offers tools to estimate and analyze LLM costs, helping identify the cheapest model for a given task and compare expenses across different models.
  • Use Case: An LLM application needs to handle diverse user requests, from simple Q&A to complex code generation. This skill helps implement a ModelRouter to send simple queries to a fast, cheap model (e.g., Haiku) and complex requests to a flagship model (e.g., Sonnet), while a FallbackChain ensures resilience.

Quick Start

Set up a ModelRegistry with Claude Sonnet and Haiku models, including their capabilities and pricing.

Dependency Matrix

Required Modules

pydantic

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: model-selection
Download link: https://github.com/ricardoroche/ricardos-claude-code/archive/main.zip#model-selection

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository