https://www.boundaryml.com logo
Can Baml work in chrome extensions or it
# questions
s
Can Baml work in chrome extensions or it needs Node environment?
v
Currently only node. So you’ll need a backend you talk to to support it.
s
Thank you, that makes sense, I'm trying to set that up right now but I'm getting this error in baml playground Parsed Response Unspecified error code: 2 error sending request If you haven't yet, try enabling the proxy (See API Keys button) Request options: {"model":"claude-sonnet-4-20250514","temperature":0.0,"max_tokens":4096}
v
have you tried the proxy button by chance?
if you go into setting:
you can enable / disable it
s
I still get the same error regardless if I enable or disable it
v
thats odd. ok next step to debug this:
what env are you in?
promptfiddle? vscode? cursor? etc?
s
Okay, I am using Vscode on remote server
v
ah, i see. that may be the issue. for a remote server, you will likely need to disable the proxy. also in your
client<llm>
definition for anthropic you can add:
Copy code
options {
   ... // other things you already have
   headers {
    "anthropic-dangerous-direct-browser-access" true
  }
}
anthropic blocks stuff due to cors, so this allows us to bypass it 🙂
s
Okay this seemed to work, thanks 🙂
When I deploy on prod would I still require this? "anthropic-dangerous-direct-browser-access" true
v
nope its playground only
but you can leave it