
Security News
RubyGems Adds Cooldown Feature to Bundler for Newly Published Gems
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.
@plasius/ai-providers
Advanced tools
Provider adapter contracts and implementations for the Plasius agentic AI package family.
Provider adapter contracts and implementations for the Plasius agentic AI package family.
This package is part of the layered @plasius/ai-* package family. It owns provider adapter descriptors, readiness checks, registry selection, cache/privacy/SLO metadata, and deterministic fake adapters for downstream routing and evaluation tests.
Provider environment resolution is intentionally delegated to @plasius/ai-config, so API keys, project IDs, endpoints, and break-glass controls stay behind audit-safe configuration objects.
npm install @plasius/ai-providers
import {
createAiProviderRegistry,
createFakeAiProviderAdapter,
} from "@plasius/ai-providers";
import { resolveAiProviderConfig } from "@plasius/ai-config";
const adapter = createFakeAiProviderAdapter();
const config = resolveAiProviderConfig(
{
providerId: "fake-dev",
providerKind: "custom",
tier: "development",
capabilities: ["chat", "reasoning", "tts"],
settings: {
enabled: "FAKE_AI_ENABLED",
},
defaults: {
enabled: true,
},
dataPolicy: {
allowedDataClasses: ["public", "internal"],
allowProviderTraining: false,
},
},
process.env
);
const registry = createAiProviderRegistry([adapter]);
const candidate = registry.selectFirstCapable(
{
requestId: "request-1",
kind: "chat",
input: "Summarise this scene.",
dataClass: "public",
estimatedUsage: {
inputTokens: 128,
outputTokens: 64,
},
},
{
"fake-dev": config,
}
);
const response = candidate
? await candidate.adapter.invoke(
{
requestId: "request-1",
kind: "chat",
input: "Summarise this scene.",
dataClass: "public",
},
candidate.config
)
: undefined;
Descriptors declare provider capabilities, models, SLOs, pricing, cache eligibility, privacy policy, and optional MCP service bindings. The registry sorts capable providers by estimated request cost first, then provider priority, then provider ID for deterministic fallback behavior.
Cache metadata supports later TTS and semantic-cache layers by exposing key dimensions such as voiceId and normalizedText; this package does not store generated speech or prompt data.
createFakeAiProviderAdapter is intended for router, governance, and eval tests. It can simulate successful providers, unavailable providers, and invocation failures without live provider keys or committed secrets.
npm install
npm run build
npm test
npm run test:coverage
npm run pack:check
Apache-2.0
FAQs
Provider adapter contracts and implementations for the Plasius agentic AI package family.
We found that @plasius/ai-providers demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.