Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    LLM API Integration Doctor

    2

    Systematic triage for LLM API integration failures, auth errors, rate limits, and streaming bugs.

    $5.99

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    2 installsSecurity scanned
    LLM API Integration Doctor

    LLM API Integration Doctor

    Example session with this skill installed

    My OpenAI integration works locally, but on Vercel I get a 401 error even though I added the API key to the dashboard. The code uses the standard Node SDK.

    • Read your context and instructions
    • Compiled the llm api integration
    • Generated the document

    The 401 error in your Vercel environment is likely due to an environment variable scope mismatch or a malformed key string.

    Triage Report: OpenAI 401 Auth Failure

    CategoryFindingAction
    Root CauseEnvironment Variable ScopeVercel keys are environment-specific. A key added for 'Development' is not available to 'Production' or 'Preview' by default.
    EvidenceWorks locally but fails deployedThe code is correct, but the runtime environment cannot see the OPENAI_API_KEY.
    Primary FixUpdate Vercel DashboardGo to Project Settings > Environment Variables. Ensure the OPENAI_API_KEY has all boxes checked: Production, Preview, and Development.
    Secondary FixKey SanitationCheck for a trailing newline or invisible space in the value field, which OpenAI's SDK often rejects.
    FallbackSDK InitializationIf vars are correct, ensure you are calling new OpenAI({ apiKey: process.env.OPENAI_API_KEY }) and not relying on implicit loading which can fail in edge runtimes.

    Next steps

    1. Re-deploy the Vercel project after updating the environment variable scopes to trigger a fresh build.
    2. Check the Vercel Function logs to see if process.env.OPENAI_API_KEY is undefined at runtime.
    3. Verify that you aren't hitting a project-level usage limit on a new OpenAI account.

    llm-api-integration-doctor.pdf

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    What you get

    Resolve 401/403 auth errors in serverless deployment environments.Fix malformed JSON responses caused by hidden token limit truncations.Debug streaming connections that fail mid-response on edge runtimes.Implement robust retry logic and concurrency caps to eliminate 429 errors.

    About this skill

    The problem

    LLM API calls are notoriously brittle. You are facing silent 401s, 429 rate limit storms, truncated JSON responses, or streaming connections that work in local dev but hang indefinitely once deployed to Vercel or AWS.

    What it does

    • Triages auth failures by verifying environment variable parity between local and production runtimes.
    • Identifies token overflow and truncation causes by analyzing max_tokens settings and model stop reasons.
    • Debugs streaming bottlenecks, specifically catching buffered chunks and serverless execution timeouts.
    • Optimizes request patterns to handle rate limits using exponential backoff instead of fixed-retry loops.

    Frameworks & tools

    Works with Node.js, Python, and serverless environments calling Anthropic, OpenAI, Groq, Gemini, or OpenRouter via SDKs or raw HTTP.

    Why this beats prompting it yourself

    Generic LLM debugging often misses infrastructure-level failures like serverless cold-start timeouts or key-format mismatches. This skill uses a specialized protocol to isolate whether a failure is transport, auth, or dependency-related before looking at the code.

    Use cases

    • Fixing 'Works on my machine' deployment errors in Vercel or Cloudflare Workers.
    • Resolving intermittent JSON parsing errors caused by token limit truncation.
    • Diagnosing why a streaming UI appears to hang despite the API returning data.
    • Implementing proper concurrency caps to prevent 429 errors during batch processing.

    Known limitations

    This skill does not debug prompt quality or 'hallucinations.' It requires access to the API call site code and environment configuration to be effective.

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    2 installs

    Downloaded by developers to date

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 15 days ago

    • Passed all security checks, Safe to install

    Listed15 days ago
    Updated4 days ago

    What's inside

    Frequently Asked Questions