Repository navigation
Commit 5876d73
committed
fix(bedrock): split thinking and progress-update blocks streamed under one index
With thinking.display "updates", Bedrock's ConverseStream sends a
thinking block and the progress-update (narration) block after it under
the same contentBlockIndex:
reasoningContent.text "" (thinking, omitted)
reasoningContent.signature "…" (decodes to …thinking…)
reasoningContent.text "It's working …"
reasoningContent.signature "…" (decodes to …narration…)
contentBlockStop
3356ddf collected by index, so it sent the pair back as one block with
both texts and both signatures concatenated. Seen in a raw API dump of a
real Zoo session on the installed VSIX (2026-09-27).
Replaying that request as non-streaming Converse with "error" showed the
merged block is rejected:
messages.111.content.0: Invalid `signature` in `thinking` block. The
block is bound to a different conversation. [...] The `thinking` block
that preceded this one when it was created is missing from this request.
With drop_block the request succeeds, but the API silently drops the
block and, per the AWS docs, every later thinking block too. ConverseStream
can't show that (see THINKING_BINDING_CONTROLS_BETA). The same replay
with the two blocks sent separately succeeded with
input_transformations: [].
A block now ends when a new text or redacted delta arrives after its
signature, so each signature stays with its own text.
See also Zoo-Code-Org#1820.1 parent 3356ddf commit 5876d73
2 files changed
Lines changed: 69 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1953 | 1953 | | |
1954 | 1954 | | |
1955 | 1955 | | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
1956 | 2002 | | |
1957 | 2003 | | |
1958 | 2004 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
165 | 176 | | |
166 | 177 | | |
167 | 178 | | |
| |||
697 | 708 | | |
698 | 709 | | |
699 | 710 | | |
700 | | - | |
701 | | - | |
| 711 | + | |
| 712 | + | |
702 | 713 | | |
703 | 714 | | |
704 | 715 | | |
| |||
947 | 958 | | |
948 | 959 | | |
949 | 960 | | |
950 | | - | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
951 | 969 | | |
952 | 970 | | |
953 | 971 | | |
| |||
990 | 1008 | | |
991 | 1009 | | |
992 | 1010 | | |
993 | | - | |
994 | | - | |
995 | | - | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
| 1011 | + | |
| 1012 | + | |
1003 | 1013 | | |
1004 | 1014 | | |
1005 | 1015 | | |
| |||
0 commit comments