Works with the AI Agents you already use

    LLM API Integration Doctor

    by Imran Isah

    2

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

    $5.99

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    2 usesSecurity 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

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    2 uses

    Times used to date

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    Software
    Python

    Permissions

    No special permissions declared or detected

    Listed2 months ago

    What's inside

    Frequently Asked Questions

    The Integration Doctor focuses exclusively on the 'plumbing' of your LLM setup—addressing authentication, rate limits, and streaming connectivity—rather than the content of the model's response or prompt engineering.

    Yes, it is specifically designed to troubleshoot infrastructure-specific issues like Vercel timeout limits, Cloudflare Worker constraints, and AWS Lambda execution environments.

    It supports all major providers including OpenAI, Anthropic, Gemini, Groq, and OpenRouter, whether you are using their official SDKs or making raw HTTP requests.

    You will receive the full agent skill protocol, documentation on how to integrate it into your existing workflow, and a guide for preparing your logs for the triage process.

    No, this skill is a diagnostic tool and does not require persistent access to your API keys; it works by analyzing your code structure and environment configurations that you provide.

    While it is highly effective at identifying why a stream is hanging or buffering, it currently supports Node.js and Python environments for these specific streaming diagnostics.

    New in APIs & Backend

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.