@ap3x/ai
v0.1.0
Published
Unified multi-provider LLM API (OpenAI, Anthropic, Google, Bedrock, Mistral, …)
Readme
@ap3x/ai
One typed interface over many LLM providers: streaming, tool calling, and a shared model catalog, so provider choice stays a config value rather than a rewrite.
Part of AP3X — a TypeScript multi-agent framework.
Install
npm install @ap3x/aiWhat's inside
- Providers — OpenAI (completions + responses), Anthropic, Google, Amazon Bedrock, Azure OpenAI, GitHub Copilot, OpenRouter, Vercel AI Gateway, Mistral, and more.
- Streaming — incremental text and tool-call deltas with partial-JSON recovery.
- Tool calling — TypeBox schemas in, validated and coerced arguments out, with provider-specific tool-call id rules handled in one place.
- Auth — API keys from the environment, plus OAuth device/browser flows for subscription backends.
- Model catalog —
MODELS/getModelwith generated per-provider catalogs and a runtime refresh seam. - Transport — retry, timeout, and proxy handling shared across providers.
Documentation
See the AP3X repository for architecture notes, the full package map, and examples.
License
MIT
