@ai-sdk/quiverai 2.0.73 Adds Dynamic Credential Resolution and Async Config Support
The @ai-sdk/quiverai package now supports both synchronous and asynchronous resolution of provider credentials and adds async handling to experimental OpenAI Live WebSocket configuration.
What changed?
@ai-sdk/quiverai version 2.0.73 introduces support for promises and for both synchronous and asynchronous callbacks when resolving provider API keys and token settings. Credentials are resolved per authenticated request, maintaining backward compatibility with existing authentication behavior and synchronous credential serialization. Additionally, the experimental OpenAI Live getServerWebSocketConfig() method now supports asynchronous resolution, requiring developers to await its output before using the configuration.
Why does it matter to an everyday developer?
This update allows developers to dynamically fetch or generate API keys and tokens at request time, ideal for scenarios such as user-specific authentication, rotating credentials, or integrating with external secrets management systems. The support for async WebSocket configuration also simplifies integration with services that require on-demand configuration retrieval, increasing flexibility when handling real-time connections.
What can the developer do now?
- Use async or sync functions to provide provider credentials, such as API keys or tokens, for each request.
- Integrate credential resolution with external storage, environment variables, or secure vaults more easily.
- When using OpenAI Live getServerWebSocketConfig(), await the asynchronous result before establishing a WebSocket connection.
- Migrate existing code that sets credentials or uses getServerWebSocketConfig() to optionally use asynchronous patterns if needed.
