Introducing snowgander: The Open Source AI Vendor Abstraction Layer Powering Snowgoose
At Snowgoose, our mission is to simplify and democratize access to leading-edge AI models. Today, we’re taking another major step toward openness and community empowerment—we’re open sourcing the foundational technology that enables seamless AI experience within Snowgoose: snowgander.
What is snowgander
?
snowgander
is a TypeScript library that acts as a robust, maintainable, and extensible abstraction layer over multiple major AI vendor APIs—like OpenAI, Anthropic, Google AI, and OpenRouter. It standardizes how applications (like Snowgoose) integrate with these diverse AI services, giving you a unified interface to interact with cutting-edge models.
In simple terms: snowgander is the powerful engine that lets us offer unified multi-model access in Snowgoose—no vendor lock-in, no complex migrations, just consistent and predictable AI multi-modal responses.
Key Features At a Glance 🚀
- Standardized Interface: One consistent API (
AIVendorAdapter
) for chat, image generation, and capability checks. No more vendor-specific headaches! - Factory Pattern: Easily instantiate adapters for different providers with
AIVendorFactory
. - Configuration Simplicity: Set your API keys per vendor, once, with clear configuration methods.
- Unified Content Blocks: Standardized
ContentBlock[]
(text, images, thoughts, tools) for handling responses and interactions. - Capability Configuration: Tell snowgander what the model supports (vision, reasoning, image generation) and it handles the rest.
- Token Usage & Cost Calculation: Get normalized monetary usage reporting for every interaction.
- TypeScript Native: Written with strict typing and full type definitions for safety and confidence.
- Extensible: Designed for easy addition of new AI providers or custom integration points.
Example: How Easy Is It?
import { AIVendorFactory, ModelConfig, Chat, ChatResponse } from "snowgander";
// Step 1: Configure your keys (do this once at startup)
AIVendorFactory.setVendorConfig("openai", { apiKey: "YOUR_OPENAI_KEY" });
AIVendorFactory.setVendorConfig("anthropic", { apiKey: "YOUR_ANTHROPIC_KEY" });
// Step 2: Define or fetch your preferred model config
const modelConfig: ModelConfig = {
apiName: "gpt-4-turbo",
isVisionCapable: true,
isImageGenerationCapable: false,
isThinkingCapable: true,
inputTokenCost: 5,
outputTokenCost: 15,
};
// Step 3: Get the adapter for your model/provider
const adapter = AIVendorFactory.getAdapter("openai", modelConfig);
// Step 4: Create a chat interaction
const chat: Chat = {
model: modelConfig.apiName,
responseHistory: [],
prompt: "What's the weather today?",
systemPrompt: "You are a helpful assistant.",
};
const chatResponse: ChatResponse = await adapter.sendChat(chat);
console.log(chatResponse.content[0]); // Unified response!
Real-World Benefits (and Why We Use It in Snowgoose)
Unified interface: Powering our easy-to-use UI and persona feature, snowgander lets you interact with any supported AI model, switching vendors is seamless.
Predictable billing: Consistent cost reporting helps both Snowgoose provide a fair amount of credits to our users.
Modular and open: If you want novel workflows, custom integrations, or a transparent AI engine, you’re free to build atop or contribute.
Developer empowerment: Lower the barrier to multi-model, multi-vendor AI development—for everyone.
How to Get Started
- Install from npm
npm install snowgander
-
Read the Documentation on GitHub
-
Start integrating multiple AIs, quickly and securely
What’s Next?
We’re committed to improving snowgander alongside Snowgoose. Planned upcoming features include:
-More streamlined multi-modal (vision/image) support -Improved tool invocation protocols (perfect for agent workflows) -Support for emerging AI vendors -Even more type safety and extensibility -Get Involved
snowgander is MIT licensed and fully open on GitHub. Issues and Pull Requests are welcome.
Ready to experience everything unified AI access can do? Try Snowgoose for yourself today (starting at just $5/mo), or power your own projects with snowgander!