https://www.boundaryml.com logo
Hey all ! Been following baml a little
# general
d
Hey all ! Been following baml a little here and there since I saw the 12 rules blog post a while back. Question Is there a way to allow baml to use claude code sdk in the same way that ai-sdk has a wrapper? Feels like I stumbled upon a gem of a community here! Difference in quality and mindset vs reddit is wild.
v
How does ai sdk expose it?
I wonder if it’s possible here. Should be!
d
https://ai-sdk.dev/providers/community-providers/claude-code I think there is likely a better way though, to perhaps better take care of caching. Theres a built in session id inside of the claude code sdk, rather than just running
claude -p
passing in the messages array each time
RooCode also integrates it into their extension
heres another wrapper around the sdk that I really like https://github.com/instantlyeasy/claude-code-sdk-ts
v
this is not yet currently supported naively. likely the best way to do this is to have a seperate localhost express app that mimics the chat/completions api. and then use
openai-generic
provider with BAML pointed to localhost
The part thats tricky here is you need to think about how to transform the user message into a claude code "request".