Commit 4e3b978
fix(vision): make streaming opt-in and bounded
Preserve the existing non-streaming request shape by default while allowing callers to opt into SSE, a total request budget, and single-attempt behavior. Reuse the shared retry policy and HTTP error handling, reject empty analyses, bound response buffers, and report incomplete streams as truncated.
Document the compatibility controls and cover streaming, JSON fallback, timeout, UTF-8 chunking, and empty-response paths.
Co-authored-by: qiuYliangM <185303122+qiuYliangM@users.noreply.github.com>
Signed-off-by: hexin <he.xin@h3c.com>1 parent 4858849 commit 4e3b978
3 files changed
Lines changed: 528 additions & 69 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2967 | 2967 | | |
2968 | 2968 | | |
2969 | 2969 | | |
| 2970 | + | |
| 2971 | + | |
| 2972 | + | |
| 2973 | + | |
| 2974 | + | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
2970 | 2983 | | |
2971 | 2984 | | |
2972 | 2985 | | |
| |||
0 commit comments