File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " claude-dev " : minor
3+ ---
4+
5+ Stream thinking from Vertex Claude
Original file line number Diff line number Diff line change @@ -162,6 +162,21 @@ export class VertexHandler implements ApiHandler {
162162 break
163163 case "content_block_start" :
164164 switch ( chunk . content_block . type ) {
165+ case "thinking" :
166+ yield {
167+ type : "reasoning" ,
168+ reasoning : chunk . content_block . thinking || "" ,
169+ }
170+ break
171+ case "redacted_thinking" :
172+ // Handle redacted thinking blocks - we still mark it as reasoning
173+ // but note that the content is encrypted
174+ yield {
175+ type : "reasoning" ,
176+ reasoning : "[Redacted thinking block]" ,
177+ }
178+ break
179+
165180 case "text" :
166181 if ( chunk . index > 0 ) {
167182 yield {
@@ -178,6 +193,12 @@ export class VertexHandler implements ApiHandler {
178193 break
179194 case "content_block_delta" :
180195 switch ( chunk . delta . type ) {
196+ case "thinking_delta" :
197+ yield {
198+ type : "reasoning" ,
199+ reasoning : chunk . delta . thinking ,
200+ }
201+ break
181202 case "text_delta" :
182203 yield {
183204 type : "text" ,
You can’t perform that action at this time.
0 commit comments