Ben Epstein
12/19/2025, 2:35 PMclient<llm> GptOss120b {
provider vertex-ai
options {
model gpt-oss-120b-maas
project_id PROJECT_ID
base_url "https://aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/us-central1/publishers/openai/models"
generation_config {
temperature 0.0
seed 42
}
}
}
and it does make the call, but it seems to return a response in a different form, so baml fails to parse it. I can't figure out how to parse it. I tried using openai-generic as the client provider, thinking it would match the openai format, but that failed too with a 404.
Here's an example output from the raw-curl
{
"candidates": [
{
"content": {
"role": "assistant",
"parts": [
{
"text": "Why donโt skeletons fight each other?\n\nThey donโt have the guts."
}
]
},
"finishReason": "STOP"
}
],
"usageMetadata": {
"promptTokenCount": 71,
"candidatesTokenCount": 47,
"totalTokenCount": 118
}
}
and here's the error from baml
Unspecified error code: 2 Failed to parse into a response accepted by baml_runtime::internal::llm_client::primitive::vertex::types::VertexResponse: {"usageMetadata":{"promptTokenCount":71,"candidatesTokenCount":47,"totalTokenCount":118}}
Caused by:
missing field `candidates`
Request options: {"generation_config":{"temperature":0.0,"seed":42}}
and when i try openai-generic
Unspecified error code: 404 Request failed with status code: 404 Not Found,
<no response or invalid utf-8>
Request options: {"model":"gpt-oss-120b-maas","project_id":"{}","generation_config":{"temperature":0.0,"seed":42}}Vaibhav (BAML ๐)
12/19/2025, 3:47 PMVaibhav (BAML ๐)
12/19/2025, 3:52 PMBen Epstein
12/19/2025, 7:13 PMUnspecified error code: 2 error sending request
If you haven't yet, try enabling the proxy (See API Keys button)
Request options: {"client_response_type":"openai","generation_config":{"temperature":0.0,"seed":42}}Ben Epstein
12/19/2025, 7:13 PMVaibhav (BAML ๐)
12/19/2025, 7:13 PMaaronv (BAML)
12/19/2025, 7:18 PMBen Epstein
12/19/2025, 7:18 PMUnspecified error code: 400 Request failed with status code: 400 Bad Request,
{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"client_response_type\": Cannot find field.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "Invalid JSON payload received. Unknown name \"client_response_type\": Cannot find field."
}
]
}
]
}
}
the docs make it seem like this is maybe only allowed for openai providers?Vaibhav (BAML ๐)
12/19/2025, 7:43 PMBen Epstein
12/19/2025, 7:55 PMVaibhav (BAML ๐)
12/19/2025, 7:59 PMnikitoshina
12/19/2025, 8:28 PMnikitoshina
12/19/2025, 8:29 PMBen Epstein
12/19/2025, 8:29 PM