Skip to content

bedrock closeout: aws-embed replaces EOL'd aws-cohere; mistral + embeddings live coverage - #39

Merged
CMGS merged 5 commits into
mainfrom
feat/bedrock-closeout
Aug 20, 2026
Merged

bedrock closeout: aws-embed replaces EOL'd aws-cohere; mistral + embeddings live coverage#39
CMGS merged 5 commits into
mainfrom
feat/bedrock-closeout

Conversation

@CMGS

@CMGS CMGS commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

One-day Bedrock key round: close every remaining Bedrock gap so no future E2E depends on having a key.

What changed

  • aws-cohere removed. AWS answered live probes with "This model version has reached the end of its life" for cohere.command-text-v14 / amazon.titan-text-express-v1, and legacy-gates Command R per account ("marked by provider as Legacy… not actively using the model in the last 30 days"). The chat protocol targeted dead models; deleted engine, mock, tests, docs.
  • aws-embed added on the existing /v1/embeddings surface. Titan takes exactly one {inputText} per call — the vendor has no batch form ({"inputText":["a","b"]}"expected type: String, found: JSONArray", inputTexts → schema violation), so a multi-input request is refused with 400 rather than silently fanned out into N InvokeModel calls at client-controlled N. Cohere batches {texts, input_type: search_document} in one call. Both answered in the OpenAI list shape.
  • Usage: embed replies carry only x-amzn-bedrock-input-token-count (no output header), so the pairwise bedrock_header_usage contract never matches them. One token_header parse now serves both forms, in the module that owns the Bedrock header contract.
  • Matrix: Mistral Large via aws-converse (zero code — converse is family-agnostic) + both embed models; bedrock group is now 20 cases.

Live evidence (real key, us-east-1)

  • bedrock group 20/20 in one run on the final build. Earlier runs hit two AWS-side transients (a >120s upstream hang on titan-embed, a vendor 503 "Bedrock is unable to process your request" on mistral) — AWS embed capacity for this fresh account was visibly flaky: direct curl ranged 271ms → 26s → 60s-hang.
  • Billing: ledger == oracle on every case, including titan-embed (4 tokens, body-count path) and cohere-embed (5 tokens, header path); prompt cache write 3099 / read 3091 with weighted costs exact; signed thinking replay turn-2 200.
  • Batch refusal verified end to end: 400 validation_exception in 3.7ms, zero vendor calls.
  • Gates: fmt / clippy -D warnings 0 / 547 tests, 0 failed.

Perf

Interleaved A/B (both orders, 2 rounds) against origin/main: serial p50 25µs → 25µs, p99 43 → 39µs, serial rps +1.7%, concurrent rps +0.3%, request-clone 3.45 → 3.44µs, big-payload p50 162 → 162.5µs. No regression; the chat hot path is untouched (leaf protocol swap). Production lines net -3.

Post-merge status

Bedrock is closed out: InvokeModel (Claude/Llama), Converse (Claude/Nova/DeepSeek/Mistral), embeddings (Titan/Cohere), EventStream, prompt cache, signed thinking — all live-verified. Text-generation legacies (Cohere Command, Titan text) are EOL'd by AWS and documented as such. No future round needs a Bedrock key.

CMGS added 5 commits August 20, 2026 15:05
AWS answered live probes with end-of-life for the legacy Command models
and legacy-gates Command R per account, so the aws-cohere chat protocol
is dead weight. In its place, aws-embed serves /v1/embeddings on
Bedrock: Titan invokes once per input (body inputTextTokenCount as the
count fallback), Cohere embeds the batch in one call, both answered in
the OpenAI list shape. Embed replies carry only the input-count header,
never the output one, so usage reads that header directly instead of
the pairwise bedrock_header_usage contract.
Mistral Large through aws-converse needed zero code; titan-embed-v2 and
cohere.embed-english-v3 pin the new aws-embed wire.
The correction's json! interpolation deep-copied the input string; the
body now takes it by move. Its header read duplicated the parse inside
bedrock_header_usage, so both go through one token_header in the module
that owns the Bedrock header contract, and the single-input rule reaches
the live matrix case and the provider table.
A workspace scan of every json! interpolation found four sites handing
the macro an owned value it then deep-copies: the config document, the
model-status rows, the usage series, and the Bedrock Llama stream's
per-frame text. Each dies right after, so each moves instead. Field
order is unchanged — serde_json orders a BTreeMap.
@CMGS
CMGS merged commit b957eea into main Aug 20, 2026
2 checks passed
@CMGS
CMGS deleted the feat/bedrock-closeout branch August 20, 2026 09:29
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.

1 participant