https://www.boundaryml.com logo
Vertex Anthropic streaming
# help
a
Seems that no chunks are streamed when using anthropic models on vertex. Works when not streaming. Any known issues with that - could just be it's not supported on provider side but unsure
b
No known issues, it should work, there are separate endpoints for stream vs not in vertex anthropic
a
Ohh that could be it then thanks will look into that
b
I meant as in
provider vertex-ai
switches between the streaming and non-streaming endpoints depending on which type of client you're using
Weird, I am seeing an issue with this in the playground
a
yeah no luck so far, this is my client setup btw
Copy code
client<llm> VertexSonnet {
  provider vertex-ai
  retry_policy SimpleConstant
  options {
    model "claude-sonnet-4@20250514"
    credentials env.GOOGLE_APPLICATION_CREDENTIALS
    anthropic_version "vertex-2023-10-16"
    base_url "https://us-east5-aiplatform.googleapis.com/v1/projects/magnitudeai/locations/us-east5/publishers/anthropic/models"
  }
}
b
Is the error you're getting " Stream ended without response (Unspecified error code: 2) - Stream ended without response" or is it something else?
a
No error - just no chunks
i.e. this will not error, it will just produce nothing
Copy code
import { b } from 'llm-core';

const stream = b.stream.VertexSonnetTest();

for await (const chunk of stream) {
    console.log("Chunk:", chunk);
}
b
Oh, hmm...
Will let you know when I've figured out what's going on here!
a
I know what the issue is
Can you revert to 0.207.0
I will patch this in 0.208.1
Tomorrow
a
Seeing same issue in 0.207.0, I think
was trying on 0.207.1 before that
a
Ok we have a lead
a
oh after a very long time i eventually get this:
Copy code
Stream started
2025-09-26T18:19:20.909 [BAML WARN] Function VertexSonnetTest:
    (3 other previous tries)
    Client: VertexSonnet (<unknown>) - 79900ms
    ---PROMPT---
    user: Tell me a long story about sloths

    ---REQUEST OPTIONS---
    anthropic_version: "vertex-2023-10-16"
    max_tokens: 4096
    ---ERROR (Unspecified error code: 2)---
    Stream ended without response
Stream done
a
It s a type issue, we cant parse the response
So should be an easy patch
a
ok, by tomorrow you said?
a
Yeah
a
awesome thanks
a
good news, i managed to fix it
patch going out in a few hours
a
cool cool
a
scratch that, going out tomorrow (sunday). Will ping announcements channel when it is out
it's out - lmk if it works for you now
0.209.0
a
nice, works