jgasiorek
01/27/2026, 10:17 PMsekai.ni.itamio
01/29/2026, 8:36 AMpython
async def _astream()
...
stream = self.b.stream.ChooseTool(baml_state, {"tb": tb}) # tb for @@dynamic usage in baml_src/
async for partial in stream:
...
Right now partial.model_dump() is accumulated, e.g.:
- 1st emit: {"selected_tool": None}
- 2nd emit: {"selected_tool": {"name": None}}
- 3rd emit: {"selected_tool": {"name": "rep"}}
- 4th emit: {"selected_tool": {"name": "reply_to_user"}}
For LangChain streaming, I’d prefer delta-style updates (only the changed field/value per emit).
Is there a configuration to make partial emit delta-style updates instead of accumulated state?vEth
01/30/2026, 9:46 AMZeke John
02/01/2026, 9:16 PMsekai.ni.itamio
02/05/2026, 7:04 AMfunction Invoke() -> string {
client ChatBaml
prompt #"
{{ _.role( 'user' ) }}
{{ 'Hello, how are you?' }}
"#
}
vllm renders it as ( Hermes format):
<|im_start|>user\nHello, how are you?<|im_end|>\n<|im_start|>assistant\n
Is there currently (or planned) support for controlling / injecting a custom string right at the start of the assistant turn, for example:
{{ _.role( 'assistant', prefix='assistant{"name": “browser' ) }}
will be rendered as
...<|im_end|>\n<|im_start|>assistant<tool_call>{"name": “browser
This pattern is very useful for reliable tool-calling agents (inspired by the Manus blog post "Context Engineering for AI Agents: Lessons from Building Manus").
Thanks in advance!Cookie Monster
02/07/2026, 7:54 AMfrom baml_py import Image
img = Image.from_url(f.absolute().as_posix())
content = b.DescribeMedia(img)
When i read the image i get an error at `content = b.DescribeMedia(img)`:
baml_py.internal_monkeypatch.BamlValidationError: BamlValidationError(message=Internal Failure: Failed to fetch media: builder error
Caused by:
relative URL without a base - Failed to fetch media: builder error
Caused by:
relative URL without a base, raw_output=, prompt=N/A, detailed_message=Parsing error: Internal Failure: Failed to fetch media: builder error
Caused by:
relative URL without a base - Failed to fetch media: builder error
Caused by:
relative URL without a base
Prompt: N/A
Raw Response: )
It is an absolute path to the file. The test case below works fine :
test Test {
functions [DescribeMedia]
args {
img {
file "<ABSOLUTE_PATH>"
}
}
}vEth
02/11/2026, 7:46 AMmessages parameter and rendered in the prompt template.Tom
02/13/2026, 7:10 PMconst bamlProvider = (providerId === 'openai' && auth?.type === 'oauth')
? 'openai-responses' as const
: def.bamlProvider
// The options passed to BAML:
cr.addLlmClient('ChatClientNoRetryAnthropicOnly', 'openai-responses', {
model: modelId,
api_key: auth.accessToken,
base_url: 'https://chatgpt.com/backend-api/codex',
headers: {
'ChatGPT-Account-Id': auth.accountId,
},
})
But I keep getting this error back from OpenAI:
Request failed with status code: 400 Bad Request,
{"detail":"Instructions are required"}
I thought the BAML openai-response provider would properly map system instructions to the right parameters. But is something different with the codex endpoint? Do I need to use the Modular API to manually construct the proper request here?GR™
02/15/2026, 2:16 AMKevin Gregory
02/18/2026, 10:43 PMjogendra78
03/12/2026, 6:31 PMBahtman
03/14/2026, 9:16 AMkehvinbehvin
03/25/2026, 10:02 PMBAML COERCE ERROR:
Failed to coerce value: ParsingError { scope: [], reason: "Failed to find any ExtractedLiterals @stream.not_null in 4 items", causes: [ParsingError { scope: [], reason: "Failed to find any ExtractedLiterals @stream.not_null in 3 items", causes: [ParsingError { scope: [], reason: "Failed while parsing required fields: missing=1, unparsed=0", causes: [ParsingError { scope: [], reason: "Missing required field: explanation", causes: [] }] },
...
causes: [] }] }] }, ParsingError { scope: [], reason: "Failed while parsing required fields: missing=1, unparsed=0", causes: [ParsingError { scope: [], reason: "Missing required field: explanation", causes: [] }] }] }abrowne2
03/27/2026, 7:38 PMakhil
04/09/2026, 8:15 PMsekai.ni.itamio
04/13/2026, 4:21 AM{
"selected_tool": {
"name": "reply_to_user",
"arguments": {
"role": "assistant",
"content": "string" // expected full extracted content "Jakob :four_leaf_clover:..."
}
}
}
Raw LLM Response
... (reasoning omitted)
Final check of the schema requirement: "Answer in JSON-like string (no double quotes in keys) using this schema."
Okay, I will construct the JSON object.
Content string:
Jakob :four_leaf_clover: \u0000
@jcsrb
Cứ 6 giờ debug sẽ giúp cho
bạn tiết kiệm được 5 phút đọc
document
@vuicoding
I'll put this into the `content` field.
</think>
{
selected_tool: {
name: "reply_to_user",
arguments: {
role: "assistant",
content: "Jakob :four_leaf_clover: \\u0000\n@jcsrb\nCứ 6 giờ debug sẽ giúp cho\nbạn tiết kiệm được 5 phút đọc\ndocument\n@vuicoding"
}
}
}
https://cdn.discordapp.com/attachments/1493103826906124288/1493104266368389120/image.png?ex=69ddc135&is=69dc6fb5&hm=dfcfd504f9cab58b6c60a30c1aeb39ecd4195158654f33d46b8d019710efeb08&joshy
04/24/2026, 2:50 PMproject_id and location, it works.
If I use env lookup as commented out, it doesn't.
my monorepo is set up as:
project/
- backend/
- frontend/
BAML is under backend.
I tried to put .env in the root as well as backend/
Neither approach worked.
Any help on how to get this working is appreciated.jgasiorek
04/24/2026, 6:11 PMGR™
05/13/2026, 7:31 PMGR™
05/15/2026, 11:51 PMInvalidAuthentication (401) Request failed with status code: 401 Unauthorized,
{
"error": {
"message": "Incorrect API key provided: $OPENAI_***_KEY. You can find your API key at https://platform.openai.com/account/api-keys.",
"type": "invalid_request_error",
"param": null,
"code": "invalid_api_key"
}
}
Request options: {"model":"gpt-5-mini"}
Based on preliminary testing, changing to a named client from clients.baml (i.e. CustomGPT5Mini) fixes this behavior. You can also just rerun the test from the Playground once it loads to get it working with no changes required. Not sure if this is expected behavior or known bug, figured I'd leave it here anyway.
https://cdn.discordapp.com/attachments/1504994600941785100/1504994601109426306/image.png?ex=6a0902f2&is=6a07b172&hm=a7a3506b9f00d2827300170bafed70d9dcd6193055237c50ab6103f5461daf91&abrowne2
05/22/2026, 5:44 PMcache_control blocks, but I didn't see anything in the docs for gemini.JordanMiller
06/04/2026, 1:38 PMshank318
07/07/2026, 5:26 PMBen
07/08/2026, 7:32 AMshank318
07/10/2026, 11:51 AMshank318
07/15/2026, 6:09 PMgoroutine 473 [running]:
reflect.Value.Elem({0x2383220?, 0xc00103f530?, 0xc00103f380?})
/usr/local/go/src/reflect/value.go:1265 +0x190
github.com/boundaryml/baml/engine/language_client_go/baml_go/serde.decodeListValue(0xc000b15ae0, {0x13?, 0xc00103f380?})
/root/.cache/go-build/github.com/boundaryml/baml@v0.222.0/engine/language_client_go/baml_go/serde/decode.go:114 +0x2b3
github.com/boundaryml/baml/engine/language_client_go/baml_go/serde.Decode(0xc00103dc80, {0xd0?, 0xc00103f380?})
/root/.cache/go-build/github.com/boundaryml/baml@v0.222.0/engine/language_client_go/baml_go/serde/decode.go:581 +0x14b
github.com/boundaryml/baml/engine/language_client_go/baml_go/serde.decodeMapValue(0xc000b15a90, {0x13?, 0xc00103f380?})
/root/.cache/go-build/github.com/boundaryml/baml@v0.222.0/engine/language_client_go/baml_go/serde/decode.go:145 +0x2a5
github.com/boundaryml/baml/engine/language_client_go/baml_go/serde.Decode(0xc00103dac0, {0x60?, 0xc00103f380?})
/root/.cache/go-build/github.com/boundaryml/baml@v0.222.0/engine/language_client_go/baml_go/serde/decode.go:583 +0x4af
github.com/boundaryml/baml/engine/language_client_go/baml_go/serde.decodeListValue(0xc000b15900, {0x13?, 0xc00103f380?})
/language_client_go/baml_go/raw_objects/utils.go:231 +0x20c
/language_client_go/baml_go/serde/decode.go:123 +0x185
github.com/boundaryml/baml/engine/language_client_go/baml_go/serde.Decode(0xc00103d900, {0xb0?, 0xc00103f380?})
language_client_go/baml_go/serde/decode.go:581 +0x14b
github.com/boundaryml/baml/engine/language_client_go/baml_go/serde.decodeMapValue(0xc000b155e0, {0x13?, 0xc00103f380?})
/root/.cache/go-build/github.com/boundaryml/baml@v0.222.0/engine/language_client_go/baml_go/serde/decode.go:145 +0x2a5
github.com/boundaryml/baml/engine/language_client_go/baml_go/serde.Decode(0xc00103d440, {0x80?, 0xc00103f380?})
https://cdn.discordapp.com/attachments/1527014242811908231/1527014243222818927/Screenshot_2026-07-15_at_11.33.50_PM.png?ex=6a591e56&is=6a57ccd6&hm=ffcacc4d390b578453588e52e1922c84a7b740f04b9e126d4527ca1add5339d7&GR™
07/30/2026, 7:28 PMColby Cellador
08/04/2026, 4:37 PMbaml::blah28722
08/11/2026, 1:02 AMBAML 0.15.1-nightly
Situation: Agent loop ran baml test (120 tests, 0s) repeatedly, creating lots of .bamlprof files, adding >1GB of files in 3.5h.
OS X Spotlight indexing then froze the machine trying to pick it up. Any way to disable or cap profiles, or suggestions on ways to mitigate this?jgasiorek
08/31/2026, 3:01 PM