https://www.boundaryml.com logo
Hey, there is a bug when using vertex ai
# general
v
Hey, there is a bug when using vertex ai gemini models. if include thinking is enabled, baml just tries to parse the thoughts and not the actual output, inevitably failing
v
what version of BAML are you using? and can you share what your client definition looks like?
v
0.211.2
Copy code
client<llm> VertexAIGeminiFlash {
  provider vertex-ai
  retry_policy Exponential
  options {
    model "gemini-2.5-flash"
    project_id env.VERTEX_PROJECT_ID
    location env.VERTEX_LOCATION
    query_params {
      key env.VERTEX_API_KEY
    }
  }
}
earlier it was
Copy code
client<llm> VertexAIGeminiFlash {
  provider vertex-ai
  retry_policy Exponential
  options {
    model "gemini-2.5-flash"
    project_id env.VERTEX_PROJECT_ID
    location env.VERTEX_LOCATION
    query_params {
      key env.VERTEX_API_KEY
    }
    generationConfig {
      thinkingConfig {
        includeThoughts true
      }
    }
  }
}
sorry wait
fixed it
v
perfect! thanks, we'll attempt a repro in the AM! In the meanwhile, a quick workaround is to swap to the modular API! https://docs.boundaryml.com/guide/baml-advanced/modular-api
I just happened to wake up early cause my dog threw up 😂
v
yep, the thoughts are not critical atm so i just disabled it for now
v
Time to go back to bed. i'll be actually up in another hour and a halfh ish haha
v
time for one more REM sleep session
💤
z
hey @Vaibhav (BAML 🐑) , just a friendly bump on this as i'm running into this same issue, and in my case the thoughts output is pretty critical to the agent i'm working on. easy to reproduce if you use any gemini thinking model and you have
includeThoughts true
set in the
generationConfig { thinkingConfig
.
Actually I think I’ve narrowed it down to just the vertex-ai provider. Exact same response schema as the google-ai provider, so I’m thinking a bit of parsing logic just needs to be copied over from google-ai to vertex-ai to fix. I’ve mainly been using 2.5 Pro, but I think the issue occurs for 2.5 flash, flash lite, etc as well
v
hey sorry about the delay here @zooski1099 ! I've been traveling a bit
and i should have handded this off to someone else
but i think i can get to this asap
z
hey @Vaibhav (BAML 🐑) no worries at all! appreciate you following up!
3 Views