@encorp.ai/llm-open-proxy - v0.2.2
    Preparing search index...

    Type Alias ContentPart

    ContentPart:
        | { type: "text"; text: string }
        | {
            type: "image_url";
            image_url: { url: string; detail?: "low" | "high" | "auto" };
        }

    @encorp.ai/llm-open-proxy — OpenAI-canonical chat translator for LLM providers.

    Three layers of API, pick whatever fits:

    1. Pure conversion — give it a canonical request + a provider name, get back a provider-shaped body. No HTTP, no I/O. Best for users who already have their own transport.

      import { convertChatRequest } from '@encorp.ai/llm-open-proxy'; const { body, warnings } = convertChatRequest(canonical, 'anthropic');

    2. Transport — convenience wrappers that handle HTTP + response translation. Returns the response in canonical (OpenAI) shape regardless of the upstream.

      import { sendChatRequest, // OpenAI-shaped providers (openai/google/...) sendAnthropicRequest, // Anthropic-shaped provider } from '@encorp.ai/llm-open-proxy';

    3. Tree-shakeable submodules — import a single provider's adapter when you only care about one upstream:

      import { anthropicChatConfig, toAnthropicRequest } from '@encorp.ai/llm-open-proxy/providers/anthropic';