Skip to content

Conversation

@Pratham-Mishra04
Copy link
Collaborator

Summary

This PR fixes several provider-specific issues and reorganizes the documentation structure for better navigation. It also adds support for handling single context blocks in Anthropic and Bedrock responses.

Changes

  • Fixed an issue where empty ARN in Bedrock was causing requests to fail
  • Improved handling of single context blocks in Anthropic and Gemini responses by converting them to string format
  • Ensured properties field is always set for MCP tools
  • Fixed incorrect JSON tag for search_domain_filter in Perplexity provider
  • Reorganized documentation structure by moving provider docs to a dedicated section
  • Enhanced HuggingFace provider documentation with more detailed information

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

Test the Bedrock provider with empty ARN configuration:

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

Test Anthropic and Bedrock providers with single context block responses:

go test ./providers/anthropic/...
go test ./providers/bedrock/...

Screenshots/Recordings

N/A

Breaking changes

  • Yes
  • No

Related issues

Fixes issues with Bedrock empty ARN and improves response handling for Anthropic and Bedrock providers.

Security considerations

No security implications.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 19, 2025

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added HuggingFace provider integration
    • Added authentication support for HTTP proxies
    • Added custom CA certificate support for proxies
  • Bug Fixes

    • Fixed Bedrock empty ARN issue causing request failures
    • Fixed Anthropic single context block handling in chat responses
    • Fixed MCP properties field initialization
    • Fixed Perplexity search domain filter configuration
  • Documentation

    • Updated provider documentation with comprehensive support matrix and capability details

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Promotes single-text provider content blocks to ContentStr for Anthropic, Bedrock, and Gemini; avoids treating empty Bedrock ARN as present when building model path; updates changelogs, docs, and bumps core, framework, transport, and multiple plugin versions.

Changes

Cohort / File(s) Change Summary
Provider response normalization
core/providers/anthropic/chat.go, core/providers/bedrock/chat.go, core/providers/gemini/chat.go
When exactly one content block exists and it's text, promote that text into ContentStr and clear ContentBlocks, changing single-text response representation.
Bedrock path construction
core/providers/bedrock/bedrock.go
Require ARN to be non-empty before constructing ARN-scoped model identifier; fall back to non-ARN/deployment path when ARN is empty.
Version bumps — core & framework
core/version, framework/version
Bumped core to 1.2.40 and framework to 1.1.50.
Version bumps — plugins & transports
plugins/governance/version, plugins/jsonparser/version, plugins/logging/version, plugins/maxim/version, plugins/mocker/version, plugins/otel/version, plugins/semanticcache/version, plugins/telemetry/version, transports/version
Incremented package/version files (minor micro-version bumps across plugins and transports).
Changelogs
core/changelog.md, framework/changelog.md, plugins/*/changelog.md, transports/changelog.md
Added changelog entries: provider fixes (Anthropic/Bedrock/Perplexity), HuggingFace provider references, proxy auth/CA fixes, and dependency bump notes.
Documentation — navigation & pages
docs/docs.json, docs/providers/custom-providers.mdx, docs/providers/supported-providers.mdx
Renamed Quick Start provider group to "Providers", added icon and explicit pages, adjusted icons and replaced provider matrix with a new support matrix and notes.
Documentation — HuggingFace provider doc
docs/providers/huggingface.mdx
Updated title/metadata and reworked sections/content structure (sections adjusted/removed).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Pay extra attention to: core/providers/*/chat.go (ContentStr promotion and serialization impacts), core/providers/bedrock/bedrock.go (ARN-empty vs absent logic and encoding), and docs/docs.json (navigation renames/links).
  • Verify version/changelog consistency across packages.

Possibly related PRs

Suggested reviewers

  • akshaydeo
  • danpiths

Poem

🐰 I hopped through lines both clean and wild,

One text block now becomes a single child.
ARN that’s empty skips its claim,
Docs and versions stamped with name.
Carrot cheers — merge with a smile!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main changes: handling single content blocks in Bedrock and Anthropic providers, plus fixing empty ARN issues.
Description check ✅ Passed The description follows the template structure with all major sections completed: Summary, Changes, Type of change, Affected areas, How to test, Breaking changes, and Checklist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 12-19-fix_minor_fixes_and_doc_updates

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 72d37ae and cfea158.

📒 Files selected for processing (30)
  • core/changelog.md (1 hunks)
  • core/providers/anthropic/chat.go (1 hunks)
  • core/providers/bedrock/bedrock.go (1 hunks)
  • core/providers/bedrock/chat.go (1 hunks)
  • core/providers/gemini/chat.go (2 hunks)
  • core/version (1 hunks)
  • docs/docs.json (1 hunks)
  • docs/providers/custom-providers.mdx (1 hunks)
  • docs/providers/huggingface.mdx (2 hunks)
  • docs/providers/supported-providers.mdx (1 hunks)
  • framework/changelog.md (1 hunks)
  • framework/version (1 hunks)
  • plugins/governance/changelog.md (1 hunks)
  • plugins/governance/version (1 hunks)
  • plugins/jsonparser/changelog.md (1 hunks)
  • plugins/jsonparser/version (1 hunks)
  • plugins/logging/changelog.md (1 hunks)
  • plugins/logging/version (1 hunks)
  • plugins/maxim/changelog.md (1 hunks)
  • plugins/maxim/version (1 hunks)
  • plugins/mocker/changelog.md (1 hunks)
  • plugins/mocker/version (1 hunks)
  • plugins/otel/changelog.md (1 hunks)
  • plugins/otel/version (1 hunks)
  • plugins/semanticcache/changelog.md (1 hunks)
  • plugins/semanticcache/version (1 hunks)
  • plugins/telemetry/changelog.md (1 hunks)
  • plugins/telemetry/version (1 hunks)
  • transports/changelog.md (1 hunks)
  • transports/version (1 hunks)
✅ Files skipped from review due to trivial changes (7)
  • plugins/governance/changelog.md
  • plugins/jsonparser/version
  • plugins/semanticcache/changelog.md
  • plugins/maxim/changelog.md
  • plugins/logging/changelog.md
  • plugins/otel/changelog.md
  • plugins/jsonparser/changelog.md
🚧 Files skipped from review as they are similar to previous changes (11)
  • plugins/semanticcache/version
  • core/version
  • core/providers/anthropic/chat.go
  • plugins/mocker/version
  • framework/version
  • plugins/maxim/version
  • transports/version
  • core/providers/gemini/chat.go
  • core/providers/bedrock/chat.go
  • framework/changelog.md
  • plugins/logging/version
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

always check the stack if there is one for the current PR. do not give localized reviews for the PR, always see all changes in the light of the whole stack of PRs (if there is a stack, if there is no stack you can continue to make localized suggestions/reviews)

Files:

  • core/providers/bedrock/bedrock.go
  • plugins/telemetry/changelog.md
  • docs/providers/custom-providers.mdx
  • plugins/telemetry/version
  • core/changelog.md
  • docs/providers/supported-providers.mdx
  • plugins/otel/version
  • plugins/governance/version
  • docs/docs.json
  • plugins/mocker/changelog.md
  • transports/changelog.md
  • docs/providers/huggingface.mdx
🧠 Learnings (2)
📚 Learning: 2025-12-09T17:07:42.007Z
Learnt from: qwerty-dvorak
Repo: maximhq/bifrost PR: 1006
File: core/schemas/account.go:9-18
Timestamp: 2025-12-09T17:07:42.007Z
Learning: In core/schemas/account.go, the HuggingFaceKeyConfig field within the Key struct is currently unused and reserved for future Hugging Face inference endpoint deployments. Do not flag this field as missing from OpenAPI documentation or require its presence in the API spec until the feature is actively implemented and used. When the feature is added, update the OpenAPI docs accordingly; otherwise, treat this field as non-breaking and not part of the current API surface.

Applied to files:

  • core/providers/bedrock/bedrock.go
📚 Learning: 2025-12-19T09:26:54.961Z
Learnt from: qwerty-dvorak
Repo: maximhq/bifrost PR: 1006
File: core/providers/utils/utils.go:1050-1051
Timestamp: 2025-12-19T09:26:54.961Z
Learning: Update streaming end-marker handling so HuggingFace is treated as a non-[DONE] provider for backends that do not emit a DONE marker (e.g., meta llama on novita). In core/providers/utils/utils.go, adjust ProviderSendsDoneMarker() (or related logic) to detect providers that may not emit DONE and avoid relying on DONE as the sole end signal. Add tests to cover both DONE-emitting and non-DONE backends, with clear documentation in code comments explaining the rationale and any fallback behavior.

Applied to files:

  • core/providers/bedrock/bedrock.go
🧬 Code graph analysis (1)
core/providers/bedrock/bedrock.go (2)
core/schemas/account.go (1)
  • BedrockKeyConfig (57-65)
ui/lib/types/config.ts (1)
  • BedrockKeyConfig (63-71)
🔇 Additional comments (12)
plugins/otel/version (1)

1-1: LGTM! Version bump aligns with bug fixes.

The patch version increment from 1.0.49 to 1.0.50 is appropriate for the bug fixes delivered in this PR (Bedrock ARN handling, content block normalization for Anthropic/Gemini).

plugins/telemetry/changelog.md (1)

1-1: LGTM!

The changelog entry correctly documents the core and framework version bumps that this plugin depends on.

plugins/telemetry/version (1)

1-1: LGTM!

Version bump to 1.3.50 aligns with the changelog entry and the coordinated release across the ecosystem.

plugins/governance/version (1)

1-1: LGTM!

Version bump to 1.3.51 is consistent with the coordinated release pattern across plugins.

plugins/mocker/changelog.md (1)

1-1: LGTM!

The changelog entry correctly documents the core and framework version bumps.

docs/providers/custom-providers.mdx (1)

4-4: LGTM!

The icon update from "gears" to "gear" aligns with the broader icon standardization across provider documentation mentioned in this PR.

core/providers/bedrock/bedrock.go (1)

2739-2742: LGTM! Empty ARN check correctly prevents invalid path construction.

The added condition *key.BedrockKeyConfig.ARN != "" properly handles the case where ARN is set to an empty string, preventing Bedrock requests from failing with an invalid ARN-scoped model path. This ensures that only non-nil and non-empty ARN values trigger the ARN-based encoding logic.

docs/providers/huggingface.mdx (1)

17-44: Well-structured provider capabilities documentation.

The new "Supported Inference Providers" section provides comprehensive and actionable information about which inference backends support different operations. The table format makes it easy to understand provider capabilities at a glance, and the notes appropriately clarify that checkmarks indicate provider-native support and that capabilities may evolve.

transports/changelog.md (1)

1-8: LGTM! Changelog entries accurately reflect PR changes.

The changelog comprehensively documents all fixes and features introduced in this PR, including proper attribution for community contributions.

core/changelog.md (1)

1-7: LGTM! Core changelog entries are consistent and complete.

The changelog accurately documents all core-level changes from this PR with proper attributions.

docs/providers/supported-providers.mdx (1)

39-58: Clear legend and operation semantics enhance table usability.

The legend explaining 🟡/❌/✅ symbols and the detailed notes about operation mappings (Models, Text, Responses, TTS/STT, Files, Batch) provide essential context that helps users correctly interpret the provider support matrix.

docs/docs.json (1)

74-81: Excellent navigation reorganization elevates provider documentation.

Moving the "Providers" group to the Quick Start level and separating it from "SDK Integrations" significantly improves documentation structure. This change makes provider configuration more discoverable since it's a fundamental aspect of using Bifrost, and the separation clarifies the distinction between choosing/configuring providers versus using provider-specific SDKs.


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

Copy link
Collaborator Author

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

@github-actions
Copy link
Contributor

🧪 Test Suite Available

This PR can be tested by a repository admin.

Run tests for PR #1139

@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 12-19-fix_minor_fixes_and_doc_updates branch 2 times, most recently from 3a7ca06 to 72d37ae Compare December 19, 2025 12:10
Copy link
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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/providers/custom-providers.mdx (1)

457-459: Fix broken relative links to feature documentation.

The links at lines 457-459 use relative paths (./fallbacks, ./keys-management, ./governance) but these files are located in the features/ directory, not in providers/. Update these to:

  • ../features/fallbacks (instead of ./fallbacks)
  • ../features/keys-management (instead of ./keys-management)
  • ../features/governance (instead of ./governance)
🧹 Nitpick comments (3)
transports/changelog.md (1)

1-2: Inconsistent attribution formatting.

Lines 1–2 include GitHub attributions, but lines 3–8 lack them. Ensure consistent formatting across changelog entries for contributors.

docs/providers/supported-providers.mdx (1)

11-11: Consider using standard markdown link syntax.

The underlined links using <u> tags are non-standard markdown. Standard markdown link syntax [text](url) is more portable and universally supported.

🔎 Suggested change
-Bifrost can also act as a provider-compatible gateway (for example, <u>[Anthropic](../../integrations/anthropic-sdk/overview)</u>, <u>[Google Gemini](../../integrations/genai-sdk/overview)</u>, <u>Cohere</u>, <u>[Bedrock](../../integrations/bedrock-sdk/overview)</u>, and others), exposing provider-specific endpoints so you can use existing provider SDKs or integrations with no code changes, see [What is an integration?](../../integrations/what-is-an-integration) for details.
+Bifrost can also act as a provider-compatible gateway (for example, [Anthropic](../../integrations/anthropic-sdk/overview), [Google Gemini](../../integrations/genai-sdk/overview), Cohere, [Bedrock](../../integrations/bedrock-sdk/overview), and others), exposing provider-specific endpoints so you can use existing provider SDKs or integrations with no code changes, see [What is an integration?](../../integrations/what-is-an-integration) for details.
docs/providers/huggingface.mdx (1)

36-36: Clarify or remove redundant note.

The note "Currently we do not support Speech and Transcription on it" is redundant with the ❌ marks in the TTS and ASR columns. Consider either removing the note or clarifying why this particular provider is called out (e.g., if support is planned, or if there's a technical reason worth highlighting).

🔎 Suggested change
-| `replicate` | ❌ | ❌ | ✅ | ✅ | Currently we do not support Speech and Transcription on it| 
+| `replicate` | ❌ | ❌ | ✅ | ✅ | Speech and Transcription planned for future support |

Or simply remove the note if there's no additional context to provide:

-| `replicate` | ❌ | ❌ | ✅ | ✅ | Currently we do not support Speech and Transcription on it| 
+| `replicate` | ❌ | ❌ | ✅ | ✅ | |
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 21dd198 and 72d37ae.

📒 Files selected for processing (30)
  • core/changelog.md (1 hunks)
  • core/providers/anthropic/chat.go (1 hunks)
  • core/providers/bedrock/bedrock.go (1 hunks)
  • core/providers/bedrock/chat.go (1 hunks)
  • core/providers/gemini/chat.go (2 hunks)
  • core/version (1 hunks)
  • docs/docs.json (1 hunks)
  • docs/providers/custom-providers.mdx (1 hunks)
  • docs/providers/huggingface.mdx (2 hunks)
  • docs/providers/supported-providers.mdx (1 hunks)
  • framework/changelog.md (1 hunks)
  • framework/version (1 hunks)
  • plugins/governance/changelog.md (1 hunks)
  • plugins/governance/version (1 hunks)
  • plugins/jsonparser/changelog.md (1 hunks)
  • plugins/jsonparser/version (1 hunks)
  • plugins/logging/changelog.md (1 hunks)
  • plugins/logging/version (1 hunks)
  • plugins/maxim/changelog.md (1 hunks)
  • plugins/maxim/version (1 hunks)
  • plugins/mocker/changelog.md (1 hunks)
  • plugins/mocker/version (1 hunks)
  • plugins/otel/changelog.md (1 hunks)
  • plugins/otel/version (1 hunks)
  • plugins/semanticcache/changelog.md (1 hunks)
  • plugins/semanticcache/version (1 hunks)
  • plugins/telemetry/changelog.md (1 hunks)
  • plugins/telemetry/version (1 hunks)
  • transports/changelog.md (1 hunks)
  • transports/version (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

always check the stack if there is one for the current PR. do not give localized reviews for the PR, always see all changes in the light of the whole stack of PRs (if there is a stack, if there is no stack you can continue to make localized suggestions/reviews)

Files:

  • plugins/jsonparser/changelog.md
  • plugins/maxim/changelog.md
  • plugins/logging/version
  • plugins/otel/version
  • plugins/governance/changelog.md
  • core/providers/gemini/chat.go
  • plugins/governance/version
  • plugins/otel/changelog.md
  • docs/providers/supported-providers.mdx
  • plugins/logging/changelog.md
  • plugins/semanticcache/changelog.md
  • core/changelog.md
  • docs/providers/huggingface.mdx
  • core/providers/anthropic/chat.go
  • plugins/mocker/version
  • core/providers/bedrock/chat.go
  • transports/changelog.md
  • plugins/telemetry/changelog.md
  • transports/version
  • plugins/telemetry/version
  • docs/providers/custom-providers.mdx
  • plugins/semanticcache/version
  • plugins/mocker/changelog.md
  • framework/changelog.md
  • core/version
  • framework/version
  • plugins/maxim/version
  • plugins/jsonparser/version
  • core/providers/bedrock/bedrock.go
  • docs/docs.json
🧠 Learnings (3)
📚 Learning: 2025-12-09T17:07:42.007Z
Learnt from: qwerty-dvorak
Repo: maximhq/bifrost PR: 1006
File: core/schemas/account.go:9-18
Timestamp: 2025-12-09T17:07:42.007Z
Learning: In core/schemas/account.go, the HuggingFaceKeyConfig field within the Key struct is currently unused and reserved for future Hugging Face inference endpoint deployments. Do not flag this field as missing from OpenAPI documentation or require its presence in the API spec until the feature is actively implemented and used. When the feature is added, update the OpenAPI docs accordingly; otherwise, treat this field as non-breaking and not part of the current API surface.

Applied to files:

  • core/providers/gemini/chat.go
  • core/providers/anthropic/chat.go
  • core/providers/bedrock/chat.go
  • core/providers/bedrock/bedrock.go
📚 Learning: 2025-12-19T09:26:54.961Z
Learnt from: qwerty-dvorak
Repo: maximhq/bifrost PR: 1006
File: core/providers/utils/utils.go:1050-1051
Timestamp: 2025-12-19T09:26:54.961Z
Learning: Update streaming end-marker handling so HuggingFace is treated as a non-[DONE] provider for backends that do not emit a DONE marker (e.g., meta llama on novita). In core/providers/utils/utils.go, adjust ProviderSendsDoneMarker() (or related logic) to detect providers that may not emit DONE and avoid relying on DONE as the sole end signal. Add tests to cover both DONE-emitting and non-DONE backends, with clear documentation in code comments explaining the rationale and any fallback behavior.

Applied to files:

  • core/providers/gemini/chat.go
  • core/providers/anthropic/chat.go
  • core/providers/bedrock/chat.go
  • core/providers/bedrock/bedrock.go
📚 Learning: 2025-12-12T10:28:54.988Z
Learnt from: Pratham-Mishra04
Repo: maximhq/bifrost PR: 978
File: core/providers/anthropic/chat.go:207-216
Timestamp: 2025-12-12T10:28:54.988Z
Learning: In core/providers/anthropic/chat.go, within ToAnthropicChatRequest, ensure the mapping from ReasoningDetails to Anthropic thinking blocks preserves all fields from ReasoningDetails, including when Text is nil or empty. Do not drop or coerce missing Text; propagate nil/empty values to maintain complete bidirectional mapping of Anthropic events in Bifrost. Add tests to verify that ReasoningDetails with Text nil or "" round-trip without loss, and update code to handle nullable Text without dropping data. If there are multiple blocks, preserve order and all fields during mapping.

Applied to files:

  • core/providers/anthropic/chat.go
🧬 Code graph analysis (4)
core/providers/gemini/chat.go (1)
core/schemas/chatcompletions.go (2)
  • ChatContentBlockTypeText (591-591)
  • ChatMessageContent (533-536)
core/providers/anthropic/chat.go (2)
core/providers/gemini/types.go (1)
  • Type (782-782)
core/schemas/chatcompletions.go (1)
  • ChatContentBlockTypeText (591-591)
core/providers/bedrock/chat.go (2)
core/providers/gemini/types.go (1)
  • Type (782-782)
core/schemas/chatcompletions.go (1)
  • ChatContentBlockTypeText (591-591)
core/providers/bedrock/bedrock.go (2)
core/schemas/account.go (1)
  • BedrockKeyConfig (57-65)
ui/lib/types/config.ts (1)
  • BedrockKeyConfig (63-71)
🔇 Additional comments (30)
plugins/mocker/changelog.md (1)

1-1: Changelog entry is clear and consistent.

The entry correctly documents dependency version bumps to core 1.2.40 and framework 1.1.50, aligning with other changelog entries in the PR.

plugins/jsonparser/version (1)

1-1: Version bump is consistent with patch-level changes in this release.

plugins/otel/version (1)

1-1: Version bump is consistent with patch-level changes in this release.

plugins/telemetry/changelog.md (1)

1-1: Changelog entry accurately reflects dependency version updates.

The entry is consistent with corresponding bumps across core, framework, and other plugins in the PR.

core/version (1)

1-1: Core version bump is properly documented across all dependent components.

The 1.2.40 release is consistently referenced in changelog entries throughout the PR, confirming proper version coordination.

plugins/semanticcache/version (1)

1-1: Version bump is consistent with patch-level changes in this release.

plugins/mocker/version (1)

1-1: Version bump is consistent with patch-level changes in this release.

plugins/logging/version (1)

1-1: LGTM - coordinated version bump.

The patch-level version bump to 1.3.51 aligns with the coordinated release across modules and is appropriate for the bug fixes in this PR.

plugins/governance/changelog.md (1)

1-1: LGTM - changelog entry is accurate.

The changelog entry correctly documents the coordinated dependency bumps.

framework/version (1)

1-1: LGTM - framework version bump is appropriate.

The patch-level bump to 1.1.50 is consistent with the coordinated release and appropriate for the bug fixes described in the PR.

plugins/governance/version (1)

1-1: LGTM - version bump is consistent.

The patch-level bump to 1.3.51 aligns with the coordinated release across plugin modules.

plugins/maxim/version (1)

1-1: LGTM - version bump is appropriate.

The patch-level bump to 1.4.51 is consistent with the coordinated release.

plugins/otel/changelog.md (1)

1-1: LGTM - changelog entry is accurate.

The changelog entry correctly documents the coordinated dependency bumps to core 1.2.40 and framework 1.1.50.

plugins/semanticcache/changelog.md (1)

1-1: LGTM - changelog entry is consistent.

The changelog entry accurately documents the dependency version bumps.

transports/version (1)

1-1: LGTM - version bump is consistent.

The patch-level bump to 1.3.51 aligns with the coordinated release across modules.

plugins/logging/changelog.md (1)

1-1: LGTM!

The changelog entry correctly documents the dependency version bumps.

plugins/telemetry/version (1)

1-1: LGTM!

Version bump is consistent with the broader release updates in this PR.

core/providers/anthropic/chat.go (1)

368-371: LGTM!

The single content block promotion to ContentStr is correctly implemented. When there is exactly one text content block, it's promoted to the string representation and ContentBlocks is cleared to avoid duplication. This aligns with similar changes in Bedrock and Gemini providers for consistent response handling.

core/providers/bedrock/chat.go (1)

131-134: LGTM!

The single content block promotion to ContentStr mirrors the implementation in the Anthropic provider, ensuring consistent handling of single-text responses across providers.

core/providers/bedrock/bedrock.go (1)

2739-2742: LGTM!

The addition of the empty string check *key.BedrockKeyConfig.ARN != "" correctly fixes the Bedrock empty ARN issue. This ensures that when ARN is an empty string, the code falls back to the deployment-based path instead of constructing a malformed ARN-scoped identifier, preventing request failures.

core/changelog.md (1)

1-7: LGTM!

The changelog entries accurately document the fixes and features in this PR, including the Bedrock empty ARN fix (line 4) and the Anthropic single content block handling (line 5) that are visible in the code changes.

plugins/jsonparser/changelog.md (1)

1-1: LGTM!

The changelog entry correctly documents the dependency version bumps, consistent with other plugin changelog files in this PR.

plugins/maxim/changelog.md (1)

1-1: LGTM!

The changelog entry correctly documents the version bump coordination across core and framework modules.

transports/changelog.md (2)

3-3: Verify HuggingFace scope.

The PR objectives state "Expand HuggingFace provider documentation," but the changelog entry reads "feat: added HuggingFace provider." Clarify whether this is a new provider addition or documentation-only change. If documentation-only, the entry type should be docs or chore, not feat.


6-7: Verify scope of HTTP proxy and CA certificate entries.

The changelog includes "fix: added auth support in HTTP proxies" and "feat: added custom CA certificate support in proxies," which are not explicitly mentioned in the PR objectives. Confirm these changes are part of this PR and not from a stacked PR, and ensure they are properly documented in their respective implementation files.

docs/providers/supported-providers.mdx (1)

14-58: Excellent documentation expansion!

The new Provider Support Matrix is comprehensive and well-organized. The legend with status symbols (🟡, ✅, ❌) and the detailed notes section make it easy for users to understand provider capabilities at a glance.

docs/docs.json (1)

74-81: Well-structured navigation reorganization!

The renaming of "Provider Integrations" to "Providers" with a dedicated section and explicit page list improves documentation discoverability. The separation between provider documentation and SDK integrations is logical and user-friendly.

docs/providers/custom-providers.mdx (1)

4-4: Icon change looks good.

The change from "gears" to "gear" maintains consistency with other documentation pages.

docs/providers/huggingface.mdx (2)

2-5: Updated metadata improves documentation discoverability.

The updated title, description, and icon make the HuggingFace provider documentation more accessible and aligned with the overall documentation structure.


17-44: Comprehensive inference provider documentation!

The new section thoroughly documents the 20+ inference backends supported by the HuggingFace provider. The capability matrix and accompanying notes provide clear guidance for users selecting inference providers.

Copy link
Collaborator Author

@coderabbitai full review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 19, 2025

✅ Actions performed

Full review triggered.

@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 12-19-fix_minor_fixes_and_doc_updates branch from 72d37ae to 4061cf3 Compare December 19, 2025 12:24
Copy link
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: 1

♻️ Duplicate comments (3)
docs/providers/supported-providers.mdx (1)

30-30: Fix inconsistent table cell spacing (previously flagged).

Line 30 still has the spacing inconsistency that was identified in a previous review: |❌ | ❌ | near the end of the Nebius row. Some cells are missing the space after the opening pipe separator.

🔎 Proposed fix
-| Nebius (`nebius/<model>`) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |❌ | ❌ |
+| Nebius (`nebius/<model>`) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
framework/changelog.md (1)

1-1: Update changelog entry to include framework version bump.

The changelog entry only mentions the core bump to 1.2.40 but omits the framework bump to 1.1.50. This is inconsistent with the pattern used in plugins/governance, plugins/telemetry, plugins/mocker, and plugins/otel changelogs, which all state "chore: bump core to 1.2.40 and framework to 1.1.50".

Update the entry to match the established pattern for consistency.

core/providers/gemini/chat.go (1)

149-159: Critical: Single text block content is still lost (duplicate issue).

This is the same critical bug flagged in the previous review. When there is exactly one text block, lines 149-152 set contentStr and clear contentBlocks to nil. However, line 154's condition len(contentBlocks) > 0 evaluates to false when contentBlocks is nil, so message.Content is never created and the single text content is lost.

The fix is to always create message.Content when either contentStr is set or contentBlocks has items, as suggested in the previous review.

🔎 Apply the previously suggested fix

Option 1 - Check for contentStr:

-		if len(contentBlocks) > 0 {
+		if contentStr != nil || len(contentBlocks) > 0 {
 			message.Content = &schemas.ChatMessageContent{
 				ContentStr:    contentStr,
 				ContentBlocks: contentBlocks,
 			}
 		}

Option 2 - Always create content (like Anthropic):

+		// Always create message content to preserve contentStr even when contentBlocks is nil
+		message.Content = &schemas.ChatMessageContent{
+			ContentStr:    contentStr,
+			ContentBlocks: contentBlocks,
+		}
-		if len(contentBlocks) > 0 {
-			message.Content = &schemas.ChatMessageContent{
-				ContentStr:    contentStr,
-				ContentBlocks: contentBlocks,
-			}
-		}
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 21dd198 and 72d37ae.

📒 Files selected for processing (30)
  • core/changelog.md (1 hunks)
  • core/providers/anthropic/chat.go (1 hunks)
  • core/providers/bedrock/bedrock.go (1 hunks)
  • core/providers/bedrock/chat.go (1 hunks)
  • core/providers/gemini/chat.go (2 hunks)
  • core/version (1 hunks)
  • docs/docs.json (1 hunks)
  • docs/providers/custom-providers.mdx (1 hunks)
  • docs/providers/huggingface.mdx (2 hunks)
  • docs/providers/supported-providers.mdx (1 hunks)
  • framework/changelog.md (1 hunks)
  • framework/version (1 hunks)
  • plugins/governance/changelog.md (1 hunks)
  • plugins/governance/version (1 hunks)
  • plugins/jsonparser/changelog.md (1 hunks)
  • plugins/jsonparser/version (1 hunks)
  • plugins/logging/changelog.md (1 hunks)
  • plugins/logging/version (1 hunks)
  • plugins/maxim/changelog.md (1 hunks)
  • plugins/maxim/version (1 hunks)
  • plugins/mocker/changelog.md (1 hunks)
  • plugins/mocker/version (1 hunks)
  • plugins/otel/changelog.md (1 hunks)
  • plugins/otel/version (1 hunks)
  • plugins/semanticcache/changelog.md (1 hunks)
  • plugins/semanticcache/version (1 hunks)
  • plugins/telemetry/changelog.md (1 hunks)
  • plugins/telemetry/version (1 hunks)
  • transports/changelog.md (1 hunks)
  • transports/version (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

always check the stack if there is one for the current PR. do not give localized reviews for the PR, always see all changes in the light of the whole stack of PRs (if there is a stack, if there is no stack you can continue to make localized suggestions/reviews)

Files:

  • plugins/telemetry/changelog.md
  • framework/version
  • plugins/maxim/version
  • plugins/mocker/changelog.md
  • core/providers/bedrock/bedrock.go
  • core/providers/anthropic/chat.go
  • plugins/logging/changelog.md
  • transports/changelog.md
  • docs/providers/custom-providers.mdx
  • plugins/governance/changelog.md
  • plugins/semanticcache/version
  • docs/providers/supported-providers.mdx
  • plugins/otel/version
  • core/version
  • plugins/otel/changelog.md
  • core/providers/gemini/chat.go
  • core/providers/bedrock/chat.go
  • plugins/maxim/changelog.md
  • framework/changelog.md
  • docs/providers/huggingface.mdx
  • plugins/mocker/version
  • docs/docs.json
  • plugins/jsonparser/version
  • core/changelog.md
  • plugins/logging/version
  • plugins/semanticcache/changelog.md
  • transports/version
  • plugins/governance/version
  • plugins/jsonparser/changelog.md
  • plugins/telemetry/version
🧠 Learnings (3)
📚 Learning: 2025-12-09T17:07:42.007Z
Learnt from: qwerty-dvorak
Repo: maximhq/bifrost PR: 1006
File: core/schemas/account.go:9-18
Timestamp: 2025-12-09T17:07:42.007Z
Learning: In core/schemas/account.go, the HuggingFaceKeyConfig field within the Key struct is currently unused and reserved for future Hugging Face inference endpoint deployments. Do not flag this field as missing from OpenAPI documentation or require its presence in the API spec until the feature is actively implemented and used. When the feature is added, update the OpenAPI docs accordingly; otherwise, treat this field as non-breaking and not part of the current API surface.

Applied to files:

  • core/providers/bedrock/bedrock.go
  • core/providers/anthropic/chat.go
  • core/providers/gemini/chat.go
  • core/providers/bedrock/chat.go
📚 Learning: 2025-12-19T09:26:54.961Z
Learnt from: qwerty-dvorak
Repo: maximhq/bifrost PR: 1006
File: core/providers/utils/utils.go:1050-1051
Timestamp: 2025-12-19T09:26:54.961Z
Learning: Update streaming end-marker handling so HuggingFace is treated as a non-[DONE] provider for backends that do not emit a DONE marker (e.g., meta llama on novita). In core/providers/utils/utils.go, adjust ProviderSendsDoneMarker() (or related logic) to detect providers that may not emit DONE and avoid relying on DONE as the sole end signal. Add tests to cover both DONE-emitting and non-DONE backends, with clear documentation in code comments explaining the rationale and any fallback behavior.

Applied to files:

  • core/providers/bedrock/bedrock.go
  • core/providers/anthropic/chat.go
  • core/providers/gemini/chat.go
  • core/providers/bedrock/chat.go
📚 Learning: 2025-12-12T10:28:54.988Z
Learnt from: Pratham-Mishra04
Repo: maximhq/bifrost PR: 978
File: core/providers/anthropic/chat.go:207-216
Timestamp: 2025-12-12T10:28:54.988Z
Learning: In core/providers/anthropic/chat.go, within ToAnthropicChatRequest, ensure the mapping from ReasoningDetails to Anthropic thinking blocks preserves all fields from ReasoningDetails, including when Text is nil or empty. Do not drop or coerce missing Text; propagate nil/empty values to maintain complete bidirectional mapping of Anthropic events in Bifrost. Add tests to verify that ReasoningDetails with Text nil or "" round-trip without loss, and update code to handle nullable Text without dropping data. If there are multiple blocks, preserve order and all fields during mapping.

Applied to files:

  • core/providers/anthropic/chat.go
🧬 Code graph analysis (4)
core/providers/bedrock/bedrock.go (2)
core/schemas/account.go (1)
  • BedrockKeyConfig (57-65)
ui/lib/types/config.ts (1)
  • BedrockKeyConfig (63-71)
core/providers/anthropic/chat.go (1)
core/schemas/chatcompletions.go (1)
  • ChatContentBlockTypeText (591-591)
core/providers/gemini/chat.go (2)
core/providers/gemini/types.go (2)
  • Type (782-782)
  • Content (977-985)
core/schemas/chatcompletions.go (2)
  • ChatContentBlockTypeText (591-591)
  • ChatMessageContent (533-536)
core/providers/bedrock/chat.go (2)
core/providers/gemini/types.go (1)
  • Type (782-782)
core/schemas/chatcompletions.go (1)
  • ChatContentBlockTypeText (591-591)
🔇 Additional comments (28)
docs/providers/custom-providers.mdx (1)

4-4: LGTM! Icon metadata updated for consistency.

The icon change from "gears" to "gear" aligns with the documentation reorganization efforts across provider docs.

docs/providers/huggingface.mdx (2)

2-4: LGTM! Metadata improvements enhance documentation discoverability.

The simplified title and added icon improve the documentation's presentation and navigation experience.


17-45: [Your rewritten review comment text here]
[Exactly ONE classification tag]

docs/docs.json (1)

74-81: LGTM! Navigation restructure improves documentation organization.

The renaming of "Provider Integrations" to "Providers" with explicit page listings and the new "solar-system" icon enhances the documentation's information architecture and aligns with the PR's reorganization objectives.

docs/providers/supported-providers.mdx (2)

4-4: LGTM! Icon update aligns with documentation theme.

The icon change from "layer-group" to "bars-progress" better represents the provider support matrix concept.


14-58: Excellent addition of comprehensive Provider Support Matrix.

The new Provider Support Matrix section with legend and detailed notes significantly improves the documentation by providing users with a clear, at-a-glance view of provider capabilities across all operations.

plugins/maxim/version (1)

1-1: LGTM!

Version bump is consistent with the broader version updates across the repository.

plugins/mocker/version (1)

1-1: LGTM!

Version bump aligns with the coordinated version updates in this PR.

plugins/governance/changelog.md (1)

1-1: LGTM!

Changelog entry follows the consistent pattern established across plugin changelogs in this PR.

plugins/telemetry/changelog.md (1)

1-1: LGTM!

Changelog entry is consistent with the version bump pattern used across other plugin changelogs.

plugins/logging/version (1)

1-1: LGTM!

Version bump is part of the coordinated version updates across the repository.

plugins/mocker/changelog.md (1)

1-1: LGTM!

Changelog entry follows the consistent pattern for documenting version bumps across the repository.

plugins/otel/changelog.md (1)

1-1: LGTM!

Changelog entry is consistent with the version bump documentation pattern used throughout the PR.

core/version (1)

1-1: LGTM!

Version bump to 1.2.40 aligns with the bug fixes and improvements in this PR.

plugins/logging/changelog.md (1)

1-1: LGTM!

Changelog entry correctly documents the dependency version bumps.

framework/version (1)

1-1: LGTM!

Version bump to 1.1.50 is consistent with the coordinated release across core and plugins.

plugins/jsonparser/version (1)

1-1: LGTM!

Version bump to 1.3.51 aligns with the updated core and framework dependencies.

plugins/jsonparser/changelog.md (1)

1-1: LGTM!

Changelog entry correctly documents the dependency version bumps, consistent with other plugin changelogs in this PR.

plugins/maxim/changelog.md (1)

1-1: LGTM!

The changelog entry appropriately documents the core and framework version bumps.

plugins/governance/version (1)

1-1: LGTM!

Version bump is consistent with the coordinated release across components.

plugins/otel/version (1)

1-1: LGTM!

Version bump is part of the coordinated release.

plugins/semanticcache/changelog.md (1)

1-1: LGTM!

Changelog entry appropriately documents the dependency version bumps.

transports/version (1)

1-1: LGTM!

Version bump aligns with the coordinated release.

plugins/telemetry/version (1)

1-1: LGTM!

Version bump is consistent with the release cycle.

plugins/semanticcache/version (1)

1-1: LGTM!

Version bump is part of the coordinated release.

core/providers/anthropic/chat.go (1)

368-371: Approve the single text block normalization logic.

The implementation correctly simplifies responses by promoting a single text content block to ContentStr format. The change is safe since text blocks are only added when c.Text != nil (line 323). This normalization is consistently applied across all three providers:

  • Bedrock (lines 131-133 in core/providers/bedrock/chat.go)
  • Gemini (lines 149-151 in core/providers/gemini/chat.go)
  • Anthropic (lines 368-371 in core/providers/anthropic/chat.go)

However, the current test suite does not include explicit unit tests for this normalization behavior. The existing test framework (anthropic_test.go) covers comprehensive integration scenarios but not the specific single text block promotion logic.

core/providers/bedrock/bedrock.go (1)

2739-2742: Good fix: Empty ARN now treated as absent.

The added check *key.BedrockKeyConfig.ARN != "" correctly prevents the code from constructing an invalid ARN-scoped model path when the ARN is an empty string. This defensive check aligns with the PR's fix for "bedrock empty ARN issue causing request to fail."

core/providers/bedrock/chat.go (1)

131-140: LGTM: Single text block promotion is correctly implemented.

The single text block promotion logic (lines 131-134) is correctly paired with unconditional messageContent creation (lines 136-140). Unlike the Gemini provider, this implementation always creates the ChatMessageContent structure regardless of whether contentBlocks is nil, so single text content is properly preserved.

This is the correct pattern and aligns with the fix suggested for the Gemini provider.

@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 12-19-fix_minor_fixes_and_doc_updates branch from 4061cf3 to cfea158 Compare December 19, 2025 12:29
Copy link
Collaborator Author

Pratham-Mishra04 commented Dec 19, 2025

Merge activity

  • Dec 19, 12:47 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Dec 19, 12:47 PM UTC: @Pratham-Mishra04 merged this pull request with Graphite.

@Pratham-Mishra04 Pratham-Mishra04 merged commit 986471a into main Dec 19, 2025
9 checks passed
@Pratham-Mishra04 Pratham-Mishra04 deleted the 12-19-fix_minor_fixes_and_doc_updates branch December 19, 2025 12:47
@coderabbitai coderabbitai bot mentioned this pull request Dec 20, 2025
16 tasks
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