https://www.boundaryml.com logo
๐ŸŸก Trouble with API Key Configuration in clients.b...
# questions
b
okay this is probabably a stupid question: But I configured a clients.baml Like o
Copy code
client<llm> Claude_Sonnet {
    provider anthropic
    options {
        api_key env.ANTHROPIC_API_KEY
        model claude-sonnet-4-20250514
        max_tokens 10000
        temperature 0.8
        top_p 0.9
    }
}
But in the playground I still get an error, eventhough it actually loads the .env and I can see the correct key in Manage API keys settings. If I copy my key directly into clients.baml it also works ... What the hell am I doing wrong here? https://cdn.discordapp.com/attachments/1253172394345107466/1416004019050123366/image.png?ex=68c54402&is=68c3f282&hm=447ca9ee56fd2147592bd30fdc37e05736d924d1620edf850f34832ae3194e16&
v
I actually saw this error here myself! Hereโ€™s what I tried: closed the playground
Reopened it
Re added the api key manually just for that key
And it worked
I think there was a bug somehow we introduced for copying from env files
I havenโ€™t confirmed the bug yet fyi! Just something I remember from earlier this week.
b
@Vaibhav (BAML ๐Ÿ‘) okay great that actually worked thanks. So I could have saved me lookign at documentation etc. to see why it is not loading correctly
manually adding the key did the trick