Skip to content

chore: shifted http-transport to core/v1.1.3#90

Merged
akshaydeo merged 1 commit intomainfrom
06-16-chore_shifted_http-transport_to_core_v1.1.3
Jun 16, 2025
Merged

chore: shifted http-transport to core/v1.1.3#90
akshaydeo merged 1 commit intomainfrom
06-16-chore_shifted_http-transport_to_core_v1.1.3

Conversation

@Pratham-Mishra04
Copy link
Copy Markdown
Collaborator

Updated Anthropic integration to use the new ToolChoiceStruct in the Bifrost schema. This change adapts the Anthropic message request conversion to properly structure tool choice parameters according to the latest core library schema (v1.1.3).

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 16, 2025

Caution

Review failed

The pull request is closed.

Summary by CodeRabbit

  • Documentation

    • Updated the README to remove the reference to the core/tests/ directory in the repository structure section.
  • Chores

    • Upgraded the github.com/maximhq/bifrost/core dependency to version v1.1.3.

Summary by CodeRabbit

  • Documentation

    • Updated the README to remove the reference to the core/tests/ directory in the repository structure section.
  • Chores

    • Upgraded the github.com/maximhq/bifrost/core dependency to version v1.1.3.
  • Refactor

    • Improved the internal structure for handling tool choice configuration, resulting in cleaner and more maintainable code. No user-facing changes.

Walkthrough

The changes update the internal structuring of the ToolChoice assignment in the ConvertToBifrostRequest method, nesting its fields within a new struct. Additionally, the dependency on github.com/maximhq/bifrost/core is updated from v1.1.2 to v1.1.3 in the Go module file. The README was also updated to remove a reference to a test directory.

Changes

File(s) Change Summary
transports/bifrost-http/integrations/anthropic/types.go Refactored ToolChoice field assignment to use a nested struct for type and function fields.
transports/go.mod Updated github.com/maximhq/bifrost/core dependency from v1.1.2 to v1.1.3.
README.md Removed the line describing the core/tests/ directory from the repository structure section.

Possibly related PRs

Suggested reviewers

  • danpiths

Poem

🐇 In code’s lush fields, I softly tread,
Nesting structs where functions are led.
Modules fresh, and docs refined,
A cleaner path for tools aligned.
With every hop, the code’s more bright—
A rabbit’s joy in bytes and light! 🌿✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7c27aee and 15bab3a.

⛔ Files ignored due to path filters (1)
  • transports/go.sum is excluded by !**/*.sum
📒 Files selected for processing (3)
  • README.md (0 hunks)
  • transports/bifrost-http/integrations/anthropic/types.go (1 hunks)
  • transports/go.mod (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch 06-16-chore_shifted_http-transport_to_core_v1.1.3
  • Post Copyable Unit Tests in Comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Collaborator Author

Pratham-Mishra04 commented Jun 16, 2025

@Pratham-Mishra04 Pratham-Mishra04 changed the title fix: update Anthropic ToolChoice structure and upgrade bifrost/core to v1.1.3 chore: shifted http-transport to core/v1.1.3 Jun 16, 2025
@Pratham-Mishra04 Pratham-Mishra04 marked this pull request as ready for review June 16, 2025 14:37
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0263e2c and 0f6db1e.

⛔ Files ignored due to path filters (1)
  • transports/go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • transports/bifrost-http/integrations/anthropic/types.go (1 hunks)
  • transports/go.mod (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
transports/bifrost-http/integrations/anthropic/types.go (2)
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#55
File: core/providers/anthropic.go:483-494
Timestamp: 2025-06-04T09:36:27.956Z
Learning: In the Anthropic provider (core/providers/anthropic.go), the user has confirmed through practical experience that the tool_choice parameter should always use an object format with a "type" field (e.g., {"type": "auto"}, {"type": "tool", "name": "function_name"}), even though the official documentation examples sometimes show "auto" as a direct string. The current implementation correctly handles all tool choice types with the object format.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#83
File: core/schemas/bifrost.go:186-190
Timestamp: 2025-06-15T14:18:32.703Z
Learning: In core/schemas/bifrost.go, the ToolChoice UnmarshalJSON validation intentionally only checks for empty Type fields and lets providers handle validation of specific tool choice values. This architectural decision keeps schema validation focused on structure while allowing provider-specific semantic validation.
🧬 Code Graph Analysis (1)
transports/bifrost-http/integrations/anthropic/types.go (1)
core/schemas/bifrost.go (6)
  • ToolChoiceStruct (144-147)
  • ToolChoiceType (123-123)
  • ToolChoice (150-153)
  • ToolChoiceTypeFunction (133-133)
  • Function (108-112)
  • ToolChoiceFunction (139-141)

Comment thread transports/go.mod
Comment thread transports/bifrost-http/integrations/anthropic/types.go
Comment thread transports/bifrost-http/integrations/anthropic/types.go
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 06-16-enhancement_added_custom_genai_part_type_for_better_handling_in_genai_integration branch from 0263e2c to 003df5d Compare June 16, 2025 14:51
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 06-16-chore_shifted_http-transport_to_core_v1.1.3 branch 2 times, most recently from b28d30b to 7c27aee Compare June 16, 2025 14:54
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 06-16-enhancement_added_custom_genai_part_type_for_better_handling_in_genai_integration branch from 003df5d to 418d7ae Compare June 16, 2025 15:00
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 06-16-chore_shifted_http-transport_to_core_v1.1.3 branch from 7c27aee to 03768a6 Compare June 16, 2025 15:00
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 06-16-enhancement_added_custom_genai_part_type_for_better_handling_in_genai_integration branch from 418d7ae to c80be38 Compare June 16, 2025 15:01
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 06-16-chore_shifted_http-transport_to_core_v1.1.3 branch from 03768a6 to 300f751 Compare June 16, 2025 15:01
Copy link
Copy Markdown
Contributor

akshaydeo commented Jun 16, 2025

Merge activity

  • Jun 16, 3:18 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 16, 3:25 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jun 16, 3:27 PM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo akshaydeo changed the base branch from 06-16-enhancement_added_custom_genai_part_type_for_better_handling_in_genai_integration to graphite-base/90 June 16, 2025 15:22
@akshaydeo akshaydeo changed the base branch from graphite-base/90 to main June 16, 2025 15:24
@akshaydeo akshaydeo force-pushed the 06-16-chore_shifted_http-transport_to_core_v1.1.3 branch from 300f751 to 15bab3a Compare June 16, 2025 15:25
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ BugBot reviewed your changes and found no bugs!


BugBot free trial expires on June 17, 2025
You have used $0.00 of your $50.00 spend limit so far. Manage your spend limit in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

@akshaydeo akshaydeo merged commit f368f3f into main Jun 16, 2025
1 check passed
@akshaydeo akshaydeo deleted the 06-16-chore_shifted_http-transport_to_core_v1.1.3 branch August 31, 2025 17:29
akshaydeo added a commit that referenced this pull request Nov 17, 2025
Updated Anthropic integration to use the new ToolChoiceStruct in the Bifrost schema. This change adapts the Anthropic message request conversion to properly structure tool choice parameters according to the latest core library schema (v1.1.3).
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.

2 participants