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

@starroy/ai-ping-core

v1.4.0

Published

Core protocol checks for AI and LLM API endpoints.

Readme

@starroy/ai-ping-core

Reusable protocol checks for AI and LLM API endpoints.

Supported profiles

| Profile | API style | Authentication | Streaming | Alias | | --- | --- | --- | --- | --- | | openai-chat | OpenAI-compatible Chat Completions API | Usually requires an API key | SSE | openai | | openai-responses | OpenAI-compatible Responses API | Usually requires an API key | Semantic SSE events | | | ollama | Ollama local APIs | No API key by default | JSON lines | | | gemini | Gemini Developer API REST | x-goog-api-key | SSE | | | anthropic | Anthropic Claude Messages API | x-api-key + anthropic-version | SSE | |

The OpenAI-compatible Chat Completions profile currently includes:

  • openai-chat.models.list
  • openai-chat.chat.basic
  • openai-chat.chat.stream
  • openai-chat.tool_calls.basic
  • openai-chat.tool_calls.stream
  • openai-chat.error.format

The canonical profile id is openai-chat. The older openai profile id remains supported as a backward-compatible alias. This profile sends Chat Completions-style messages requests and validates choices[].message / choices[].delta responses.

The OpenAI-compatible tool call checks validate modern Chat Completions tools / tool_calls, including streaming delta.tool_calls argument assembly and JSON parsing. They are recommended checks; legacy function_call is detected but does not pass modern tool call compatibility.

The OpenAI-compatible Responses profile currently includes:

  • openai-responses.models.list
  • openai-responses.responses.basic
  • openai-responses.responses.stream
  • openai-responses.error.format

The canonical profile id is openai-responses. It covers POST /responses, sends Responses-style input requests, and validates output, output_text, and semantic streaming events such as response.output_text.delta. It does not check Responses tools, built-in tools, multimodal input, or conversation state in v0.10.

The Ollama profile currently includes:

  • ollama.tags
  • ollama.generate.basic
  • ollama.generate.stream
  • ollama.chat.basic
  • ollama.chat.stream

This covers Ollama native /api/tags, /api/generate, and /api/chat. /api/generate is Ollama's prompt-style native API, while /api/chat is its messages-style native API. For Ollama's OpenAI-compatible /v1/chat/completions, use the openai-chat profile instead.

The Gemini profile currently includes:

  • gemini.models.list
  • gemini.generate.basic
  • gemini.generate.stream
  • gemini.error.format

This covers Gemini Developer API REST endpoints under a base URL such as https://generativelanguage.googleapis.com/v1beta. It uses x-goog-api-key authentication and SSE streaming with Gemini response chunks, not OpenAI delta chunks.

The Anthropic profile currently includes:

  • anthropic.models.list
  • anthropic.messages.basic
  • anthropic.messages.stream
  • anthropic.error.format

This covers Anthropic Claude Messages API endpoints under a base URL such as https://api.anthropic.com/v1. It uses x-api-key and anthropic-version: 2023-06-01. Anthropic streaming is event-based SSE, not OpenAI delta streaming. Tool use, extended thinking, Bedrock Anthropic, and Vertex AI Anthropic are not covered by this profile.

import { runChecks } from "@starroy/ai-ping-core";

const report = await runChecks({
  profile: "openai-chat",
  baseUrl: "http://localhost:3000/v1",
  apiKey: "sk-test",
  model: "gpt-5.5",
});
const report = await runChecks({
  profile: "openai-responses",
  baseUrl: "https://api.openai.com/v1",
  apiKey: process.env.OPENAI_API_KEY,
  model: "gpt-5.1-mini",
});
const report = await runChecks({
  profile: "ollama",
  baseUrl: "http://localhost:11434",
  model: "llama3.2",
});
const report = await runChecks({
  profile: "gemini",
  baseUrl: "https://generativelanguage.googleapis.com/v1beta",
  apiKey: process.env.GEMINI_API_KEY,
  model: "gemini-2.5-flash",
});
const report = await runChecks({
  profile: "anthropic",
  baseUrl: "https://api.anthropic.com/v1",
  apiKey: process.env.ANTHROPIC_API_KEY,
  model: "claude-sonnet-4-5",
});

Ollama does not require an API key. Its streaming responses use JSON lines, not SSE.

runChecks returns a structured report and does not print, write files, set exit codes, or manage UI state. Future CLI and desktop entry points should consume this package instead of reimplementing checks. The CLI can render the same structured report as console, JSON, or a static HTML report with aiping check --html reports/aiping.html.