mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-02 22:32:27 +08:00
fix: correct anthropic beta header config for fine-grained tool streaming (#27)
* fix: correct anthropic beta header config for fine-grained tool streaming - Use bedrock.anthropicBeta for Bedrock provider (not additionalModelRequestFields) - Use top-level headers for direct Anthropic API - Update @ai-sdk/amazon-bedrock to 3.0.62 - Add headers support to ModelConfig interface * fix: update @ai-sdk/amazon-bedrock to 3.0.62 for tool streaming support
This commit is contained in:
@@ -120,13 +120,14 @@ ${lastMessageText}
|
||||
console.log("Enhanced messages:", enhancedMessages);
|
||||
|
||||
// Get AI model from environment configuration
|
||||
const { model, providerOptions } = getAIModel();
|
||||
const { model, providerOptions, headers } = getAIModel();
|
||||
|
||||
const result = streamText({
|
||||
model,
|
||||
system: systemMessage,
|
||||
messages: enhancedMessages,
|
||||
...(providerOptions && { providerOptions }),
|
||||
...(headers && { headers }),
|
||||
tools: {
|
||||
// Client-side tool that will be executed on the client
|
||||
display_diagram: {
|
||||
|
||||
Reference in New Issue
Block a user