@relayplane/adapters
v0.1.5
Published
Provider adapters for OpenAI, Anthropic, Google, xAI, and Local LLMs
Maintainers
Readme
@relayplane/adapters
Provider adapters for OpenAI, Anthropic, Google, xAI, and Local LLMs.
Supported Providers
- OpenAI (Full support): Text, Vision, Structured Extraction
- Anthropic (Stub): Basic text completion
- Google (Stub): Placeholder
- xAI (Stub): Grok models via OpenAI-compatible API
- Local (Basic): Ollama support
Adapter Interface
All adapters implement the Adapter interface:
interface Adapter {
execute(config: StepConfig, apiKey: string): Promise<AdapterResult>;
}Error Handling
Adapters never throw - they always return an AdapterResult with error information:
interface AdapterResult {
success: boolean;
output?: any;
error?: {
type: string;
message: string;
recoverable: boolean;
};
tokenUsage?: TokenUsage;
}Documentation
See /docs/Model Adapter Specification.md for detailed implementation specs.
