Google's promptTokenCount includes cachedContentTokenCount, so using it
directly as the input token count causes double-counting when calculateCost
multiplies input by the input rate AND cacheRead by the cacheRead rate.
The google-gemini-cli provider already handles this correctly (subtracting
cachedContentTokenCount from promptTokenCount), but google.ts and
google-vertex.ts were using the raw promptTokenCount.
This fix aligns both providers with the google-gemini-cli behavior.
Add an optional requestMetadata field to BedrockOptions that forwards
key-value pairs to the Bedrock Converse API ConverseStreamCommand. Tags
appear in AWS Cost Explorer split cost allocation data, enabling callers
to attribute inference costs to specific applications or contexts.
Changes:
- Add requestMetadata?: Record<string, string> to BedrockOptions with
JSDoc documenting AWS constraints (max 50 pairs, key 64 chars, value
256 chars, no aws: prefix)
- Pass requestMetadata to commandInput via conditional spread to avoid
sending undefined when omitted
- Export BedrockOptions from package root (consistent with other
provider option types)
- Add E2E tests: metadata forwarded to SDK payload, and omitted when
not provided
closes#2510
Update the coding-agent default model picks for ZAI, Cerebras,
and MiniMax so new sessions prefer the current model lineup.
Add the missing MiniMax-M2.1-highspeed direct provider entries
and normalize MiniMax Anthropic-compatible context limits so the
catalog matches the provider's supported model set.
Add AWS_BEDROCK_FORCE_CACHE=1 environment variable support. When the
model ID doesn't contain a recognizable Claude model name, users can
set this variable to force cache point injection.
Bedrock Claude Opus 4.6 and Sonnet 4.6 models have 200k context
window, not 1M. Removed incorrect overrides that were forcing these
models to 1M. The native Anthropic API models correctly remain at 1M.
closes#2305