-
Notifications
You must be signed in to change notification settings - Fork 184
fix: handle single content blocks and empty ARN in Bedrock and Anthropic #1139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughPromotes 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (30)
✅ Files skipped from review due to trivial changes (7)
🚧 Files skipped from review as they are similar to previous changes (11)
🧰 Additional context used📓 Path-based instructions (1)**⚙️ CodeRabbit configuration file
Files:
🧠 Learnings (2)📚 Learning: 2025-12-09T17:07:42.007ZApplied to files:
📚 Learning: 2025-12-19T09:26:54.961ZApplied to files:
🧬 Code graph analysis (1)core/providers/bedrock/bedrock.go (2)
🔇 Additional comments (12)
Comment |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
🧪 Test Suite AvailableThis PR can be tested by a repository admin. |
3a7ca06 to
72d37ae
Compare
There was a problem hiding this 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
📒 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.mdplugins/maxim/changelog.mdplugins/logging/versionplugins/otel/versionplugins/governance/changelog.mdcore/providers/gemini/chat.goplugins/governance/versionplugins/otel/changelog.mddocs/providers/supported-providers.mdxplugins/logging/changelog.mdplugins/semanticcache/changelog.mdcore/changelog.mddocs/providers/huggingface.mdxcore/providers/anthropic/chat.goplugins/mocker/versioncore/providers/bedrock/chat.gotransports/changelog.mdplugins/telemetry/changelog.mdtransports/versionplugins/telemetry/versiondocs/providers/custom-providers.mdxplugins/semanticcache/versionplugins/mocker/changelog.mdframework/changelog.mdcore/versionframework/versionplugins/maxim/versionplugins/jsonparser/versioncore/providers/bedrock/bedrock.godocs/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.gocore/providers/anthropic/chat.gocore/providers/bedrock/chat.gocore/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.gocore/providers/anthropic/chat.gocore/providers/bedrock/chat.gocore/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
ContentStris correctly implemented. When there is exactly one text content block, it's promoted to the string representation andContentBlocksis 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
ContentStrmirrors 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
docsorchore, notfeat.
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.
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
72d37ae to
4061cf3
Compare
There was a problem hiding this 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
contentStrand clearcontentBlockstonil. However, line 154's conditionlen(contentBlocks) > 0evaluates to false whencontentBlocksisnil, somessage.Contentis never created and the single text content is lost.The fix is to always create
message.Contentwhen eithercontentStris set orcontentBlockshas 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
📒 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.mdframework/versionplugins/maxim/versionplugins/mocker/changelog.mdcore/providers/bedrock/bedrock.gocore/providers/anthropic/chat.goplugins/logging/changelog.mdtransports/changelog.mddocs/providers/custom-providers.mdxplugins/governance/changelog.mdplugins/semanticcache/versiondocs/providers/supported-providers.mdxplugins/otel/versioncore/versionplugins/otel/changelog.mdcore/providers/gemini/chat.gocore/providers/bedrock/chat.goplugins/maxim/changelog.mdframework/changelog.mddocs/providers/huggingface.mdxplugins/mocker/versiondocs/docs.jsonplugins/jsonparser/versioncore/changelog.mdplugins/logging/versionplugins/semanticcache/changelog.mdtransports/versionplugins/governance/versionplugins/jsonparser/changelog.mdplugins/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.gocore/providers/anthropic/chat.gocore/providers/gemini/chat.gocore/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.gocore/providers/anthropic/chat.gocore/providers/gemini/chat.gocore/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
ContentStrformat. The change is safe since text blocks are only added whenc.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
messageContentcreation (lines 136-140). Unlike the Gemini provider, this implementation always creates theChatMessageContentstructure regardless of whethercontentBlocksis nil, so single text content is properly preserved.This is the correct pattern and aligns with the fix suggested for the Gemini provider.
4061cf3 to
cfea158
Compare
Merge activity
|

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
Type of change
Affected areas
How to test
Test the Bedrock provider with empty ARN configuration:
Test Anthropic and Bedrock providers with single context block responses:
Screenshots/Recordings
N/A
Breaking changes
Related issues
Fixes issues with Bedrock empty ARN and improves response handling for Anthropic and Bedrock providers.
Security considerations
No security implications.
Checklist
docs/contributing/README.mdand followed the guidelines