Skip to content

Bedrock Runtime: Remove end-of-life Cohere Command examples - #8212

Merged
RuiqiGao-aws merged 1 commit into
awsdocs:mainfrom
brmur:deprecate/bedrock-cohere-command-samples
Oct 20, 2026
Merged

RuiqiGao-aws merged 1 commit into
awsdocs:mainfrom
brmur:deprecate/bedrock-cohere-command-samples

Conversation

@brmur

@brmur brmur commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removes the Cohere Command Bedrock Runtime examples, which pin end-of-life model IDs and fail with ResourceNotFoundException when run.

Re-verified in us-east-1: both cohere.command-r-v1:0 and cohere.command-r-plus-v1:0 are end of life (GetFoundationModel → 404). Cohere has no Converse-capable text model active on Bedrock — ListFoundationModels for provider cohere returns only embeddings and rerank models. Unlike the Anthropic Claude EoL cases (#8204–#8206, repointed to Claude Haiku 4.5), there is no in-vendor replacement, so these examples are removed rather than repointed. Re-homing to another vendor (Nova/Claude) was rejected because the files/snippet tags/doc page are Cohere Command–specific and a non-Cohere model there would be misleading.

Changes

  • Delete 12 example source files + 4 .NET .csproj across Python, Java v2, .NET v3, .NET v4, JavaScript v3
  • Remove the 3 Cohere Command metadata entries (Converse, ConverseStream, DocumentUnderstanding) from bedrock-runtime_metadata.yaml
  • Remove the orphaned Scenario_ToolUseDemo_CohereCommand metadata key — it was a duplicate of the AmazonNova and AnthropicClaude tool-use entries pointing at the same shared tool_use_demo.py/weather_tool.py; the demo remains fully published via those two keys
  • Drop Cohere entries from test harnesses (Python, Java, JS, .NET), .NET test ProjectReferences, and the four .sln files
  • Regenerate service READMEs (Python, Java v2, JavaScript v3, .NET v4) — no remaining Cohere Command sections

Testing

  • Repo-wide grep: zero remaining retired model IDs and zero cohere_command/cohereCommand/CohereCommand references
  • .NET v3 and v4 Bedrock-runtime solutions build clean (0 errors)
  • Python edited tests py_compile OK; JS integration tests node --check OK
  • bedrock-runtime_metadata.yaml passes doc_gen validation

@brmur
brmur requested a review from rlhagerm as a code owner October 14, 2026 12:26
@github-actions github-actions Bot added DotNet-v3 This issue relates to the AWS SDK for .NET V3 Javascript-v3 This issue relates to the AWS SDK for Javascript V3 Python This issue relates to the AWS SDK for Python (boto3) Java-v2 This issue relates to the AWS SDK for Java V2 labels Oct 14, 2026
@brmur
brmur requested review from DennisTraub and removed request for rlhagerm October 14, 2026 12:30
@brmur brmur added the Task A general update to the code base for language clarification, missing actions, tests, etc. label Oct 15, 2026

@DennisTraub DennisTraub left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me. Thanks for the work.

@brmur

brmur commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

CDD-internal only link

@brmur brmur added the On Call Review needed This work needs an on-call review label Oct 19, 2026
@RuiqiGao-aws RuiqiGao-aws added On Call Review complete On call review complete and removed On Call Review needed This work needs an on-call review labels Oct 19, 2026
@RuiqiGao-aws
RuiqiGao-aws enabled auto-merge (squash) October 19, 2026 15:24
The Cohere Command Converse, ConverseStream, and DocumentUnderstanding
examples pinned end-of-life model IDs (cohere.command-r-v1:0 and
cohere.command-r-plus-v1:0). Both return ResourceNotFoundException
("this model version has reached the end of its life") on Bedrock, and
Cohere has no Converse-capable text model active on Bedrock to repoint
to - only embeddings and rerank models remain. Unlike the Anthropic
Claude EoL fixes (awsdocs#8204-awsdocs#8206), there is no in-vendor replacement, so
these examples are removed rather than repointed.

Removes across Python, Java v2, .NET v3, .NET v4, and JavaScript v3:
- 12 example source files and 4 .NET project files
- 3 Cohere Command metadata entries (Converse, ConverseStream,
  DocumentUnderstanding) and the orphaned Scenario_ToolUseDemo_CohereCommand
  key (a duplicate of the Nova/Claude tool-use entries pointing at the
  same shared demo files)
- Cohere entries from language test harnesses, .NET test project
  references, and solution files
- Regenerated service READMEs (no remaining Cohere Command sections)

sim: https://t.corp.amazon.com/P534223238
@RuiqiGao-aws
RuiqiGao-aws force-pushed the deprecate/bedrock-cohere-command-samples branch from bd65529 to e045b1f Compare October 19, 2026 15:25
@RuiqiGao-aws
RuiqiGao-aws disabled auto-merge October 19, 2026 15:25

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 AI Code Example Review

This PR is a clean, well-executed deletion of end-of-life Cohere Command examples across five SDK languages. All source files, project references, solution entries, metadata YAML entries, test harness entries, and README sections are consistently removed with no orphaned references remaining. The PR passes on all criteria — it is correct, complete, and appropriate.

Detailed Review

  1. [nit] dotnetv3/DotNetV3Examples.sln removes the AmazonTitanText solution folder entry ({D6E28F78-4CFB-4C9F-B6E4-29B5E1AAFC5B}) in the same diff hunk as the CohereCommand removal. This appears to be an unrelated change bundled into the PR. It's a minor concern since it only affects a solution-folder (no project files are removed), but it should be verified as intentional.

  2. [nit] dotnetv4/DotNetV4Examples.sln similarly removes the AmazonTitanText solution folder entry ({74979310-8A92-47DC-B5CA-EFA7970E1202}). Same observation as above — worth confirming this is intentional and not a side effect of the diff.

  3. [nit] The bedrock-runtime_Scenario_ToolUseDemo_CohereCommand metadata entry is removed, and the PR description correctly notes the underlying tool_use_demo.py/weather_tool.py files remain published under the AmazonNova and AnthropicClaude keys. The README for Python still retains the Scenario: Tool use with the Converse API link under AnthropicClaude, which is correct.

  4. [policy] No new tests are introduced, which is appropriate for a pure deletion PR. The existing test harnesses (Python, Java, JS, .NET) are correctly pruned to remove Cohere entries, and the PR description confirms py_compile, node --check, and .NET build validations were performed.

  5. [nit] The Java TestConverseAsync.java no longer includes a MetaLlama async test (it was not in the original file either, which is consistent), but TestConverse.java also drops MetaLlama — verifying: the original TestConverse.java did include MetaLlama before this PR? The diff only shows removal of CohereCommand; MetaLlama is not mentioned in the diff, so this is fine. No issue here.

  6. [nit] The four deleted .cs files (dotnetv3 and dotnetv4 Converse/ConverseStream) all lacked a trailing newline at end of file (\ No newline at end of file). This is a pre-existing style issue that is now moot since the files are deleted.

  7. [policy] The PR description states a repo-wide grep was run for retired model IDs and cohere_command/cohereCommand/CohereCommand references. This is good practice and the evidence provided (diff completeness) supports the claim. No further action needed.

  8. [nit] The bedrock-runtime_metadata.yaml removal of bedrock-runtime_Scenario_ToolUseDemo_CohereCommand is correct. The entry was a duplicate snippet-file reference pointing at shared files already covered by the Nova and Claude keys, so removal is clean with no documentation gap.

  9. [nit] All four README.md files (dotnetv4, javav2, javascriptv3, python) correctly drop the Cohere Command sections. The diffs are minimal and surgical — no other vendor sections are accidentally affected.

  10. [policy] Overall the PR is a straightforward, correctly executed removal of broken examples. The scope is well-defined, the changes are consistent across all affected languages, and the rationale (EoL model IDs returning 404) is sound and verified.


Reviewed at commit e045b1f06b66f88462f7be12ca7303755f5e8825. This review was generated automatically using Amazon Bedrock. It compares your changes against existing examples and coding guidelines. Findings are labeled by severity (blocking / nit / policy) and reflect only the commit above. Please use your judgment — this is advisory, not authoritative.

Comment thread dotnetv3/DotNetV3Examples.sln Resolved
Comment thread dotnetv4/DotNetV4Examples.sln Resolved
@RuiqiGao-aws
RuiqiGao-aws merged commit 679128b into awsdocs:main Oct 20, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DotNet-v3 This issue relates to the AWS SDK for .NET V3 Java-v2 This issue relates to the AWS SDK for Java V2 Javascript-v3 This issue relates to the AWS SDK for Javascript V3 On Call Review complete On call review complete Python This issue relates to the AWS SDK for Python (boto3) Task A general update to the code base for language clarification, missing actions, tests, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants