alson
01/17/2026, 3:48 AMclient<llm> HFModel {
provider openai-generic
options {
model "moonshotai/Kimi-K2-Thinking:novita"
base_url "https://router.huggingface.co/v1/"
api_key env.HF_TOKEN
}
}
Running it will result in an error with unclear error message (see pic2)
But I copied the cURL (shown below) provied by BAML, paste it into terminal after exporting my HF_TOKEN, then it works... (see pic 2)
curl -X POST 'https://router.huggingface.co/v1/chat/completions' -H "authorization: Bearer $HF_TOKEN" -H "content-type: application/json" -d "{
\"model\": \"moonshotai/Kimi-K2-Thinking:novita\",
\"messages\": [
{
\"role\": \"system\",
\"content\": \"Answer the following question in less than 10 words:\nWhat is the capital of France?\n\n\"
}
]
}"
I have provided the HF_TOKEN via the Manages API KEYs in BAML (see pic 3)
Got 2 questions hope you could kindly help out
1. how do I get more meaningful error message from BAML playground? The error message has always been vague, but I used to be able to figure the problem out by running the cURL instead. But now the curl is working, so I run out of way to debug 😢
2. What should I try to do to get it work in the playground now?
https://cdn.discordapp.com/attachments/1253172394345107466/1461930235951059161/image.png?ex=697ad8a1&is=69798721&hm=a75105a40f71fd9537ee7f0be549bced7c908ae1c99a66d447a90cbca9b2812f&
https://cdn.discordapp.com/attachments/1253172394345107466/1461930236244529405/image.png?ex=697ad8a1&is=69798721&hm=73fe9a0183ebd62c26ed1f4097b09aba2d1576b4b6461ef9423eee7ae689abd7&
https://cdn.discordapp.com/attachments/1253172394345107466/1461930236559098039/image.png?ex=697ad8a1&is=69798721&hm=25656f881f9f95f2d141d5ce59e556a27b7fa32e133ed9bae27e8ac96bdafab5&alson
01/17/2026, 3:51 AMVaibhav (BAML 🐑)
01/17/2026, 3:54 AMVaibhav (BAML 🐑)
01/17/2026, 3:54 AMVaibhav (BAML 🐑)
01/17/2026, 3:54 AMVaibhav (BAML 🐑)
01/17/2026, 3:54 AMVaibhav (BAML 🐑)
01/17/2026, 3:54 AMVaibhav (BAML 🐑)
01/17/2026, 3:56 AMVaibhav (BAML 🐑)
01/17/2026, 3:57 AMalson
01/17/2026, 4:25 AMVaibhav (BAML 🐑)
01/17/2026, 4:29 AMVaibhav (BAML 🐑)
01/17/2026, 4:31 AMVaibhav (BAML 🐑)
01/17/2026, 4:32 AMalson
01/17/2026, 4:32 AMalson
01/17/2026, 4:35 AMVaibhav (BAML 🐑)
01/17/2026, 4:35 AMalson
01/17/2026, 4:35 AMVaibhav (BAML 🐑)
01/17/2026, 4:35 AMalson
01/17/2026, 4:45 AMJan
01/23/2026, 1:20 AMVaibhav (BAML 🐑)
01/23/2026, 5:23 AM