Add support for Claude 3 Opus/Hike models with streaming API
Currently, the AI SDK includes a provider for Claude 3 models with tool use support. However, the streaming API for these models is not yet available. To fully integrate Claude 3 Opus/Hike models into our application, we need to wait for an update from the AI provider that includes streaming API support.
Once the streaming API is available, we will need to update our implementation to utilize the new functionality. This will allow us to provide a seamless user experience with real-time updates and faster response times when using Claude 3 Opus/Hike models.
References: Claude/Tool use Vercel AI SDK/Claude
I am using openrouter.ai, so if it can support custom the baseUrl and model, then we can use Claude Haiku, or any other LLM models that supported by openrouter.ai The openrouter.ai build the API compatible with OpenAI.
If we can add LLM_MODEL=, then will be great
# Used to set the base URL path for OpenAI API requests.The default value is https://api.openai.com/v1
OPENAI_API_BASE=
# OpenAI API key retrieved here: https://platform.openai.com/api-keys
OPENAI_API_KEY=
# Tavily API Key retrieved here: https://app.tavily.com/home
TAVILY_API_KEY=
streaming tool calls: https://github.com/vercel/ai/releases/tag/%40ai-sdk%2Fanthropic%400.0.14
ready: https://sdk.vercel.ai/providers/ai-sdk-providers/anthropic
I tried it, but some agents are causing errors.
query-suggestor
APICallError [AI_APICallError]: messages: text content blocks must be non-empty
researcher
APICallError [AI_APICallError]: messages: text content blocks must be non-empty
PR: #239