Skip to content

Conversation

@Pratham-Mishra04
Copy link
Collaborator

Summary

Updated Go module dependencies in the plugins/logging and plugins/otel packages, and fixed schemas usage in test files to accommodate changes in the core library.

Changes

  • Moved github.com/bytedance/sonic from direct to indirect dependency in plugins/logging
  • Added several new indirect dependencies to both plugins/logging and plugins/otel
  • Updated test files to use non-pointer slice types for ContentBlocks, ToolCalls, and other fields
  • Removed unused Anthropic and OpenAI type definition files from transports/bifrost-http/integrations

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (Next.js)
  • Docs

How to test

# Core/Transports
go version
go test ./...

# Test plugins
cd plugins/logging
go test ./...

cd ../otel
go test ./...

Breaking changes

  • Yes
  • No

Related issues

Addresses dependency updates and schema compatibility issues.

Checklist

  • I added/updated tests where appropriate
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 6, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • None
  • Bug Fixes

    • Improved accuracy of error types returned for Anthropic-related errors.
  • Style

    • Converted tab controls to buttons for better accessibility and semantics in the Teams/Customers page.
  • Refactor

    • Removed legacy transport integration code paths to simplify internals without changing user-facing behavior.
  • Chores

    • Updated and expanded indirect dependencies for logging and telemetry plugins to improve stability and compatibility.

Walkthrough

The diff updates error typing in Anthropic chat schema, adjusts request parameter extraction for Cohere, removes a string-slice pointer helper, applies pointer-to-slice refactors across tests, deletes Anthropic and OpenAI HTTP integration type/convert layers, expands plugin module dependencies, and switches UI tab elements from div to button.

Changes

Cohort / File(s) Change Summary
Anthropic schemas
core/schemas/providers/anthropic/chat.go, core/schemas/providers/anthropic/responses.go
Set errorStruct.Type from derived errorType; keep AnthropicMessageError.Type as "error". Responses file has whitespace-only tweaks.
Cohere request + utils
core/schemas/providers/cohere/responses.go, core/schemas/utils.go
Switch stop sequence extraction to a non-pointer slice variant; remove exported SafeExtractStringSlicePointer helper.
Bedrock responses
core/schemas/providers/bedrock/responses.go
Formatting/whitespace-only adjustments; no functional changes.
Tests: slice vs pointer refactor
tests/core-providers/scenarios/multiple_images.go, tests/core-providers/scenarios/reasoning.go, tests/core-providers/scenarios/response_validation.go, tests/core-providers/scenarios/utils.go
Replace pointer-based slices with direct slices for ContentBlocks, Include, ToolCalls; adjust iterations and embedding helpers accordingly.
HTTP integrations removal
transports/bifrost-http/integrations/anthropic/types.go, transports/bifrost-http/integrations/openai/types.go
Remove entire Anthropic and OpenAI type definitions, (un)marshaling, request converters, response/error derivation, and streaming utilities.
Plugin dependencies
plugins/logging/go.mod, plugins/otel/go.mod
Update go.mod: reorganize sonic dep and add numerous indirect deps (e.g., aws-sdk-go-v2, zerolog, fasthttp, jsonschema, brotli, x/*).
UI tab element
ui/app/teams-customers/page.tsx
Change tab items from div to button with type="button"; retain handlers and styling.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

I twitch my ears at sweeping change,
Two bridges gone, the paths rearrange.
Pointers hop to slices free,
Tabs press buttons—click with glee.
Logs and traces pull new friends,
Errors speak their proper ends.
Thump-thump—ship it! Onward, dev-bunnies! 🥕

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 10-06-fix_minor_type_fixes

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f6b769 and c01b5a7.

⛔ Files ignored due to path filters (2)
  • plugins/logging/go.sum is excluded by !**/*.sum
  • plugins/otel/go.sum is excluded by !**/*.sum
📒 Files selected for processing (14)
  • core/schemas/providers/anthropic/chat.go (1 hunks)
  • core/schemas/providers/anthropic/responses.go (2 hunks)
  • core/schemas/providers/bedrock/responses.go (1 hunks)
  • core/schemas/providers/cohere/responses.go (1 hunks)
  • core/schemas/utils.go (0 hunks)
  • plugins/logging/go.mod (3 hunks)
  • plugins/otel/go.mod (1 hunks)
  • tests/core-providers/scenarios/multiple_images.go (1 hunks)
  • tests/core-providers/scenarios/reasoning.go (2 hunks)
  • tests/core-providers/scenarios/response_validation.go (3 hunks)
  • tests/core-providers/scenarios/utils.go (7 hunks)
  • transports/bifrost-http/integrations/anthropic/types.go (0 hunks)
  • transports/bifrost-http/integrations/openai/types.go (0 hunks)
  • ui/app/teams-customers/page.tsx (2 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Collaborator Author

Pratham-Mishra04 commented Oct 6, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 10-06-fix_minor_type_fixes branch from f8870a6 to c01b5a7 Compare October 6, 2025 04:18
@akshaydeo akshaydeo marked this pull request as ready for review October 6, 2025 04:26
@akshaydeo akshaydeo force-pushed the 09-15-seggreate_http_server_into_a_separate_struct branch from 4aba40f to 025f8a9 Compare October 6, 2025 04:30
@akshaydeo akshaydeo closed this Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants