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

@nyrra/foundry-ai

v0.0.8

Published

Thin Palantir Foundry provider adapters and model catalog for the Vercel AI SDK.

Readme

@nyrra/foundry-ai

Use Vercel AI SDK language models, OpenAI embeddings, and realtime audio through Palantir Foundry's proxy endpoints.

Install

Install only the provider peers you use:

pnpm add @nyrra/foundry-ai ai@7 @ai-sdk/openai@4

Use @ai-sdk/anthropic for Claude and @ai-sdk/google for Gemini. Use @ai-sdk/xai@4 for Grok; third-party models use @ai-sdk/openai. Use stable AI SDK 7 with provider v4 for new integrations. AI SDK 6/provider v3 and the late SDK 7 beta line from 7.0.0-beta.187 remain compatible, but the current live survey uses stable SDK 7.

Configure and call a model

Set FOUNDRY_URL and FOUNDRY_TOKEN in your server environment. Optional variables are FOUNDRY_ATTRIBUTION_RID, FOUNDRY_TRACE_PARENT, and FOUNDRY_TRACE_STATE. Keep server tokens out of browser code.

import { loadFoundryConfig } from '@nyrra/foundry-ai';
import { createFoundryOpenAI } from '@nyrra/foundry-ai/openai';
import { generateText } from 'ai';

const openai = createFoundryOpenAI(loadFoundryConfig());
const { text } = await generateText({
  model: openai('gpt-5-mini'),
  prompt: 'Reply in one sentence.',
});
console.log(text);

For explicit configuration, pass { foundryUrl, token } to the factory. Other factories are createFoundryAnthropic, createFoundryGoogle, createFoundryXai, and createFoundryThirdParty, imported from their respective anthropic, google, xai, and third-party subpaths.

Models and test status covers model IDs, routing, known failures, and dated live results. Catalog membership alone does not establish feature support. CI verifies SDK compatibility offline; live Foundry probes are manual.

xAI / Grok

Install @ai-sdk/xai@4 with AI SDK 7 (or @ai-sdk/xai@3 with SDK 6). The xAI subpath does not require the OpenAI peer.

import { createFoundryXai } from '@nyrra/foundry-ai/xai';

const xai = createFoundryXai(loadFoundryConfig());
const model = xai('grok-4-6'); // Defaults to the xAI Responses route.
// Explicit routes: xai.responses('grok-4-6') or xai.chat('grok-4-6').

Grok uses model identity foundry-xai, catalog provider xai, registry prefix xai:, and providerOptions.xai. Both endpoints are beta. See xAI setup and migration and the current Grok results for verified capabilities and remaining gaps.

Embeddings and multiple providers

import { embed } from 'ai';

const { embedding } = await embed({
  model: openai.embeddingModel('text-embedding-3-small'),
  value: 'Text to embed',
});

Compose multiple providers with AI SDK createProviderRegistry; this package exports no registry wrapper. See the runnable examples for registry and tool workflows.

Server environment configuration is the validated runtime path. Palantir TSv1/TSv2 functions and PlatformClient fetch integration have not been verified end to end.

Realtime (AI SDK 7 only)

Use createFoundryRealtime and createFoundryRealtimeSetup from @nyrra/foundry-ai/realtime with gpt-realtime, gpt-realtime-1.5, or gpt-realtime-2. Install ai@7 and @ai-sdk/openai@4; this subpath uses the SDK's experimental realtime interface and does not support SDK 6.

Foundry authenticates WebSockets with the current user's access token. It does not use OpenAI's client-secret endpoint. See realtime setup and live results for the browser flow and the manual test command.

Agent skill

npx skills add https://github.com/shpitdev/foundry-ai --skill foundry-ai-provider

The package also ships the skill at skills/foundry-ai-provider/SKILL.md for TanStack Intent discovery.

Copyright 2026 SHPIT LLC. Apache-2.0.