You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: set fixed index 0 for stream responses and remove nil check for usage (#983)
Fixed inconsistencies in stream response handling for Anthropic and Bedrock providers by standardizing index values and removing unnecessary conditional checks.
- Removed conditional check for `usage` in Anthropic response handling, ensuring usage is always assigned
- Changed dynamic index values to fixed `0` index in stream responses for both Anthropic and Bedrock providers
- Removed unnecessary content block index handling in Bedrock provider
- [x] Bug fix
- [ ] Feature
- [x] Refactor
- [ ] Documentation
- [ ] Chore/CI
- [x] Core (Go)
- [ ] Transports (HTTP)
- [x] Providers/Integrations
- [ ] Plugins
- [ ] UI (Next.js)
- [ ] Docs
Test streaming responses from Anthropic and Bedrock providers to ensure proper index values and usage information:
```sh
go version
go test ./core/providers/anthropic/...
go test ./core/providers/bedrock/...
```
- [ ] Yes
- [x] No
Fixes inconsistencies in stream response handling across providers.
No security implications.
- [x] I read `docs/contributing/README.md` and followed the guidelines
- [x] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [x] I verified builds succeed (Go and UI)
- [x] I verified the CI pipeline passes locally if applicable
0 commit comments