llm-integration

Solid

Use when integrating an LLM API into an application. Covers streaming, retries and rate limits, timeouts, caching, fallback across providers, and the production concerns that a tutorial integration ignores.

AI & Automation 23 stars 2 forks Updated today MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
46
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# LLM Integration ## Purpose Integrate a language model into a production application, where the API is slow, rate-limited, occasionally down, and billed per token — none of which the quickstart mentions. ## When to Use - Adding an LLM to a production application. - An LLM feature that is slow, expensive, or unreliable. - Handling rate limits, streaming, or provider failover. - Deciding where the model call belongs in the architecture. ## Capabilities - Streaming responses and partial rendering. - Retry, backoff, and rate-limit handling. - Timeouts and cancellation. - Prompt caching and response caching. - Multi-provider fallback. - Token accounting and cost control. ## Inputs - The feature, its latency budget, and its cost budget. - The provider's rate limits and their actual behavior under load. - Whether the output is user-facing (stream it) or machine-consumed (do not). ## Outputs - A client with retries, timeouts, and a circuit breaker. - Streaming where a user is waiting. - Cost and latency instrumented per call. ## Workflow 1. **Stream anything a human waits for** — A 12-second response that starts rendering at 400ms feels fast. The same response delivered at once feels broken. Streaming is a perceived-latency fix, not a throughput one. 2. **Handle rate limits properly** — Honor `Retry-After`. Exponential backoff with jitter. A retry storm against a rate-limited endpoint extends the outage. 3. **Set a timeout** — LLM calls can hang. An unbounded call holds ...

Details

Author
nimadorostkar
Repository
nimadorostkar/Claude-Skills-collection
Created
1 weeks ago
Last Updated
today
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

add-llm-fallbacks

Use this to make an LLM app resilient to provider failures, rate limits, timeouts, and outages. Trigger on "handle LLM API errors", "add retries/fallbacks", "the app breaks when OpenAI is down", "rate limit errors", "make my LLM calls reliable", "timeout handling". Add retries, timeouts, and model/provider fallbacks, and observe them so failures are visible.

26 Updated today
ContextJet-ai
AI & Automation Featured

llm-provider

Adds a new LLM provider implementing LLMProvider interface with call() and stream() methods. Integrates with provider factory in src/llm/index.ts, config detection in src/llm/config.ts, and error handling via tracking and recovery. Use when adding a new model backend, integrating a third-party LLM API, or extending LLM platform support. Do NOT use for fixing bugs in existing providers, modifying existing provider behavior, or changing the LLMProvider interface.

1,223 Updated yesterday
caliber-ai-org
AI & Automation Listed

llm-patterns

LLM application patterns for evaluation, streaming, and testing. Evaluation: LLM-as-judge, multi-dimension scoring, hallucination detection, Langfuse integration. Streaming: SSE, FastAPI endpoints, tool calls in streams, backpressure. Testing: mocking LLM responses, VCR.py recording, structured output validation. Use when: evaluating LLM quality, adding streaming, or testing AI features. Triggers on: LLM evaluation, LLM-as-judge, quality gate, streaming responses, SSE, test LLM, VCR, mock LLM

6 Updated today
ArieGoldkin