npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aetheros/provider-openai-compatible

v0.2.0

Published

Adapter for OpenAI-style Chat Completions services (xAI, Mistral, DeepSeek, Groq, OpenRouter, Together, Moonshot Kimi, Z.ai, Perplexity, local models and named custom endpoints) for AetherOS and Aevron.

Readme

@aetheros/provider-openai-compatible

One adapter for services with an OpenAI-style Chat Completions API: xAI, Mistral, DeepSeek, Groq, OpenRouter, Together, Moonshot Kimi, Z.ai (GLM), Perplexity, local models (Ollama, LM Studio, vLLM and similar) and any other compatible endpoint you name yourself.

import {createPreset, createCustom, OpenAICompatibleProvider} from '@aetheros/provider-openai-compatible';
createPreset('xai', {model: '<model id>'});       // XAI_API_KEY
createPreset('mistral', {model: '<model id>'});   // MISTRAL_API_KEY
createPreset('deepseek');                         // DEEPSEEK_API_KEY; DEEPSEEK_MODEL or deepseek-flash
createPreset('local', {model: 'llama3.1'});       // no key; LOCAL_MODEL_URL or http://127.0.0.1:11434/v1
createCustom({id: 'acme-llm', label: 'Acme LLM', baseUrl: 'https://llm.acme.example/v1', keyVar: 'ACME_LLM_KEY', model: 'acme-large'});
new OpenAICompatibleProvider({id: 'my-host', baseUrl: 'https://llm.example.com/v1', apiKey, model});

| Preset | Address | Key variable | Model variable (default) | Effort | PDF | |---|---|---|---|---|---| | xai | https://api.x.ai/v1 | XAI_API_KEY | XAI_MODEL | low, medium, high | no | | mistral | https://api.mistral.ai/v1 | MISTRAL_API_KEY | MISTRAL_MODEL | no | no | | deepseek | https://api.deepseek.com | DEEPSEEK_API_KEY | DEEPSEEK_MODEL (deepseek-flash) | no | no | | groq | https://api.groq.com/openai/v1 | GROQ_API_KEY | GROQ_MODEL (openai/gpt-oss-120b) | low, medium, high | no | | openrouter | https://openrouter.ai/api/v1 | OPENROUTER_API_KEY | OPENROUTER_MODEL (openrouter/auto) | low, medium, high | yes | | together | https://api.together.xyz/v1 | TOGETHER_API_KEY | TOGETHER_MODEL (moonshotai/Kimi-K3) | no | no | | moonshot | https://api.moonshot.ai/v1 | MOONSHOT_API_KEY | MOONSHOT_MODEL (kimi-k3.1-pro) | low, high | no | | zai | https://api.z.ai/api/paas/v4 | ZAI_API_KEY | ZAI_MODEL (glm-5.3) | low, high | no | | perplexity | https://api.perplexity.ai/v1 (route /sonar, no tools) | PERPLEXITY_API_KEY | PERPLEXITY_MODEL (sonar) | no | no | | local | LOCAL_MODEL_URL or http://127.0.0.1:11434/v1 | LOCAL_MODEL_API_KEY (optional) | LOCAL_MODEL | no | no |

  • Effort: the neutral effort (low, medium, high, on the request or its context) is sent as the service's reasoning effort where the table says so; elsewhere, or for a level the service doesn't take, the request is refused with code unsupported before anything is sent. Whether a given model honours it is up to the service.

  • Prompt caching: system prompt first and history in order, so services that cache prompt prefixes can reuse them; cached prompt tokens are reported as usage.cachedInputTokens (part of inputTokens).

  • Documents: {type: 'document', mediaType: 'application/pdf', data, name?} in user messages goes as a file part where the table says yes; otherwise it is refused with code unsupported.

  • Custom providers (createCustom, checked by checkCustomProvider): {id, label, baseUrl, keyVar?, model?, modelVar?, path?, tools?, structuredOutput?, documents?, effort?}. keyVar names the environment variable with the key (never the key itself) and may be left out only for a server on this machine; the address must be https without credentials or a query.

  • Streaming (onEvent), tools and structured output (responseFormat; turn it off with structuredOutput: false for servers without JSON mode).

  • Images: a user message's content may be a list of {type: 'text', text} and {type: 'image', mediaType, data} blocks (base64); images go as image_url data URLs. Assistant messages stay text. Only models that read images can use them (vision in @aetheros/models).

  • https only, except plain http to this machine. Keys never go in the URL and are never logged.

  • Errors carry code, status and retryable for @aetheros/models fallbacks.

  • Tools: function calling through the toolset Aevron hands over, so the host's approval, actor and tenant checks apply. Calls streamed in pieces are put back together, and bad tool input is reported back to the model rather than run. At most 8 tool rounds by default (maxToolRounds). For servers without function calling, pass tools: false.