Skip to content

Conversation

@siillee
Copy link
Contributor

@siillee siillee commented Nov 25, 2025

Description

Added support for AWS Bedrock, and the models that are available there. This was a contributor PR that was never finished, so now I polished it up and made it work.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Other (please specify):

Screenshots/Videos (if applicable)

Pre-submission Checklist

  • I have tested my changes thoroughly before submitting this PR
  • This PR contains minimal changes necessary to address the issue/feature
  • My code follows the project's coding standards and style guidelines
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if applicable)
  • All new and existing tests pass
  • I have searched existing PRs to ensure this change hasn't been submitted already
  • I have linked any relevant issues in the description
  • My commits have clear and descriptive messages

DCO Affirmation

I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin.

Summary by CodeRabbit

  • New Features
    • Added AWS Bedrock as a new LLM provider with support for multiple authentication methods.
    • Integrated three new AI models: Claude 4.5 Sonnet, Claude 4.5 Haiku, and Amazon Nova Lite.

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

xavierdurawa and others added 10 commits September 1, 2025 20:47
- Resolved conflicts in test_suites.yml to include both OpenRouter and Bedrock tests
- Updated add.py to include bedrock provider with latest dev branch model defaults
- Resolved uv.lock conflicts by using dev branch version
- Reverted README.md to original state
- Reverted cognee-starter-kit/README.md to original state
- Documentation will be updated separately by maintainers
@siillee siillee self-assigned this Nov 25, 2025
@pull-checklist
Copy link

Please make sure all the checkboxes are checked:

  • I have tested these changes locally.
  • I have reviewed the code changes.
  • I have added end-to-end and unit tests (if applicable).
  • I have updated the documentation and README.md file (if necessary).
  • I have removed unnecessary code and debug statements.
  • PR title is clear and follows the convention.
  • I have tagged reviewers or team members for feedback.

@gitguardian
Copy link

gitguardian bot commented Nov 25, 2025

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
9573981 Triggered Generic Password 06a3458 .github/workflows/temporal_graph_tests.yml View secret
8719688 Triggered Generic Password 06a3458 .github/workflows/temporal_graph_tests.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

Walkthrough

Adds AWS Bedrock as a new LLM provider to the system. Changes include three GitHub Actions jobs for Bedrock testing, a new BedrockAdapter class supporting multiple authentication methods, configuration extensions for Bedrock settings, and provider enum and settings updates to expose Bedrock as a selectable LLM option.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/test_llms.yml
Added three new jobs (test-bedrock-api-key, test-bedrock-aws-credentials, test-bedrock-aws-profile) to test Bedrock integration with API key, AWS credentials, and AWS profile authentication methods.
Bedrock LLM Adapter
cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/adapter.py, cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/__init__.py
Introduced new BedrockAdapter class implementing LLMInterface with support for three authentication methods (API key, AWS credentials, AWS profile), async/sync structured output generation, prompt handling with system prompt validation, rate limiting, and content policy error handling.
LLM Provider Integration
cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/get_llm_client.py, cognee/modules/settings/get_settings.py
Added BEDROCK provider to LLMProvider enum and get_llm_client factory function; extended ModelName enum and llm_providers list; introduced bedrock model profile with three Claude and Amazon Nova models.
Configuration
cognee/infrastructure/files/storage/s3_config.py
Added two optional fields to S3Config: aws_profile_name and aws_bedrock_runtime_endpoint for Bedrock-specific configuration.
Documentation
cognee/api/v1/add/add.py
Updated environment variable documentation to include "bedrock" as an additional LLM provider option.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • BedrockAdapter implementation (adapter.py): Review authentication logic across three methods, async/sync implementations with decorators, error handling (ContentPolicyViolationError), and integration with existing rate limiter and telemetry mechanisms.
  • Multiple integration points: Changes span workflow configuration, LLM provider factory, settings/enum definitions, and S3 configuration, requiring consistency verification across layers.
  • AWS-specific configuration: Verify correct handling of AWS credentials, profile name, region, and runtime endpoint parameters.

Suggested labels

run-checks

Suggested reviewers

  • soobrosa

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add bedrock as supported llm provider' clearly and concisely summarizes the main change: adding AWS Bedrock as a new LLM provider option to the project.
Description check ✅ Passed The description provides a human-written explanation of changes, correctly identifies this as a new feature, includes the DCO affirmation, and demonstrates thorough pre-submission preparation with most checklist items completed.
✨ 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 feature/cog-3409-add-bedrock-as-supported-llm-provider

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@siillee siillee requested review from dexters1 and hajdul88 November 26, 2025 11:44
@siillee siillee marked this pull request as ready for review November 26, 2025 11:44
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: 4

🧹 Nitpick comments (6)
cognee/api/v1/add/add.py (1)

153-165: Consider documenting Bedrock-specific authentication and config variables.

The new "bedrock" option in LLM_PROVIDER looks consistent, but it would help to briefly call out which env vars are required when LLM_PROVIDER="bedrock" (e.g., whether LLM_API_KEY is used vs AWS credentials/profile and any region/model settings) and ensure the documented provider value matches exactly what the settings/enum accept, to avoid drift between docs and config behavior.

cognee/infrastructure/files/storage/s3_config.py (1)

12-13: Consider separating AWS/Bedrock config from S3-specific config.

Adding aws_bedrock_runtime_endpoint to S3Config couples Bedrock LLM configuration with S3 storage settings. While both share AWS credentials, the class name becomes semantically misleading.

A future refactor could extract shared AWS fields into a base AWSConfig class, with S3Config and BedrockConfig inheriting from it. This keeps the current PR non-breaking but improves cohesion long-term.

cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/get_llm_client.py (1)

174-188: Remove commented code and consider validating that at least one auth method is configured.

The commented-out API key check (lines 175-176) should be removed rather than left as dead code. Since Bedrock supports three authentication methods (API key, AWS credentials, AWS profile), consider adding validation that at least one is available:

     elif provider == LLMProvider.BEDROCK:
-        # if llm_config.llm_api_key is None and raise_api_key_error:
-        #     raise LLMAPIKeyNotSetError()
-
         from cognee.infrastructure.llm.structured_output_framework.litellm_instructor.llm.bedrock.adapter import (
             BedrockAdapter,
         )
+        from cognee.infrastructure.files.storage.s3_config import get_s3_config
+
+        s3_config = get_s3_config()
+        has_auth = (
+            llm_config.llm_api_key
+            or (s3_config.aws_access_key_id and s3_config.aws_secret_access_key)
+            or s3_config.aws_profile_name
+        )
+        if not has_auth and raise_api_key_error:
+            raise LLMAPIKeyNotSetError()

         return BedrockAdapter(

This ensures users get a clear early error if no authentication is configured, rather than a cryptic failure at request time.

.github/workflows/test_llms.yml (1)

156-163: Consider restricting file permissions on AWS credentials file.

The credentials file is created with default permissions. For defense-in-depth, explicitly set restrictive permissions:

       - name: Configure AWS Profile
         run: |
           mkdir -p ~/.aws
+          chmod 700 ~/.aws
           cat > ~/.aws/credentials << EOF
           [bedrock-test]
           aws_access_key_id = ${{ secrets.AWS_ACCESS_KEY_ID }}
           aws_secret_access_key = ${{ secrets.AWS_SECRET_ACCESS_KEY }}
           EOF
+          chmod 600 ~/.aws/credentials

While GitHub-hosted runners are ephemeral, this follows AWS security best practices and prevents issues if the workflow is reused in self-hosted environments.

cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/adapter.py (2)

146-152: Redundant conditional after system prompt validation.

Since MissingSystemPromptPathError is raised at line 145 when system_prompt is falsy, the conditional at line 150 (if system_prompt else None) is redundant—system_prompt will always be truthy at that point. However, note that LLMGateway.read_query_prompt could potentially return an empty string, so you may want to validate its return value instead.

-        system_prompt = LLMGateway.read_query_prompt(system_prompt)
-
-        formatted_prompt = (
-            f"""System Prompt:\n{system_prompt}\n\nUser Input:\n{text_input}\n"""
-            if system_prompt
-            else None
-        )
-        return formatted_prompt
+        system_prompt_content = LLMGateway.read_query_prompt(system_prompt)
+        if not system_prompt_content:
+            raise MissingSystemPromptPathError()
+
+        return f"System Prompt:\n{system_prompt_content}\n\nUser Input:\n{text_input}\n"

1-26: Consider adding logging for debugging Bedrock requests.

Per coding guidelines, use shared logging utilities from cognee.shared.logging_utils. Logging would help debug authentication issues and API errors, especially given the multiple authentication methods supported.

+from cognee.shared.logging_utils import get_logger
+
+logger = get_logger(__name__)

Then add logging in key places like _create_bedrock_request to log which authentication method is being used. Based on coding guidelines.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d4d190a and 8cad9ef.

📒 Files selected for processing (7)
  • .github/workflows/test_llms.yml (1 hunks)
  • cognee/api/v1/add/add.py (1 hunks)
  • cognee/infrastructure/files/storage/s3_config.py (1 hunks)
  • cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/__init__.py (1 hunks)
  • cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/adapter.py (1 hunks)
  • cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/get_llm_client.py (4 hunks)
  • cognee/modules/settings/get_settings.py (3 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Use 4-space indentation in Python code
Use snake_case for Python module and function names
Use PascalCase for Python class names
Use ruff format before committing Python code
Use ruff check for import hygiene and style enforcement with line-length 100 configured in pyproject.toml
Prefer explicit, structured error handling in Python code

Files:

  • cognee/infrastructure/files/storage/s3_config.py
  • cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/adapter.py
  • cognee/api/v1/add/add.py
  • cognee/modules/settings/get_settings.py
  • cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/__init__.py
  • cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/get_llm_client.py

⚙️ CodeRabbit configuration file

**/*.py: When reviewing Python code for this project:

  1. Prioritize portability over clarity, especially when dealing with cross-Python compatibility. However, with the priority in mind, do still consider improvements to clarity when relevant.
  2. As a general guideline, consider the code style advocated in the PEP 8 standard (excluding the use of spaces for indentation) and evaluate suggested changes for code style compliance.
  3. As a style convention, consider the code style advocated in CEP-8 and evaluate suggested changes for code style compliance.
  4. As a general guideline, try to provide any relevant, official, and supporting documentation links to any tool's suggestions in review comments. This guideline is important for posterity.
  5. As a general rule, undocumented function definitions and class definitions in the project's Python code are assumed incomplete. Please consider suggesting a short summary of the code for any of these incomplete definitions as docstrings when reviewing.

Files:

  • cognee/infrastructure/files/storage/s3_config.py
  • cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/adapter.py
  • cognee/api/v1/add/add.py
  • cognee/modules/settings/get_settings.py
  • cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/__init__.py
  • cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/get_llm_client.py
cognee/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Use shared logging utilities from cognee.shared.logging_utils in Python code

Files:

  • cognee/infrastructure/files/storage/s3_config.py
  • cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/adapter.py
  • cognee/api/v1/add/add.py
  • cognee/modules/settings/get_settings.py
  • cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/__init__.py
  • cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/get_llm_client.py
cognee/{modules,infrastructure,tasks}/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Co-locate feature-specific helpers under their respective package (modules/, infrastructure/, or tasks/)

Files:

  • cognee/infrastructure/files/storage/s3_config.py
  • cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/adapter.py
  • cognee/modules/settings/get_settings.py
  • cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/__init__.py
  • cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/get_llm_client.py
.github/**

⚙️ CodeRabbit configuration file

.github/**: * When the project is hosted on GitHub: All GitHub-specific configurations, templates, and tools should be found in the '.github' directory tree.

  • 'actionlint' erroneously generates false positives when dealing with GitHub's ${{ ... }} syntax in conditionals.
  • 'actionlint' erroneously generates incorrect solutions when suggesting the removal of valid ${{ ... }} syntax.

Files:

  • .github/workflows/test_llms.yml
cognee/api/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Public APIs should be type-annotated in Python where practical

Files:

  • cognee/api/v1/add/add.py
🧬 Code graph analysis (2)
cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/__init__.py (1)
cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/adapter.py (1)
  • BedrockAdapter (28-153)
cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/get_llm_client.py (1)
cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/adapter.py (1)
  • BedrockAdapter (28-153)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
  • GitHub Check: End-to-End Tests / Concurrent Subprocess access test
  • GitHub Check: End-to-End Tests / Test graph edge ingestion
  • GitHub Check: CLI Tests / CLI Functionality Tests
  • GitHub Check: CLI Tests / CLI Integration Tests
  • GitHub Check: End-to-End Tests / S3 Bucket Test
  • GitHub Check: End-to-End Tests / Test multi tenancy with different situations in Cognee
  • GitHub Check: End-to-End Tests / Test permissions with different situations in Cognee
  • GitHub Check: End-to-End Tests / Conversation sessions test (FS)
  • GitHub Check: End-to-End Tests / Test Feedback Enrichment
  • GitHub Check: End-to-End Tests / Conversation sessions test (Redis)
  • GitHub Check: End-to-End Tests / Test Entity Extraction
  • GitHub Check: Basic Tests / Run Integration Tests
  • GitHub Check: End-to-End Tests / Server Start Test
  • GitHub Check: End-to-End Tests / Deduplication Test
  • GitHub Check: Basic Tests / Run Unit Tests
  • GitHub Check: End-to-End Tests / Run Telemetry Pipeline Test
  • GitHub Check: Basic Tests / Run Simple Examples
🔇 Additional comments (9)
cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/__init__.py (1)

1-5: LGTM!

Clean module initialization with proper docstring and explicit __all__ export. This follows Python packaging conventions and provides a clear public API surface.

cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/get_llm_client.py (2)

27-36: LGTM!

The BEDROCK enum member and docstring update are properly aligned with the existing provider pattern.


158-160: LGTM!

Good fix adding the raise_api_key_error condition to match other providers' patterns.

cognee/modules/settings/get_settings.py (2)

19-19: LGTM!

The bedrock enum member follows the existing naming convention.


81-84: LGTM!

Bedrock provider entry follows the established pattern for provider configuration.

.github/workflows/test_llms.yml (2)

88-113: LGTM!

The API key authentication test job follows the established workflow pattern with proper setup and environment configuration.


115-141: Verify: EMBEDDING_API_KEY uses BEDROCK_API_KEY while LLM uses AWS credentials.

Line 137 uses BEDROCK_API_KEY for embedding while the LLM relies on AWS credentials (lines 134-135). This appears intentional to test AWS credential authentication for the LLM provider, but ensure the embedding provider also supports this mixed authentication scenario.

cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/adapter.py (2)

103-127: LGTM!

The async method properly implements rate limiting, retry logic, observability, and has appropriate error handling that distinguishes between content policy violations and other retry exceptions.


71-74: Incorrect message ordering: system message should precede user message.

The messages array places the user message before the system message. Standard LLM API convention (including Bedrock) expects the system message first to properly set the context for the conversation.

             "messages": [
-                {"role": "user", "content": text_input},
                 {"role": "system", "content": system_prompt},
+                {"role": "user", "content": text_input},
             ],

Likely an incorrect or invalid review comment.

Comment on lines +37 to +38
model: str
api_key: str
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Type hint mismatch for api_key.

The class attribute declares api_key: str, but the __init__ parameter defaults to None. Update the type hint for consistency with the Optional nature.

-    model: str
-    api_key: str
+    model: str
+    api_key: str | None
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
model: str
api_key: str
model: str
api_key: str | None
🤖 Prompt for AI Agents
In
cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/adapter.py
around lines 37 to 38, the class attribute declares api_key: str but the
__init__ parameter defaults to None; change the annotation to api_key:
Optional[str] and import Optional from typing (or use from typing import
Optional at the top) so the type matches the optional default, and update any
related type hints/usages in the file to accept Optional[str].

Comment on lines +53 to +56
self.aclient = instructor.from_litellm(
litellm.acompletion, mode=instructor.Mode(self.instructor_mode)
)
self.client = instructor.from_litellm(litellm.completion)
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Inconsistent instructor_mode between async and sync clients.

The async client (self.aclient) is configured with instructor.Mode(self.instructor_mode), but the sync client (self.client) does not use the mode parameter. This could cause different behavior between acreate_structured_output and create_structured_output.

         self.aclient = instructor.from_litellm(
             litellm.acompletion, mode=instructor.Mode(self.instructor_mode)
         )
-        self.client = instructor.from_litellm(litellm.completion)
+        self.client = instructor.from_litellm(
+            litellm.completion, mode=instructor.Mode(self.instructor_mode)
+        )

Comment on lines +129 to +138
@observe
@sleep_and_retry_sync()
@rate_limit_sync
def create_structured_output(
self, text_input: str, system_prompt: str, response_model: Type[BaseModel]
) -> BaseModel:
"""Generate structured output from AWS Bedrock API (synchronous)."""

request_params = self._create_bedrock_request(text_input, system_prompt, response_model)
return self.client.chat.completions.create(**request_params)
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Missing error handling in sync method.

The async version acreate_structured_output handles ContentPolicyViolationError and InstructorRetryException, but this sync version lacks equivalent handling. This inconsistency could expose raw exceptions to callers using the sync API.

     @observe
     @sleep_and_retry_sync()
     @rate_limit_sync
     def create_structured_output(
         self, text_input: str, system_prompt: str, response_model: Type[BaseModel]
     ) -> BaseModel:
         """Generate structured output from AWS Bedrock API (synchronous)."""
 
-        request_params = self._create_bedrock_request(text_input, system_prompt, response_model)
-        return self.client.chat.completions.create(**request_params)
+        try:
+            request_params = self._create_bedrock_request(text_input, system_prompt, response_model)
+            return self.client.chat.completions.create(**request_params)
+
+        except (
+            ContentPolicyViolationError,
+            InstructorRetryException,
+        ) as error:
+            if (
+                isinstance(error, InstructorRetryException)
+                and "content management policy" not in str(error).lower()
+            ):
+                raise error
+
+            raise ContentPolicyFilterError(
+                f"The provided input contains content that is not aligned with our content policy: {text_input}"
+            )

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In
cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/bedrock/adapter.py
around lines 129 to 138, the synchronous create_structured_output lacks the
exception handling present in acreate_structured_output; wrap the
client.chat.completions.create call in a try/except that mirrors the async
method: catch ContentPolicyViolationError and surface it the same way
(log/context and re-raise or convert to the same error type returned by the
async method), and catch InstructorRetryException to apply the same
retry/backoff logic used in acreate_structured_output (retry the request the
same number of times and finally raise if still failing); ensure logging and
error messages match the async handling so sync callers get consistent behavior.

Comment on lines +165 to +178
"bedrock": [
{
"value": "eu.anthropic.claude-sonnet-4-5-20250929-v1:0",
"label": "Claude 4.5 Sonnet",
},
{
"value": "eu.anthropic.claude-haiku-4-5-20251001-v1:0",
"label": "Claude 4.5 Haiku",
},
{
"value": "eu.amazon.nova-lite-v1:0",
"label": "Amazon Nova Lite",
},
],
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

AWS Bedrock model ID format eu. prefix cross-region availability

💡 Result:

Short answer:

  • Bedrock model IDs are region-agnostic strings in the form provider.model-name-version:revision (e.g., anthropic.claude-3-haiku-20240307-v1:0 or amazon.nova-lite-v1:0). [1]

  • To use cross‑Region inference you use an inference‑profile ID that prefixes the model ID with a geography or profile identifier (examples: us., eu., apac., or global.), e.g. eu.anthropic.claude-3-...:0 or us.anthropic.claude-3-haiku-20240307-v1:0. The prefix tells Bedrock which geographic set of destination Regions may be used for routing. [2][3]

  • Notes: some models are only reachable via their inference‑profile IDs (not directly by the base model ID); Global profiles can route to all commercial Regions while geographic profiles (us/eu/apac) keep routing within that geography. You can query GetInferenceProfile or consult the Bedrock docs to see exact source→destination Region mappings. [2][3]

Sources: AWS Bedrock model IDs & supported models, inference‑profile docs, and geographic cross‑Region inference docs. [1][2][3][4]


🌐 Web query:

AWS Bedrock cross-region model identifiers documentation

💡 Result:

Here are the official AWS docs that describe Bedrock cross‑region (inference profile) model identifiers and how to use them:

  • Amazon Bedrock — Supported Regions and models for inference profiles (lists inference‑profile IDs / prefixes and region groupings). [1]
  • Amazon Bedrock — Foundation model reference / model IDs (shows region‑agnostic model IDs and notes which models are available only via cross‑Region inference). [2]
  • AWS blog: Getting started with cross‑region inference in Amazon Bedrock (how inference profiles work and how to call them). [3]
  • AWS What’s New: Amazon Bedrock now supports cross‑region inference (announcement with links to supported models list). [4]

If you want, I can open any of those pages and extract the exact inference‑profile ID examples (e.g., the geographic prefixes like "us.", "apac.", and specific model IDs) for the models you care about.

Sources:
[1] AWS Docs — Supported Regions and models for inference profiles. (docs.aws.amazon.com)
[2] AWS Docs — Foundation model reference / model IDs. (docs.aws.amazon.com)
[3] AWS Blog — Getting started with cross‑region inference in Amazon Bedrock. (aws.amazon.com)
[4] AWS What’s New — Amazon Bedrock now supports cross‑region inference. (aws.amazon.com)

Citations:


🏁 Script executed:

# Check the file context around lines 165-178 to understand the broader purpose
cd cognee && find . -name "get_settings.py" -path "*/settings/*"

Repository: topoteretes/cognee

Length of output: 96


🏁 Script executed:

cat -n cognee/modules/settings/get_settings.py | head -200 | tail -50

Repository: topoteretes/cognee

Length of output: 2390


🏁 Script executed:

# Check if there are other geographic profiles (us., global., etc.) defined elsewhere
rg "anthropic|amazon\.nova" cognee/modules/settings/get_settings.py -B2 -A2

Repository: topoteretes/cognee

Length of output: 1051


Bedrock configuration uses only EU inference profiles.

These model IDs use the eu. prefix, which is an AWS Bedrock inference profile for cross-region routing within EU geography. This configuration provides no alternatives for US, APAC, or global inference profiles (e.g., us.anthropic.claude-..., apac.amazon.nova-lite-v1:0, or global.anthropic.claude-...).

Consider adding model IDs for other geographic profiles to support users in non-EU regions, or document that this configuration is EU-specific.

🤖 Prompt for AI Agents
In cognee/modules/settings/get_settings.py around lines 165 to 178, the Bedrock
model list only includes EU-prefixed inference profile IDs, which excludes US,
APAC, and global routing options; update the list to include equivalent model
IDs for other geographic inference profiles (e.g., add us., apac., and
global-prefixed variants for Anthropic and Amazon Nova models) or add a clear
comment/documentation string indicating the list is intentionally EU-specific;
ensure values follow the same format ("region.model-name:version") and keep
labels consistent with existing entries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants