Skip to content

Conversation

Pratham-Mishra04
Copy link
Collaborator

Summary

Refactored the Cohere provider implementation to simplify message content handling and improve code maintainability.

Changes

  • Simplified the Cohere message content handling by directly using the CohereMessageContent struct instead of helper methods
  • Removed unnecessary helper methods (NewStringContent, NewBlocksContent, IsString, IsBlocks, GetString, GetBlocks)
  • Updated all references to use direct struct field access instead of the removed helper methods
  • Fixed the order of method declarations in OpenAI types.go to improve code organization

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 ./...

Verify that Cohere API requests and responses are properly handled with both string content and block content.

Breaking changes

  • No

Checklist

  • I added/updated tests where appropriate
  • I verified builds succeed (Go and UI)

Copy link
Collaborator Author

Pratham-Mishra04 commented Oct 7, 2025

Copy link
Contributor

coderabbitai bot commented Oct 7, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 10-07-feat_sync_pools_added_to_all_internal_structs

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

@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 10-07-feat_sync_pools_added_to_all_internal_structs branch 2 times, most recently from 290c61b to e284b38 Compare October 7, 2025 14:56
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 08-30-feat_core_extended branch from d80798a to e13e8a7 Compare October 7, 2025 14:56
@Pratham-Mishra04 Pratham-Mishra04 changed the base branch from 08-30-feat_core_extended to graphite-base/572 October 8, 2025 14:19
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 10-07-feat_sync_pools_added_to_all_internal_structs branch from e284b38 to 0ed8c8e Compare October 8, 2025 14:19
@Pratham-Mishra04 Pratham-Mishra04 changed the base branch from graphite-base/572 to main October 8, 2025 14:20
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.

1 participant