Skip to content

Commit b904c8b

Browse files
committed
fix llm chat tool
1 parent bcd2532 commit b904c8b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

apps/sim/tools/llm/chat.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ interface LLMChatParams {
1919
bedrockAccessKeyId?: string
2020
bedrockSecretKey?: string
2121
bedrockRegion?: string
22+
_context?: {
23+
workspaceId?: string
24+
workflowId?: string
25+
}
2226
}
2327

2428
interface LLMChatResponse extends ToolResponse {
@@ -146,6 +150,11 @@ export const llmChatTool: ToolConfig<LLMChatParams, LLMChatResponse> = {
146150
bedrockAccessKeyId: params.bedrockAccessKeyId,
147151
bedrockSecretKey: params.bedrockSecretKey,
148152
bedrockRegion: params.bedrockRegion,
153+
// The executor attaches the billing-attribution header on internal
154+
// routes whenever the execution scope carries one, and /api/providers
155+
// rejects that header unless the body names the workspace it is
156+
// validated against.
157+
...(params._context?.workspaceId ? { workspaceId: params._context.workspaceId } : {}),
149158
}
150159
},
151160
},

0 commit comments

Comments
 (0)