본문으로 건너뛰기
TakoAPI
스킬로 돌아가기

litellm

ishaan-jaff 제작

Coding Agents & IDEs
1.3kclawskills.sh가 보고한 다운로드 수
1스타
0조회수
좋아요 0개로그인하면 이 스킬에 좋아요를 누를 수 있습니다
—아직 평가 없음
내 평가

요약

Call 100+ LLM providers through LiteLLM's unified API.

설명

이 스킬이 하는 일

LiteLLM provides a unified Python API to call 100+ LLM providers using the same interface. It handles routing, so you can switch between OpenAI, Anthropic, Google, and others without rewriting call logic. A proxy mode adds caching, rate limiting, and observability on top.

Instead of maintaining separate SDK integrations for each provider, one call signature works across all of them.

사용 시점

  • Route code review tasks to GPT-4o while running on Claude
  • Compare outputs from three models on the same prompt
  • Switch to gpt-4o-mini for simple classification to cut costs
  • Access Gemini or Mistral from a runtime that only supports OpenAI format
  • Point all LLM calls through a shared proxy for usage tracking

예시 워크플로

입력

User asks: compare how GPT-4o and Claude answer 'What is the best sorting algorithm?'

에이전트
  1. 1

    Import litellm and define the prompt as a messages list

  2. 2

    Loop over ["gpt-4o", "claude-sonnet-4-20250514"]

  3. 3

    Call litellm.completion(model=model, messages=prompt) for each

  4. 4

    Extract response.choices[0].message.content from each result

  5. 5

    Print each model name alongside its response

출력

Side-by-side text outputs from GPT-4o and Claude for the same question

요구 사항

  • OPENAI_API_KEY environment variable (for OpenAI models)
  • ANTHROPIC_API_KEY environment variable (for Anthropic models)

설치

clawhub install ishaan-jaff/litellm

CLI 명령을 실행하거나, 프롬프트를 Claude Code, Cursor, Codex 등 사용하는 코딩 에이전트에 붙여넣으세요.

링크