Maintain consistent naming patterns and parameter structures across AI provider implementations. This makes the SDK more intuitive and reduces developer friction when switching between different AI models or providers.
Maintain consistent naming patterns and parameter structures across AI provider implementations. This makes the SDK more intuitive and reduces developer friction when switching between different AI models or providers.
Key practices:
.response
instead of .rawResponse
for provider API responsesproviderOptions
parameterExample:
// Preferred approach
const { response } = await embed({
providerOptions: {
// Provider-specific options here
}
});
// Instead of
const { rawResponse } = await embed({
// Mixing provider-specific options at the top level
});
When adding examples for AI providers, always verify that model identifiers are valid for the specific provider (e.g., using ‘scribe_v1’ for ElevenLabs transcription models rather than invalid identifiers).
Enter the URL of a public GitHub repository