Repository navigation
Bedrock Runtime: Remove end-of-life Cohere Command examples - #8212
Conversation
DennisTraub
left a comment
There was a problem hiding this comment.
Looks good to me. Thanks for the work.
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
bd65529 to
e045b1f
Compare
There was a problem hiding this comment.
🤖 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
-
[nit]
dotnetv3/DotNetV3Examples.slnremoves theAmazonTitanTextsolution 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. -
[nit]
dotnetv4/DotNetV4Examples.slnsimilarly removes theAmazonTitanTextsolution folder entry ({74979310-8A92-47DC-B5CA-EFA7970E1202}). Same observation as above — worth confirming this is intentional and not a side effect of the diff. -
[nit] The
bedrock-runtime_Scenario_ToolUseDemo_CohereCommandmetadata entry is removed, and the PR description correctly notes the underlyingtool_use_demo.py/weather_tool.pyfiles remain published under the AmazonNova and AnthropicClaude keys. The README for Python still retains theScenario: Tool use with the Converse APIlink under AnthropicClaude, which is correct. -
[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. -
[nit] The Java
TestConverseAsync.javano longer includes aMetaLlamaasync test (it was not in the original file either, which is consistent), butTestConverse.javaalso dropsMetaLlama— verifying: the originalTestConverse.javadid includeMetaLlamabefore this PR? The diff only shows removal ofCohereCommand;MetaLlamais not mentioned in the diff, so this is fine. No issue here. -
[nit] The four deleted
.csfiles (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. -
[policy] The PR description states a repo-wide grep was run for retired model IDs and
cohere_command/cohereCommand/CohereCommandreferences. This is good practice and the evidence provided (diff completeness) supports the claim. No further action needed. -
[nit] The
bedrock-runtime_metadata.yamlremoval ofbedrock-runtime_Scenario_ToolUseDemo_CohereCommandis 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. -
[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. -
[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.
Summary
Removes the Cohere Command Bedrock Runtime examples, which pin end-of-life model IDs and fail with
ResourceNotFoundExceptionwhen run.Re-verified in us-east-1: both
cohere.command-r-v1:0andcohere.command-r-plus-v1:0are end of life (GetFoundationModel→ 404). Cohere has no Converse-capable text model active on Bedrock —ListFoundationModelsfor providercoherereturns 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
.csprojacross Python, Java v2, .NET v3, .NET v4, JavaScript v3Converse,ConverseStream,DocumentUnderstanding) frombedrock-runtime_metadata.yamlScenario_ToolUseDemo_CohereCommandmetadata key — it was a duplicate of theAmazonNovaandAnthropicClaudetool-use entries pointing at the same sharedtool_use_demo.py/weather_tool.py; the demo remains fully published via those two keysProjectReferences, and the four.slnfilesTesting
cohere_command/cohereCommand/CohereCommandreferencespy_compileOK; JS integration testsnode --checkOKbedrock-runtime_metadata.yamlpasses doc_gen validation