Works with the AI Agents 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

    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.

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

    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 use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    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 29 days ago

    • Passed all security checks, Safe to install

    Requires

    Python

    Listed29 days ago

    What's inside

    Frequently Asked Questions