@encorp.ai/llm-open-proxy — OpenAI-canonical chat translator for LLM providers.
Three layers of API, pick whatever fits:
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.
@encorp.ai/llm-open-proxy — OpenAI-canonical chat translator for LLM providers.
Three layers of API, pick whatever fits:
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');
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';
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';