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.5

Published

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

Readme

@nyrra/foundry-ai

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

AI%20SDK npm next Ask DeepWiki TypeScript License

What It Does

  • Routes AI SDK language-model calls and OpenAI embeddings through Foundry's provider-compatible proxy endpoints.
  • Maps friendly model aliases such as gpt-5-mini, claude-sonnet-4.6, and gemini-3.1-flash-lite to Foundry RIDs.
  • Keeps installs lean by exposing provider-specific subpaths and optional peer dependencies.
  • Ships a TanStack Intent skill for provider-specific setup and troubleshooting.

Install

Install ai, this package, and only the provider peer dependency you need:

pnpm add @nyrra/foundry-ai ai @ai-sdk/openai
pnpm add @nyrra/foundry-ai ai @ai-sdk/anthropic
pnpm add @nyrra/foundry-ai ai @ai-sdk/google

If you use more than one provider, install both peers. For the rationale and bundle-size tradeoffs, see the dependency strategy guide.

Package Identity

The source repository is shpitdev/foundry-ai; the existing npm identity remains @nyrra/foundry-ai. Consumers do not need to change their dependency or imports because of the repository transfer. Releases are published from GitHub Actions with npm provenance.

Agent Skill

Install the published agent skill with:

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

That flow lets the skills CLI prompt for scope and agent links interactively. The install event is what skills.sh uses for leaderboard/indexing. In TanStack Intent consumer repos, install @nyrra/foundry-ai directly, run npx @tanstack/intent@latest list, and map node_modules/@nyrra/foundry-ai/skills/foundry-ai-provider/SKILL.md in your agent config.

Verified Use Case

Use this package when you want local development and deployed server workloads to call secure or private Foundry proxy endpoints instead of public provider endpoints directly.

The verified path today is env-based server usage with FOUNDRY_URL and FOUNDRY_TOKEN. Palantir documents the same proxy family for OSDK and other Foundry-native runtimes, but this package has not yet been validated end to end in Palantir TSv1 or TSv2 standalone functions or PlatformClient-driven fetch flows.

Quick Start

FOUNDRY_URL=https://your-stack.palantirfoundry.com
FOUNDRY_TOKEN=your-token
FOUNDRY_ATTRIBUTION_RID=
FOUNDRY_TRACE_PARENT=
FOUNDRY_TRACE_STATE=
import { loadFoundryConfig } from '@nyrra/foundry-ai';
import { createFoundryOpenAI } from '@nyrra/foundry-ai/openai';
import { generateText } from 'ai';

const openai = createFoundryOpenAI(loadFoundryConfig());

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

console.log(result.text);

Provider Surface

  • Root exports config loading, catalog helpers, errors, and model ID types.
  • @nyrra/foundry-ai/openai exports createFoundryOpenAI.
  • @nyrra/foundry-ai/anthropic exports createFoundryAnthropic.
  • @nyrra/foundry-ai/google exports createFoundryGoogle.
  • There is no package-level registry helper. Compose multi-provider routing in application code with AI SDK createProviderRegistry.

Model IDs

  • Use friendly aliases for catalogued models such as gpt-5-mini, claude-sonnet-4.6, and gemini-3.1-flash-lite.
  • Use raw Foundry RIDs when your stack exposes a model that is not yet in the package catalog.
  • Sunset and deprecated enrollment entries are intentionally excluded from the public alias catalog.
  • getModelMetadata() exposes normalized catalog data for current aliases, including modelIdentifier, inputTypes, trainingCutoffDate, performance, and derived supportsVision / supportsResponses flags.
  • Alias and raw-RID behavior are documented in the model support guide.

Foundry-Specific Behavior

  • OpenAI traffic always uses Foundry-safe compatibility defaults where required.
  • providerOptions.openai.store=true throws before the request is sent.
  • Known OpenAI reasoning aliases automatically get providerOptions.openai.forceReasoning=true unless the caller already set it.
  • The Google adapter rewrites the AI SDK's x-goog-api-key auth into the bearer-token header that Foundry expects.
  • OpenAI embeddingModel() and embedding() provide typed aliases for text-embedding-3-small and text-embedding-3-large, while other plain OpenAI model strings pass through unchanged. Embeddings do not use Foundry RID routing. Other embedding providers and image, audio, video, and rerank methods are not exposed.

Docs And Examples

Testing And CI

| Layer | Present | Tooling | Runs in CI | |---|---|---|---| | unit | yes | Vitest | yes | | integration | no | none | no | | e2e api | yes | live Vitest suite + manual example scripts against Foundry | no | | e2e web | no | none | no |

CI runs lint, unit tests, typecheck, build, TanStack Intent skill validation, and a package-content audit. The harness matrix remains manual through pnpm test:live.

Copyright And License

Copyright 2026 SHPIT LLC

Licensed under Apache-2.0. See the license and notice.